01.10.2010, 17:01
Quote:
MAX_PLAYERS is slower than GetMaxPlayers() if you are NOT talking about full servers
- MAX_PLAYERS defines to 500 players - GetMaxPlayers() defines to the row of "slots" in "server.cfg" / not sure |
so it will not make as many checks on the function GetMaxPlayers
GetMaxPlayers = Function
MAX_PLAYERS = Macro
GetMaxPlayer is slower
If it is required to use GetMaxPlayer use the following:
for (new i = 0 , j = GetMaxPlayers () , i <j; i++)
But MAX_PLAYERS is further optimized.
make sure the player is online and the not is bot
so:
pawn Код:
#Define LoopPlayers (%0,%1) for(new 0%=0,%0 <%1,%0++) if(IsPlayerConnected (%0) && !IsPlayerNPC (%0))
Tutorial little wrong