PDA

View Full Version : REP++ - ClearAnimation not working


buburuzu19
24/04/2017, 08:09 AM
ApplyAnimation(playerid,"SWORD","sword_block",4,0,1,0,1,1);

Read the title. I tried almost everything toggleplayercontr(playerid, 0) and then toggleplayercontr(playerid, 1), ClearAnimations(playerid), SetPlayerSpecialAnimation to NONE, why i can't clear this animation, what is wrong over here :confused::confused::confused:

JessThompson
24/04/2017, 08:15 AM
CMD:stopanim(playerid, params[])
{
ClearAnimations(playerid);
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_NON E);
return true;
}

have you also tried pressing F while in the animation?

XpDeviL
24/04/2017, 08:16 AM
Try;


new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
SetPlayerPos(playerid, x, y, z+0.5);

JessThompson
24/04/2017, 08:19 AM
Try changing the animation because you currently freeze the player after the animation is finished.


ApplyAnimation(playerid,"SWORD", "sword_block", 4.1, 0, 0, 0, 0, 0);

buburuzu19
24/04/2017, 08:40 AM
Try;


new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
SetPlayerPos(playerid, x, y, z+0.5);


This is not efficient.

Try changing the animation because you currently freeze the player after the animation is finished.


ApplyAnimation(playerid,"SWORD", "sword_block", 4.1, 0, 0, 0, 0, 0);


I know that but unfreezing it's impossible? I want to keep a player with this animation for more than 15 seconds let's say, with your applyanimation line it's doing only one time the anim, it's not staying in that anim for more that 3 secs.

Kane
24/04/2017, 09:27 AM
What I use and it works.


CMD:stopanim(playerid, params[])
{
ApplyAnimation(playerid,"PED","null",0.0,0,0,0,0,0);
ClearAnimations(playerid);
StopLoopingAnim(playerid);
return 1;
}


Try those animations.

buburuzu19
24/04/2017, 10:52 AM
What I use and it works.


CMD:stopanim(playerid, params[])
{
ApplyAnimation(playerid,"PED","null",0.0,0,0,0,0,0);
ClearAnimations(playerid);
StopLoopingAnim(playerid);
return 1;
}


Try those animations.

Still not working, any new ideas?

crukk11
24/04/2017, 11:32 AM
http://forum.sa-mp.com/showthread.php?t=330993

raydx
24/04/2017, 11:36 AM
My method:

new skin = GetPlayerSkin(playerid);
SetPlayerSkin(playerid, skin);
TogglePlayerControllable(playerid, 0);
TogglePlayerControllable(playerid, 1);

Mohaaaaaaaaaaa
25/04/2017, 11:26 AM
CMD:stopanim(playerid,params[])
{
ApplyAnimation(playerid, "CARRY", "crry_prtial", 2.0, 0, 0, 0, 0, 0);
return 1;
}

Since others didnt work i am using this on my server and its working