11.01.2014, 10:02
Quote:
AFAIK having lots of separate timers that work at the same time (for instance 5 1 second timers running at the same time) can cause some lag (especially with more players). I tend to have a global timer for everything that runs at the same time, then add checks so that it only runs the part of the timer that needs to run per player. (I probably explained that badly, sorry if it makes no sense).
Also IMHO you could make your timer much tidier and still work exactly the same. By using a switch statement. pawn Код:
|
Код:
forward AntiSpawnkill(playerid); public AntiSpawnkill(playerid) { switch(DMZone[playerid]) { case 0 : SetPlayerHealth(playerid,100); // 0 - 4 case 1 : SetPlayerHealth(playerid,100); // 0 - 4 . . . } }