Ask about timer ID - 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: Ask about timer ID (
/showthread.php?tid=442810)
Ask about timer ID -
IceMeteor - 09.06.2013
Is it normal if the timer ID is so huge, like 10000? i'm not sure because my server going freezed after i put this function in
Re: Ask about timer ID -
IceBilizard - 09.06.2013
its milliseconds like 1000 = 1 Second
then
10000 = 10 Seconds so its not huge
Re: Ask about timer ID -
IceMeteor - 09.06.2013
Not the interval, the id returned, like this code
Код:
new timerid = SetTimer("Timer", 1000, 0);
printf("The timerid = %d", timerid);
KillTimer(timerid);
and i do the code 1000 time, is it okay and not make the server memory over?
Re: Ask about timer ID -
park4bmx - 09.06.2013
Ur telling me you run that in a loop
1000 times
Re: Ask about timer ID -
IceMeteor - 09.06.2013
not actually, i run a hunger system, so i need to do SetTimerEx and KillTimer so many times
Re: Ask about timer ID -
ReVo_ - 09.06.2013
https://sampwiki.blast.hk/wiki/SetTimer
Note: Timer IDs are never used twice. You can use KillTimer() on a timer ID and it won't matter if it's running or not.
Everytime you start a time an unique id is assigned and if you have used 9999 timers it's normal.