SA-MP Forums Archive
Setting a timer to repeat 3 times? - 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: Setting a timer to repeat 3 times? (/showthread.php?tid=186949)



Setting a timer to repeat 3 times? - RedFusion - 31.10.2010

How do i make a timer to repeat 3 times?
For example

Код:
SetTimer ("lol1",0,false);
How do i make that one repeat 3 times?
Does SetTimerEx work with this or what?


Re: Setting a timer to repeat 3 times? - Jefff - 31.10.2010

pawn Код:
SetTimerEx("0wn3d",1000,false,"d",3); // 3 times
pawn Код:
public 0wn3d(times)
{
    if(times)
    {
        // do something
        SetTimerEx("0wn3d",1000,false,"d",times-1);
    }else{
        // race start or whatever
    }
    return 1;
}



Re: Setting a timer to repeat 3 times? - RedFusion - 31.10.2010

you have 666 posts :O
Ill try that one btw.