Faster running using animation
#1

Hi, I'm trying to make certain team able to run faster then others (using animation) when they hold sprint button (space)
The problem is I can't make them stop when I release sprint button, they just continue running even though I'm not holding any button

Codes:
pawn Код:
#define HOLDING(%0) \
    ((newkeys & (%0)) == (%0))
#define RELEASED(%0) \
    (((newkeys & (%0)) != (%0)) && ((oldkeys & (%0)) == (%0)))
pawn Код:
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;
}
Reply


Messages In This Thread
Faster running using animation - by Fmfan - 27.05.2012, 21:39
Re: Faster running using animation - by CidadeNovaRP - 27.05.2012, 21:45
Re: Faster running using animation - by Fmfan - 27.05.2012, 21:50
Re: Faster running using animation - by CidadeNovaRP - 27.05.2012, 21:52
Re: Faster running using animation - by Fmfan - 27.05.2012, 21:56
Re: Faster running using animation - by CidadeNovaRP - 27.05.2012, 21:59
Re: Faster running using animation - by Fmfan - 27.05.2012, 22:03

Forum Jump:


Users browsing this thread: 1 Guest(s)