[HELP]timers with number of repeats (not true or false)
#1

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?
Reply
#2

y_timers ?
Reply
#3

just set it repeating count each time it runs then kill it at n times
Reply
#4

Quote:
Originally Posted by Y_Less
View Post
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!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)