SA-MP Forums Archive
Animation won't stop completely - 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: Animation won't stop completely (/showthread.php?tid=563207)



Animation won't stop completely - Supermaxultraswag - 14.02.2015

Код:
      
CMD:fishing(playerid, params[])
{
	SetTimerEx("Stop", 7000, false, "i", playerid);
	TogglePlayerControllable(playerid,0);
	ApplyAnimation(playerid,"SWORD","sword_block",50.0,0,1,0,1,1);
        Hook[playerid]=SetPlayerAttachedObject(playerid, 4, 18632, 6, 0.2, -0.05, -0.05, 180, 0, 0, 1, 1, 1, 0);

return 1
}

forward Stop(playerid);
public Stop(playerid)
{
ClearAnimations(playerid);
TogglePlayerControllable(playerid,1);
RemovePlayerAttachedObject(playerid, 4);
}


As you can see, I could move but my hands still doing animation and animation disappears only if I jump. How to completely stop animation?


Re: Animation won't stop completely - Puppy - 14.02.2015

You can use SetPlayerSkin(playerid, GetPlayerSkin(playerid)) before unfreezing. ClearAnimations may not work properly if the player is moving.


Re: Animation won't stop completely - Supermaxultraswag - 14.02.2015

Quote:
Originally Posted by Puppy
Посмотреть сообщение
You can use SetPlayerSkin(playerid, GetPlayerSkin(playerid)) before unfreezing. ClearAnimations may not work properly if the player is moving.
Thank you!