Sound for all!
#4

Why all of you are still using:

Код:
MAX_PLAYERS
this just lags your server, why should it loop 500 times if there is only 30 players on server ?

you should use this instead:

Код:
for(new playerid, gmax = GetMaxPlayers(); playerid < gmax; playerid++)
This one loops only for slots ammount, so if your server has 30 slots it will loop 30 times.

or you can use this one

Код:
for(new i = 0, gmax = GetMaxPlayers(); i<gmax; i++) 
{ 
if(!IsPlayerConnected(i)) continue;
This will only loop for players that are online.
Reply


Messages In This Thread
Sound for all! - by WThieves - 24.12.2009, 13:18
Re: Sound for all! - by CJ101 - 24.12.2009, 13:22
Re: Sound for all! - by pagie1111 - 24.12.2009, 13:25
Re: Sound for all! - by kamilbam - 24.12.2009, 13:38
Re: Sound for all! - by WThieves - 24.12.2009, 13:52

Forum Jump:


Users browsing this thread: 1 Guest(s)