SA-MP Forums Archive
Timer crashes server - 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: Timer crashes server (/showthread.php?tid=409914)



Timer crashes server - iWhite - 23.01.2013

Timer:
Код:
SetTimerEx("@ApplyAnimation", 500, false, "issfiiiiii", playerid, "DANCING", "dnce_M_b", 4.000000, 0, 0, 0, 1, 0, 1);
Function:
Код:
forward @ApplyAnimation(playerid, Anim[], Animname[], Float:spd, loop, lockx, locky, freeze, time, forcesync); 
public @ApplyAnimation(playerid, Anim[], Animname[], Float:spd, loop, lockx, locky, freeze, time, forcesync) 
{
   ApplyAnimation(playerid, Anim, Animname, spd, loop, lockx, locky, freeze, time, forcesync);
}
Any solutions?


Re: Timer crashes server - Roach_ - 23.01.2013

Try this:
pawn Код:
forward _ApplyAnimation(playerid, Anim[], Animname[], Float:spd, loop, lockx, locky, freeze, time, forcesync);
public _ApplyAnimation(playerid, Anim[], Animname[], Float:spd, loop, lockx, locky, freeze, time, forcesync)
{
    ApplyAnimation(playerid, Anim, Animname, spd, loop, lockx, locky, freeze, time, forcesync);
}
And the timer:
pawn Код:
SetTimerEx("_ApplyAnimation", 500, false, "issfiiiiii", playerid, "DANCING", "dnce_M_b", 4.000000, 0, 0, 0, 1, 0, 1);



Re: Timer crashes server - iWhite - 23.01.2013

Same...


Re: Timer crashes server - Roach_ - 23.01.2013

But, why are you using the Timer, you can use directly the function, we talk about 500 miliseconds, 0.5 seconds, so ... why are you using the Timer ?