SA-MP Forums Archive
Help, OnPlayerKeyStateChange - 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: Help, OnPlayerKeyStateChange (/showthread.php?tid=297887)



Help, OnPlayerKeyStateChange - MickJ - 18.11.2011

I tried doing a code that when you press KEY_SPRINT, the animation of the player should be cleared, without typing a command, but when I try it, It doesn't work, any suggestions on how will I make it work?


pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if (PRESSED(KEY_FIRE))
    {
        ApplyAnimation(playerid, "CARRY", "crry_prtial", 2.0, 0, 0, 0, 0, 0)
            return 1;
         }
    return 1;
}



Re: Help, OnPlayerKeyStateChange - Stigg - 18.11.2011

Try:
pawn Код:
ClearAnimations(playerid);
https://sampwiki.blast.hk/wiki/ClearAnimations