problem on 1 animation loop - 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: problem on 1 animation loop (
/showthread.php?tid=467467)
problem on 1 animation loop -
Ivander - 03.10.2013
as the tittle say , i got problem after put animation code to my GM
Код:
public OnPlayerUpdate(playerid)
{
new Float:health;
GetPlayerHealth(playerid, health);
if(health <= 50 && health >= 1)
{
SetPlayerWeather(playerid, -66);
SetPlayerTime(playerid, 12, 0);
SetPlayerDrunkLevel(playerid, 9000);
GameTextForPlayer(playerid, "~r~Injured~n~~w~buy some food to restore your health!", health <= 50 && health >= 1, 3);
ApplyAnimation(playerid, "KNIFE", "KILL_Knife_Ped_Die", 4.0, 0, 1, 1, 1, 0, 1);
}
else if(health >= 50)
{
new hour, minute, second;
gettime(hour, minute, second);
SetPlayerTime(playerid, hour, minute);
SetPlayerWeather(playerid, gWeather);
SetPlayerDrunkLevel(playerid, 0);
}
I want the anim is looping in 10 second so the player can attack other and he will fall in 10 second. but after i test it , it was looping about 1 second maybe because after the animation fall done , it repeat again.
What should i do ?
Re: problem on 1 animation loop -
Krisna - 03.10.2013
settimer maybe
Re: problem on 1 animation loop -
RenovanZ - 03.10.2013
Change ur ApplyAnimation code to this
pawn Код:
ApplyAnimation(playerid,"KNIFE","KILL_Knife_Ped_Die",4.1,0,1,1,1,10000);
Its because you're set true on your loop parameter.
pawn Код:
(playerid, animlib[], animname[], Float:fDelta, loop, lockx, locky, freeze, time, forcesync)
Then, it'll be never-ending anim

I set the freeze to false too, because if its true, player will be freezed after anim done.