Animation help.. please - 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: Animation help.. please (
/showthread.php?tid=353712)
Animation help.. please -
Euan Hughes - 24.06.2012
So im making walking styles and its all fine apart from one thing, I have made it so if your holding the walk button you do the walking animation but how would i do it only if someone presses the walk button with up down left or right.. Also one more thing how could i make it so when someone stops holding the walk button they stop the walking animation
Please help
pawn Код:
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
Please help
Thanks
Re: Animation help.. please -
phillip875 - 24.06.2012
Try this:
pawn Код:
if(HOLDING(newkeys & KEY_WALK)
{
if(Player[playerid][UsingGangWalkOne] == 1)
{
ApplyAnimation(playerid, "PED", "WALK_gang1", 4.0, 1, 1, 1, 1, 1);
}
}
Re: Animation help.. please -
Grand_Micha - 24.06.2012
Use this to ensure the animation stops when you release the key. Add your own variables and booleans, of course.
Код:
else if (RELEASED(KEY_WALK))
{
ApplyAnimation(playerid, "CARRY", "crry_prtial", 4.0, 0, 0, 0, 0, 0, 1);
}