SA-MP Forums Archive
Walking styles - 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: Walking styles (/showthread.php?tid=353632)



Walking styles - Euan Hughes - 23.06.2012

Alright so i have got it working i just need to know how can i make it so when the player has stopped pressing the walk button it will stop the walk style

pawn Code:
if (HOLDING(KEY_WALK))
    {
        if(Player[playerid][UsingGangWalkOne] == 1)
        {
            ApplyAnimation(playerid, "PED", "WALK_gang1", 4.0, 1, 1, 1, 1, 1);
        }

    }
If you need any more code just ask me

Thanks


Re: Walking styles - [KHK]Khalid - 23.06.2012

Just set the 5th parameter to 1 for looping.

pawn Code:
ApplyAnimation(playerid, "PED", "Player_Sneak", 4.0, 1, 1, 1, 0, 0);



Re: Walking styles - Grand_Micha - 23.06.2012

There is an older include for this:

http://pastebin.com/W11RsR1L


Re: Walking styles - Euan Hughes - 23.06.2012

Quote:
Originally Posted by HellSphinX
View Post
Just set the 5th parameter to 1 for looping.

pawn Code:
ApplyAnimation(playerid, "PED", "Player_Sneak", 4.0, 1, 1, 1, 0, 0);
But when i have to jump or something else to stop the animation how can i make it so when i stop walking it stops the walk style ?


Re: Walking styles - Euan Hughes - 24.06.2012

Please help


Re: Walking styles - [KHK]Khalid - 24.06.2012

Use OnPlayerKeyStateChange to detect the pressed keys and if it's KEY_JUMP (Find all the availabe keys here) then use ClearAnimations to clear the player's animations.