Sorry, if that doesn't work, try this:
Code:
// stock function
stock random_player()
{
new iPlayer, iPlayers = get_playersnum()
while(!is_user_connected(iPlayer))
iPlayer = random_num(1,iPlayers)
return iPlayer
}
I forgot you didn't specify whether or not the person has to be alive.
__________________