[HELP]timers with number of repeats (not true or false) - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP]timers with number of repeats (not true or false) (
/showthread.php?tid=272101)
[HELP]timers with number of repeats (not true or false) -
vpontin - 27.07.2011
Good night!

Is possible to make a timer is repeated x times?
Unlike in the SetTimer/Ex, which has the parameter 'repeating' just like 'not repeat(false/0)' or 'repeat forever(true/1)' ...
Does anyone have a snippet to do this?
Re: [HELP]timers with number of repeats (not true or false) -
MyLife - 27.07.2011
y_timers ?
Re: [HELP]timers with number of repeats (not true or false) -
(SF)Noobanatior - 27.07.2011
just set it repeating count each time it runs then kill it at n times
Re: [HELP]timers with number of repeats (not true or false) -
vpontin - 27.07.2011
Quote:
Originally Posted by Y_Less
Unfortunately not yet (it's something I've been thinking about).
If you know that a timer will only be called from one place, and there will only be one of them at once (not easy if you have timers per-player) you can do:
pawn Code:
public MyTimer(params) { static count; ++count; if (count == 10) { KillTimer(gThisTimer); } }
|
thanks guys

and Y_Less: add this functionality in Y_Timers! It would be very useful!