for all help
#4

Quote:
Originally Posted by SmiT
Посмотреть сообщение
Loop
pawn Код:
for ( new i = 0; i < MAX_PLAYERS; i ++ )
{
    GivePlayerMoney( i, 1000 ) ; // Give all players $1000
}
This code more optimized:
pawn Код:
for(new i, PP = GetMaxPlayers(); i < PP; i++)
{
    if(!IsPlayerConnected(i)) continue;
    GivePlayerMoney(i, 1000);
}

//Or

#define GiveAllMoney(%0) for(new i,PP=GetMaxPlayers;i<PP;i++), GivePlayerMoney(i,%0)
Reply


Messages In This Thread
for all help - by mike_1 - 15.10.2011, 20:28
Re: for all help - by SmiT - 15.10.2011, 20:30
Re: for all help - by Kush - 15.10.2011, 20:32
Re: for all help - by Josma_cmd - 15.10.2011, 20:37
Re : for all help - by Naruto_Emilio - 15.10.2011, 20:46
Re: for all help - by SuperViper - 15.10.2011, 21:56
Re: for all help - by mike_1 - 17.10.2011, 11:29

Forum Jump:


Users browsing this thread: 1 Guest(s)