REP++ - ClearAnimation not working
#1

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
Reply
#2

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

have you also tried pressing F while in the animation?
Reply
#3

Try;

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

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);
Reply
#5

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.
Reply
#6

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.
Reply
#7

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?
Reply
#8

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

My method:

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

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)