Faster running using animation
#2

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

// RELEASED(keys)
#define RELEASED(%0) \
    (((newkeys & (%0)) != (%0)) && ((oldkeys & (%0)) == (%0)))
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)