SA-MP Forums Archive
Timer Problem - 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: Timer Problem (/showthread.php?tid=366575)



Timer Problem - maxisaibot - 07.08.2012

Hello,
i have problem with timer. I guess someone wrong on count. timer going like a 1 2 3 5 6 7 9 .. So sometimes server adding extra +1 sec. How can i fix this?


Код:
timerDate = SetTimer("DateCheck", 1000, 1);
Код:
..
getdate(s_year, s_month, s_day);
gettime(ccurHour, ccurMinute, ccurSecond);
format(timestr,128,"%02d.%02d.%02d %02d:%02d,%02d"s_day,s_month,s_year,ccurHour, ccurMinute, ccurSecond);
TextDrawSetString(txtTimeDisp,timestr);
..
Out: 07.08.2012 04:04,21


Re: Timer Problem - SnG.Scot_MisCuDI - 07.08.2012

try SetTimerEx


Re: Timer Problem - =WoR=G4M3Ov3r - 07.08.2012

Edit: Nvm


Re: Timer Problem - Universal - 07.08.2012

The reason of your problem might be that timers are not very accurate.

Read this: https://sampforum.blast.hk/showthread.php?tid=289675


Re: Timer Problem - maxisaibot - 07.08.2012

Quote:
Originally Posted by Universal
Посмотреть сообщение
The reason of your problem might be that timers are not very accurate.

Read this: https://sampforum.blast.hk/showthread.php?tid=289675
Thanks, works like a boss