06.05.2012, 17:09
Something along these lines would probably work.
pawn Код:
new
connectedPlayers = 0;
for( new u; u < MAX_PLAYERS; u ++ ) // Get the amount of online players..
{
if( IsPlayerConnected( playerid ) )
{
connectedPlayers++;
}
}
new
firstPlayer = random( connectedPlayers ),
secondPlayer = random( connectedPlayers),
thirdPlayer = random( connectedPlayers );
printf("%s was randomly selected as the first player!\n%s was selected as the second player!\n%s was selected as the third player!", firstPlayer, secondPlayer, thirdPlayer );

