Something like this
Code:
some_function()
{
new players[MAX_PLAYERS], count
get_players(players, count, "ch")
new index, other_players[MAX_PLAYERS], another_count
for (new i = 0; i < count; i++)
{
index = players[i]
if (condition)
other_players[another_count++] = index
}
new random_player = other_players[random(another_count)]
}
__________________