SA-MP Forums Archive
REP++ - ClearAnimation not working - 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: REP++ - ClearAnimation not working (/showthread.php?tid=633041)



REP++ - ClearAnimation not working - buburuzu19 - 24.04.2017

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


Re: REP++ - ClearAnimation not working - JessThompson - 24.04.2017

PHP Code:
CMD:stopanim(playeridparams[])
{
    
ClearAnimations(playerid);
    
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_NONE);
    return 
true;

have you also tried pressing F while in the animation?


Re: REP++ - ClearAnimation not working - XpDeviL - 24.04.2017

Try;

PHP Code:
    new Float:xFloat:yFloat:z;
    
GetPlayerPos(playeridxyz);
    
SetPlayerPos(playeridxyz+0.5); 



Re: REP++ - ClearAnimation not working - JessThompson - 24.04.2017

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

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



Re: REP++ - ClearAnimation not working - buburuzu19 - 24.04.2017

Quote:
Originally Posted by XpDeviL
View Post
Try;

PHP Code:
    new Float:xFloat:yFloat:z;
    
GetPlayerPos(playeridxyz);
    
SetPlayerPos(playeridxyz+0.5); 
This is not efficient.

Quote:
Originally Posted by JessThompson
View Post
Try changing the animation because you currently freeze the player after the animation is finished.

Code:
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.


Re: REP++ - ClearAnimation not working - Kane - 24.04.2017

What I use and it works.

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

Try those animations.


Re: REP++ - ClearAnimation not working - buburuzu19 - 24.04.2017

Quote:
Originally Posted by Arthur Kane
View Post
What I use and it works.

PHP Code:
CMD:stopanim(playeridparams[])
{
    
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?


Re: REP++ - ClearAnimation not working - crukk11 - 24.04.2017

https://sampforum.blast.hk/showthread.php?tid=330993


Re: REP++ - ClearAnimation not working - raydx - 24.04.2017

My method:

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



Re: REP++ - ClearAnimation not working - Mohaaaaaaaaaaa - 25.04.2017

Code:
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