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



Dive animation? - Necip - 02.08.2013

Which anim is the one who dives underwater? I mean when you press Left Click and dive, which animation is it? And how to check if an animation is being used by a player? I mean the Dive animation, how to check if a Player dives?


Re: Dive animation? - PrinceKumar - 02.08.2013

I don't know which anim it is but u can check anim with it:
if(GetPlayerAnimationIndex(playerid))


Re: Dive animation? - Necip - 02.08.2013

Can you show me an example?


Re: Dive animation? - maxpain43 - 02.08.2013

Just make it this way:
Код:
ApplyAnimation(playerid,"SWIM","SWIM_crawl",6.1,1,1,1,1,0,1);



Re: Dive animation? - RedJohn - 02.08.2013

SWIM

Swim_Breast
SWIM_crawl
Swim_Dive_Under
Swim_Glide
Swim_jumpout
Swim_Tread
Swim_Under

Maybe this?


Re: Dive animation? - PrinceKumar - 02.08.2013

If swim dive under is anim then use it to check
if(GetPlayerAnimationIndex(playerid))
{
new animlib[32];
new animname[32];

GetAnimationName(GetPlayerAnimationIndex(playerid) ,animlib,32,animname,32);
if(!strcmp(animname, "swim dive under", true)){