23.09.2015, 10:49
Hi, I made 2 timers for reaction tests, It works without any bugs but the problem is, after 7-8 hours of starting the timer, it gets bugged and i have to restart gamemode or restart server, thats sucks so, i tried to make command to fix the timers when they got bugged, but it doesn't do anything. the timers still being bugged after i use the command
Heres the command
It returns "SERVER: Timers resetted" but infact, it didn't.
However, heres the code on gamemodeinit:-
Anyway to fix this?
Heres the command
PHP код:
dcmd_rt(playerid, params[])
{
#pragma unused params
ResetTimers();
SendClientMessage(playerid, COLOR_AQUA, "SERVER: Timers resetted.");
return 1;
}
ResetTimers()
{
KillTimer(xReactionTimer);
KillTimer(gRandomMessageTimer);
xReactionTimer = SetTimer("xReactionTest", TIME, 1);
gRandomMessageTimer = SetTimer("OnRandomMessageChange", 360000, true);
return 1;
}
However, heres the code on gamemodeinit:-
PHP код:
xReactionTimer = SetTimer("xReactionTest", TIME, 1);
gRandomMessageTimer = SetTimer("OnRandomMessageChange", 360000, true);