Check if player is in the Crouching animation.
#1

Hello,

I'd like to peform an action, this action depends on if the player is currently standing or crouching.
How do I check if he's in the crouching animation?

It's not about hitting the key, it's just if he's in the animation ( Shooting an M4 from crouching for example ).

Thanks
Reply
#2

GetPlayerSpecialAction(playerid)==1
Reply
#3

pawn Код:
if(GetPlayerState(playerid) != 1) return SendClientMessage(playerid, COLOR_GREY, "   You must be on foot");
Reply
#4

Working now, although I'm stuck with this:
After it peforms the animation, the character just stands up. While it's supposed to crouch.

Anyone?

Код:
	            
if (GetPlayerSpecialAction(playerid)== SPECIAL_ACTION_DUCK)
{
     ApplyAnimation(playerid,"COLT45","colt45_crouchreload",10.1,0,0,0,0,0,0);
     SendClientMessage(playerid,red,"Go back in prone animation");
     SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DUCK);
}
Reply
#5

SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DUC K); ->> INVALID

U CANT MAKE THE PLAYER CROUCH!! READ THE WIKI

SPECIAL_ACTION_DUCK *
(*) These Special Actions cannot be set.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)