Fixing Time Change cmd
#1

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 %
Код:
public OnGameModeInit()
{
SetTimer("OnServerTimeUpdate", 1, true);     Cpu Optisation
and

Код:
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


Reply


Messages In This Thread
Fixing Time Change cmd - by perfectboy - 14.05.2015, 15:45
Re: Fixing Time Change cmd - by Konstantinos - 14.05.2015, 15:48
Re: Fixing Time Change cmd - by perfectboy - 14.05.2015, 16:00

Forum Jump:


Users browsing this thread: 1 Guest(s)