SA-MP Forums Archive
Animation and Holding Object - 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: Animation and Holding Object (/showthread.php?tid=512467)



Animation and Holding Object - yancarlos4500 - 10.05.2014

Hello, I need help

I want to make that a player holds an object with an animation. I got That

but everytime the player jumps or fires than the animations stop

How can i make so that the player can't do that


Re: Animation and Holding Object - RenSoprano - 10.05.2014

Try to check for ClearAnimation when jump or fire


Re: Animation and Holding Object - yancarlos4500 - 10.05.2014

But i don't to clearanimation when the player jump or Fires.


Re: Animation and Holding Object - yancarlos4500 - 15.05.2014

anybody knows how?


Re: Animation and Holding Object - Sasino97 - 15.05.2014

Yes, in ApplyAnimation (https://sampwiki.blast.hk/wiki/ApplyAnimation) there are a 'freeze' and a 'time' parameters. Set freeze to true, and time to the amount of time in milliseconds you want the player to be frozen (set 0 for indefinite)


Re: Animation and Holding Object - Riddick94 - 15.05.2014

What's the animation? If it's carrying animation, you can try applying special action:

Код:
 25 - SPECIAL_ACTION_CARRY       - Will apply a 'carrying' animation to the player and make them unable to sprint, jump or punch
Other way, there's none as I can't think of one. Maybe someone else will be able to help and correct me, if I am wrong.

edit://
Quote:
Originally Posted by [GF]Sasino97
Посмотреть сообщение
Yes, in ApplyAnimation (https://sampwiki.blast.hk/wiki/ApplyAnimation) there are a 'freeze' and a 'time' parameters. Set freeze to true, and time to the amount of time in milliseconds you want the player to be frozen (set 0 for indefinite)
I am late, but.. freeze parameter means that at the end of the animation player will NOT get back to the NORMAL ped standing animation. He will just get frozen at the end of the animation and he won't be able to move.


Re: Animation and Holding Object - Sasino97 - 15.05.2014

Quote:
Originally Posted by Riddick94
Посмотреть сообщение
What's the animation? If it's carrying animation, you can try applying special action:

Код:
 25 - SPECIAL_ACTION_CARRY       - Will apply a 'carrying' animation to the player and make them unable to sprint, jump or punch
Other way, there's none as I can't think of one. Maybe someone else will be able to help and correct me, if I am wrong.

edit://


I am late, but.. freeze parameter means that at the end of the animation player will NOT get back to the NORMAL ped standing animation. He will just get frozen at the end of the animation and he won't be able to move.
Oh ok, but I noticed that if you set freeze to 1 and time to 0 it won't let you jump or punch


Re: Animation and Holding Object - yancarlos4500 - 16.05.2014

Quote:
Originally Posted by Riddick94
Посмотреть сообщение
What's the animation? If it's carrying animation, you can try applying special action:

Код:
 25 - SPECIAL_ACTION_CARRY       - Will apply a 'carrying' animation to the player and make them unable to sprint, jump or punch
Other way, there's none as I can't think of one. Maybe someone else will be able to help and correct me, if I am wrong.

edit://


I am late, but.. freeze parameter means that at the end of the animation player will NOT get back to the NORMAL ped standing animation. He will just get frozen at the end of the animation and he won't be able to move.
Thank for the reply. I will try that