11.06.2013, 20:36
Hi scrpterz !
I'm stuck with this timers and i can't find solution how to solve them
My problem is following:
I have 6 timers who are repeating for every online player...
But they are causing serious lag and they work perfect...
So i have tried something like this:
and the code in the timer:
The textdraw isn't showing on my server where i have 30-50 players, but on my local server it works -.- ?!?!
What is the problem ?
I'm stuck with this timers and i can't find solution how to solve them
My problem is following:
I have 6 timers who are repeating for every online player...
Код:
OnGameModeInIt() { for(new i; i != GetMaxPlayers(); i++) { SetTimerEx("Speedometer", 100, true, "d", i); SetTimerEx("HPWCGLAD", 150000, true, "d", i); SetTimerEx("BolnicaTimerce", 1000, true, "d", i); //============== [ LEVEL SISTEM ] ===============// SetTimerEx("exptimer", 60000, true, "d", i); SetTimerEx("ExpUpdate", 100, true, "d", i); //============== [ LEVEL SISTEM ] ===============// SetTimerEx("RandomMessage", 8000, true, "d", i); } }
So i have tried something like this:
Код:
SetTimer("Speedometer", 100, true); // under OnGameModeInIt
Код:
public Speedometer() { foreach (new i : Player) { if(IsPlayerInAnyVehicle(i)) { TextDrawShowForPlayer(i, Speedo0[i]); TextDrawShowForPlayer(i, Speedo1[i]); TextDrawShowForPlayer(i, Speedo2[i]); TextDrawShowForPlayer(i, Speedo3[i]); TextDrawShowForPlayer(i, Speedo4[i]); TextDrawShowForPlayer(i, Speedo5[i]); TextDrawShowForPlayer(i, Speedo6[i]); TextDrawShowForPlayer(i, Speedo7[i]); TextDrawShowForPlayer(i, Speedo8[i]); TextDrawShowForPlayer(i, Speedo9[i]); TextDrawShowForPlayer(i, Speedo10[i]); TextDrawShowForPlayer(i, Speedo11[i]); TextDrawShowForPlayer(i, Speedo12[i]); TextDrawShowForPlayer(i, Speedo13[i]); } } }
What is the problem ?