SA-MP Forums Archive
Cant clear animation? - 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: Cant clear animation? (/showthread.php?tid=376514)



Cant clear animation? - Admigo - 10.09.2012

Heey all,

I am using the medic animation but when i clear the anim i cant move, if i am using my arrows i can turn arround but i cant walk only when i am jumping i can walk again.
How can i fix this?

Admigo


Re: Cant clear animation? - ryansheilds - 10.09.2012

When clearing animations reset the players skin using 'GetplayerSkin' and 'SetPlayerSkin' doing this works for me, I used to have the same problem.


Re: Cant clear animation? - mamorunl - 10.09.2012

'when I clear the anim'. Is this when you finish the animation or when you really use ClearAnimation (or some sort of function that I cant remember the name of xD, sorry for that )? Some animations use a second animation to stop the first. That may be the cause as well for your animation.


Re: Cant clear animation? - kbalor - 10.09.2012

I don't know if this offtopic but, Sometimes why do I need to do animation two times before it work? I mean.

If I do /sit nothing happens, then do /sit the animation is now sittimg.

same with /medic if I do medic it do nothing, then do /medic the medic animation is now working.


Re: Cant clear animation? - Vince - 10.09.2012

Quote:
Originally Posted by kbalor
Посмотреть сообщение
I don't know if this offtopic but, Sometimes why do I need to do animation two times before it work? I mean.

If I do /sit nothing happens, then do /sit the animation is now sittimg.

same with /medic if I do medic it do nothing, then do /medic the medic animation is now working.
Animations need to be preloaded before they work. Animation libraries are loaded into memory when needed. Search PreloadAnimLib. I believe it's it one of the default gamemodes as well.


Re: Cant clear animation? - Admigo - 10.09.2012

Quote:
Originally Posted by mamorunl
Посмотреть сообщение
'when I clear the anim'. Is this when you finish the animation or when you really use ClearAnimation (or some sort of function that I cant remember the name of xD, sorry for that )? Some animations use a second animation to stop the first. That may be the cause as well for your animation.
This is when the animation is finished.


Re: Cant clear animation? - mamorunl - 10.09.2012

OK. Then ClearAnimations() should work or see if there is a closing animation.


Re: Cant clear animation? - Admigo - 10.09.2012

Quote:
Originally Posted by ryansheilds
Посмотреть сообщение
When clearing animations reset the players skin using 'GetplayerSkin' and 'SetPlayerSkin' doing this works for me, I used to have the same problem.
LOl,This one works. Thanks!


Re: Cant clear animation? - HuSs3n - 10.09.2012

Quote:
Originally Posted by admigo
Посмотреть сообщение
Heey all,
if i am using my arrows i can turn arround but i cant walk only when i am jumping i can walk again.
Admigo
Код:
ApplyAnimation(playerid, animlib[], animname[], Float:fDelta, loop, lockx, locky, freeze, time, forcesync)
make sure that Freeze is 0


Re: Cant clear animation? - Admigo - 10.09.2012

Quote:
Originally Posted by HuSs3n
Посмотреть сообщение
Код:
ApplyAnimation(playerid, animlib[], animname[], Float:fDelta, loop, lockx, locky, freeze, time, forcesync)
make sure that Freeze is 0
Its 0 but that doesnt cares because 1 is total freeze like toggleplayercontrollable(playerid,1); and i cant walk thats the only problem,i can turn arround:P But SetPlayerSkin fixed it,i dont know why. Maybe bug?