My time clock sometimes jumps a few seconds.. - 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: My time clock sometimes jumps a few seconds.. (
/showthread.php?tid=479441)
My time clock sometimes jumps a few seconds.. -
Dokins - 05.12.2013
With the clock seconds jumping every 8-10 seconds and dialog taking a while to open, would anyone have any idea why this might be?
pawn Код:
public UpdateTimeAndWeather()
{
gettime(hour, minute, seconds);
if(minute == 0) SetWorldTime(hour);
if (hour > 23) hour = 0;
format(timestr,32,"%02d:%02d:%02d", hour, minute, seconds);
TextDrawSetString(txtTimeDisp,timestr);
foreach(Player, i)
{
if(IsPlayerConnected(i) && LoggedIn[i] == 1)
{
SetPlayerTime(i,hour+2,minute);
if(minute == 0 && seconds == 00)
{
doPayDay(i);
}
}
}
return 1;
}
this is a clock.
The only timers are run every minute and are all based on player variables, not on general server.
Re: My time clock sometimes jumps a few seconds.. -
Pottus - 05.12.2013
Your probably not using the timerfix
https://sampforum.blast.hk/showthread.php?tid=289675 so your timers are too slow.