random() will select a random value from 0 to the specified max value.
random(7) -> {0,1,2,3,4,5,6,7}
which sometimes, will lead to this:
PHP Code:
iRandom = iPlayers [ 0 ]
Valid client entity indexes are from 1 to 32.
As an additional note, there are two more issues which are related to the use of get_players() native which we will not point out here,
but we are pretty sure that if someone knows how entity index slots works in the game this person will understand why.