SA-MP Forums Archive
[Help]KillTimer(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: [Help]KillTimer(id?!) (/showthread.php?tid=288194)



[Help]KillTimer(id?!) - moadi - 06.10.2011

Hey there,

KillTimer requires the timer's ID you want to "kill" ... i already got too many timers in my GM and it's a bit complicated , how may i know which ID is, for an example , SetTimer("mytimer", xx, xx, x) <<<< how can i get the ID of this timer ?

Thanks .


Re: [Help]KillTimer(id?!) - SuperViper - 06.10.2011

When you use SetTimer use it like

SexyTimer = SetTimer(.....)

and then

KillTimer(SexyTimer)


Re: [Help]KillTimer(id?!) - Fj0rtizFredde - 06.10.2011

Make a variable for it.
pawn Код:
//OnTop:
new MyEpicTimer;
//Where you create the timer:
MyEpicTimer = SetTimer("MySuperFunction", blah blah);
//And where you want to kill it:
KillTimer(MyEpicTimer);



Re: [Help]KillTimer(id?!) - moadi - 06.10.2011

Works , thanks .