Need Explanation With 'for' statement!
#4

Quote:
Originally Posted by ¤Adas¤
This will loop around all players, where "i" is their ID.
i got it now...its like this u can use something else ex:
Код:
#define SERVER_MAX_PLAYERS 20 // example 20 is my server's max players...
then in the cmd :
Код:
for (new i=0; i<SERVER_MAX_PLAYERS; i++)
{
   if (IsPlayerConnected(i))
   {
     SendClientMessage(playerid,0xAA000AA,"HAHA!");
   }
}
that wood work, right? ( if 20 wood be my max player setting )
Reply


Messages In This Thread
Need Explanation With 'for' statement! - by Micko9 - 16.03.2010, 17:56
Re: Need Explanation With 'for' statement! - by Correlli - 16.03.2010, 18:01
Re: Need Explanation With 'for' statement! - by ¤Adas¤ - 16.03.2010, 18:01
Re: Need Explanation With 'for' statement! - by Micko9 - 16.03.2010, 18:22
Re: Need Explanation With 'for' statement! - by ¤Adas¤ - 16.03.2010, 18:23
Re: Need Explanation With 'for' statement! - by Micko9 - 16.03.2010, 18:40
Re: Need Explanation With 'for' statement! - by Correlli - 16.03.2010, 18:42
Re: Need Explanation With 'for' statement! - by Micko9 - 16.03.2010, 18:46
Re: Need Explanation With 'for' statement! - by Correlli - 16.03.2010, 18:55

Forum Jump:


Users browsing this thread: 1 Guest(s)