05.09.2009, 09:03
What the FUCK are you doing? are you trying to ruine or server or something?
OnPlayerUpdate get's called every like 20-30 times a second for each player.
So that like if you've 500 players (for 0.3): 500x20 = 100.000 x 500 (for the loop) = 50.000.000 times.
This function is calles 50.000.000 times each 1 second if your server is full....
Quote:
public OnPlayerUpdate(playerid) { new CashScore; new CashScoreOld; for(new i=0; i<MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { CashScore = GetPlayerMoney(i); SetPlayerScore(i, CashScore); if(CashScore > CashScoreOld) { CashScoreOld = CashScore; } } } return 1; } |
So that like if you've 500 players (for 0.3): 500x20 = 100.000 x 500 (for the loop) = 50.000.000 times.
This function is calles 50.000.000 times each 1 second if your server is full....