Bonus player script.. it this correct?
#2

pawn Код:
stock SelectRandomPlayer()
{
     new random = Random(MAX_PLAYERS);
     if(IsPlayerConnected(random))
     {
           return random;
     }
     else
     {
           return SelectRandomPlayer();
     }
}
You have to return the function value (in recursive manner). If you use foreach there is Iter_Random function
Reply


Messages In This Thread
Bonus player script.. it this correct? - by Anak - 19.07.2013, 13:38
Re: Bonus player script.. it this correct? - by Misiur - 19.07.2013, 13:57

Forum Jump:


Users browsing this thread: 1 Guest(s)