SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 24/04/2017, 08:09 AM   #1
buburuzu19
Huge Clucker
 
buburuzu19's Avatar
 
Join Date: Apr 2013
Location: 127.0.0.1
Posts: 462
Reputation: 9
Default REP++ - ClearAnimation not working

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
buburuzu19 is offline   Reply With Quote
Old 24/04/2017, 08:15 AM   #2
JessThompson
Huge Clucker
 
JessThompson's Avatar
 
Join Date: Dec 2013
Location: Developer Lodge
Posts: 398
Reputation: 22
Default Re: REP++ - ClearAnimation not working

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

have you also tried pressing F while in the animation?
__________________
If I helped you please leave a REP+
Developer ~ Scripter
PHP | HTML | CSS | VB.NET | PAWN
JessThompson is offline   Reply With Quote
Old 24/04/2017, 08:16 AM   #3
XpDeviL
Big Clucker
 
XpDeviL's Avatar
 
Join Date: Sep 2009
Posts: 72
Reputation: 8
Default Re: REP++ - ClearAnimation not working

Try;

PHP Code:
    new Float:xFloat:yFloat:z;
    
GetPlayerPos(playeridxyz);
    
SetPlayerPos(playeridxyz+0.5); 
__________________
XpDeviL is offline   Reply With Quote
Old 24/04/2017, 08:19 AM   #4
JessThompson
Huge Clucker
 
JessThompson's Avatar
 
Join Date: Dec 2013
Location: Developer Lodge
Posts: 398
Reputation: 22
Default Re: REP++ - ClearAnimation not working

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);
__________________
If I helped you please leave a REP+
Developer ~ Scripter
PHP | HTML | CSS | VB.NET | PAWN
JessThompson is offline   Reply With Quote
Old 24/04/2017, 08:40 AM   #5
buburuzu19
Huge Clucker
 
buburuzu19's Avatar
 
Join Date: Apr 2013
Location: 127.0.0.1
Posts: 462
Reputation: 9
Default Re: REP++ - ClearAnimation not working

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.
buburuzu19 is offline   Reply With Quote
Old 24/04/2017, 09:27 AM   #6
Kane
Gangsta
 
Kane's Avatar
 
Join Date: Sep 2012
Posts: 822
Reputation: 130
Default Re: REP++ - ClearAnimation not working

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.
Kane is offline   Reply With Quote
Old 24/04/2017, 10:52 AM   #7
buburuzu19
Huge Clucker
 
buburuzu19's Avatar
 
Join Date: Apr 2013
Location: 127.0.0.1
Posts: 462
Reputation: 9
Default Re: REP++ - ClearAnimation not working

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?
buburuzu19 is offline   Reply With Quote
Old 24/04/2017, 11:32 AM   #8
crukk11
Huge Clucker
 
crukk11's Avatar
 
Join Date: Jan 2017
Location: Malaysia
Posts: 313
Reputation: 5
Default Re: REP++ - ClearAnimation not working

http://forum.sa-mp.com/showthread.php?t=330993
crukk11 is offline   Reply With Quote
Old 24/04/2017, 11:36 AM   #9
raydx
Huge Clucker
 
raydx's Avatar
 
Join Date: Feb 2017
Posts: 203
Reputation: 73
Default Re: REP++ - ClearAnimation not working

My method:

Code:
new skin = GetPlayerSkin(playerid);
SetPlayerSkin(playerid, skin);
TogglePlayerControllable(playerid, 0);
TogglePlayerControllable(playerid, 1);
raydx is offline   Reply With Quote
Old 25/04/2017, 11:26 AM   #10
Mohaaaaaaaaaaa
Big Clucker
 
Join Date: Feb 2017
Posts: 58
Reputation: 2
Default Re: REP++ - ClearAnimation not working

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
Mohaaaaaaaaaaa is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Timers stop working after working for the most part of the day. [WSF]ThA_Devil Scripting Help 0 17/06/2015 09:10 PM
blocking vehicle enterance with clearanimation, need some help nogh445 Scripting Help 0 26/10/2014 03:40 AM
Hosting Issues - Y_ini saving/loading isn't working and OnDialogResponse isn't working. Aerotactics Server Support 3 30/03/2014 08:44 AM
Working Vehicle storage system (100% working) eclipses Scripting Help 6 14/10/2012 09:13 PM
ClearAnimation Doesnt work. pasha97 Scripting Help 1 02/07/2012 08:39 AM


All times are GMT. The time now is 07:42 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.