SA-MP Forums Archive
Detecting if a player is sprinting? - 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: Detecting if a player is sprinting? (/showthread.php?tid=563698)



Detecting if a player is sprinting? - Dokins - 16.02.2015

pawn Код:
if(HOLDING(KEY_UP | KEY_SPRINT) && LLegBr[playerid] == 1 || RLegBr[playerid] == 1)
    {
        ApplyAnimation(playerid, "PED", "FALL_front", 4.0, 1, 0, 0, 0, 0,1);
    }
This is What I've got so far? it won't make them fall, but I don't understand how to detect fully, is this close?


Re: Detecting if a player is sprinting? - CalvinC - 17.02.2015

They can move other directions than forwards while sprinting, and also you should check if they're on foot.