SetTimer counts too fast - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: SetTimer counts too fast (
/showthread.php?tid=638596)
SetTimer counts too fast -
rOps - 03.08.2017
Hi all. When I set my timer on GameModeInit with repeat every 1 second, it repeats every ~0,5 seconds.
Код HTML:
SetTimer("Second", 1000, true);
f_public: Second()
{
new String[30];
for(new i; i <= GetPlayerPoolSize(); i++)
{
if(PI[i][Jailed])
{
if(PI[i][JailTime] > 0)
{
PI[i][JailTime] --;
format(String, sizeof(String), "%s", ConvertSeconds(PI[i][JailTime]));
GameTextForPlayer(i, String, 1000, 6);
}
else
{
UnjailPlayer(i);
}
}
}
return 1;
}
Re: SetTimer counts too fast -
Xeon™ - 03.08.2017
How you know that?
Re: SetTimer counts too fast -
iLearner - 03.08.2017
Maybe you've set more then a timer, it happened to me once.
Re: SetTimer counts too fast -
rOps - 03.08.2017
Quote:
Originally Posted by iLearner
Maybe you've set more then a timer, it happened to me once.
|
No :/
EDIT: fixed it
Re: SetTimer counts too fast -
OsteeN - 03.08.2017
https://sampforum.blast.hk/showthread.php?tid=289675
https://github.com/udan11/samp-plugin-timerfix
https://sampforum.blast.hk/showthread.php?tid=571505