14.05.2015, 15:45
My cpu usage was on 94% so i profiled it and found that bug with public OnServerTimeUpdate(playerid) So i commented some lines now the cpu is down to 24 %
and
But when i do that my settime cmd gets bugged
Код:
public OnGameModeInit() { SetTimer("OnServerTimeUpdate", 1, true); Cpu Optisation
Код:
forward OnServerTimeUpdate(playerid); public OnServerTimeUpdate(playerid) { new hrs; new minutes; new seconds; if(nuke_time <= 0 || anthrax_time <= 0) { for(new i; i < MAX_PLAYERS; i ++) { gettime(hrs, minutes, seconds); SetPlayerTime(i, hrs, minutes); } } return 1; }
But when i do that my settime cmd gets bugged