Setting a timer for clearing animation - 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: Setting a timer for clearing animation (
/showthread.php?tid=455096)
Setting a timer for clearing animation -
Stanford - 31.07.2013
I need to set a timer for clearing animation, any idea on how to do this?.
Thank you in advance.
AW: Setting a timer for clearing animation -
CutX - 31.07.2013
a timer for doing something like this?
well, idk what youre doing but if you need a timer, here
with y_timers:
Код:
defer yourTimer(playerid);//starting the timer
//somewhere outside of any public, like a function:
timer yourTimer[2000](playerid)//2000 is the time in ms and playerid is the param passed down to the timer
{
ClearAnimations(playerid);
return 1;
}
normal timer:
Код:
SetTimerEx("yourTimer",2000,false,"i",playerid);//starting it
//somewhere outside
forward yourTimer(playerid);
public yourTimer(playerid)
{
ClearAnimations(playerid);
return 1;
}
the more elegant and efficient timer is the first one, as these timers don't overlap. only every 4 times or so, i con't remember correctls :P
Re: Setting a timer for clearing animation -
Stanford - 31.07.2013
Thank you CutX, I really appreciate it.