SA-MP Forums Archive
GetActorAnimation - 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: GetActorAnimation (/showthread.php?tid=616081)



GetActorAnimation - MerryDeer - 31.08.2016

Hi,

It's possible to get current player actor animation? like GetPlayerAnimationIndex?


Re: GetActorAnimation - d1git - 31.08.2016

Removed.


Re: GetActorAnimation - Threshold - 31.08.2016

As far as I'm aware, no. However, you must use ApplyActorAnimation every time you want to give an actor an animation... so you always have that information available to you. Just hook ApplyActorAnimation or create a function of your own.

Eg.
PHP код:
new actorlib[20];
new 
actoranimname[20];

ApplyActorAnimationEx(actoridanimlib[], animname[], Float:fDeltalooplockxlockyfreezetime)
{
    
format(actorlibsizeof(actorlib), "%s"animlib);
    
format(actoranimnamesizeof(actoranimname), "%s"animname);
    
// other stuff
    
return ApplyActorAnimation(actoridanimlibanimnamefDeltalooplockxlockyfreezetime);