SA-MP Forums Archive
Fast Run Using Animation - 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: Fast Run Using Animation (/showthread.php?tid=502402)



Fast Run Using Animation - samp_boy - 23.03.2014

Hi Guys When i Press SPRINT Button The Player Start Runing 100% and when i want to stop i can't why ?
The problem is I can't make them stop



Код:
#define HOLDING(%0) \
    ((newkeys & (%0)) == (%0))
#define RELEASED(%0) \
    (((newkeys & (%0)) != (%0)) && ((oldkeys & (%0)) == (%0)))
Код:
if (HOLDING( KEY_SPRINT ))
{
    if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) { return 1; }
    ApplyAnimation(playerid,"MUSCULAR","MuscleSprint",4.0,1,1,1,1,1);
    return 1;
}
else if (RELEASED( KEY_SPRINT ))
{
    if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) { return 1; }
    ClearAnimations(playerid);
    return 1;
}



Re: Fast Run Using Animation - MP2 - 23.03.2014

Try replacing ClearAnimations with this:

pawn Код:
ApplyAnimation(playerid, "CARRY", "crry_prtial", 4.0, 0, 0, 0, 0, 0);



Re : Re: Fast Run Using Animation - samp_boy - 24.03.2014

Quote:
Originally Posted by MP2
Посмотреть сообщение
Try replacing ClearAnimations with this:

pawn Код:
ApplyAnimation(playerid, "CARRY", "crry_prtial", 4.0, 0, 0, 0, 0, 0);
i will see


Re : Fast Run Using Animation - samp_boy - 24.03.2014

Edit: Thanks Alot!!! +REEEEP :')