Animation won't stop completely
#1

Код:
      
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?
Reply
#2

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

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!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)