14.05.2010, 18:58
Change
To
The GetMaxPlayers part will Get the maximum possible players for your server (what ever is specified in youe server.cfg) and is the most efficient way of dueing player loops IMO (some say defining a new MAX_PLAYERS is better, but thats not dynamic / needs to be manually changed if you ever set your player count lower / higher).
If you dont want to skip unconnected id's comment out the "if(!IsPlayerConnected(a)) continue;" part.
Код:
for(new a;a<55,IsPlayerConnected(a);a++)
Код:
for(new a=0, i=GetMaxPlayers(); a<i; a++) { if(!IsPlayerConnected(a)) continue; //rest of your code }
If you dont want to skip unconnected id's comment out the "if(!IsPlayerConnected(a)) continue;" part.