SA-MP Forums Archive
Variable for whether the person is crouching - 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: Variable for whether the person is crouching (/showthread.php?tid=361175)



Variable for whether the person is crouching - Ultrascipter - 20.07.2012

Hello,

I wonder if there is a variable to detect if the person is crouching.
It'll be my varaible does not use an animation when you are crouching.

Thank you.


Re: Variable for whether the person is crouching - Stigg - 20.07.2012

Try looking at:

https://sampwiki.blast.hk/wiki/OnPlayerKeyStateChange


Re: Variable for whether the person is crouching - Andi_Evandy - 20.07.2012

try SPECIAL_ACTION_DUCK in "GetPlayerSpecialAction" function
example:
pawn Код:
if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_DUCK) return SendClientMessage(playerid, 0xFF0000FF, "You can't use any animation while you're crouching.");



Re : Variable for whether the person is crouching - Ultrascipter - 20.07.2012

Thanks Andi + rep