3 Random
#3

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 );
Reply


Messages In This Thread
3 Random - by COD - 06.05.2012, 16:26
Re: 3 Random - by [MG]Dimi - 06.05.2012, 16:52
Re: 3 Random - by 2KY - 06.05.2012, 17:09
AW: 3 Random - by Nero_3D - 06.05.2012, 17:24
Re: 3 Random - by COD - 06.05.2012, 18:26
Re: 3 Random - by 2KY - 06.05.2012, 18:28

Forum Jump:


Users browsing this thread: 1 Guest(s)