Detect if player aiming.
#2

pawn Код:
stock IsPlayerAiming(playerid)
{
    new anim = GetPlayerAnimationIndex(playerid);
    if (((anim >= 1160) && (anim <= 1163)) || (anim == 1167) || (anim == 1365) ||
    (anim == 1643) || (anim == 1453) || (anim == 220)) return 1;
    return 0;
}

public OnPlayerUpdate(playerid) // You can put under OnPlayerTakeDamage or others to detect players is aiming
{
        if(IsPlayerAiming(playerid))
        {
                //Your some thing do here
        }
        return 1;
}
Reply


Messages In This Thread
Detect if player aiming. - by Banditukas - 22.11.2014, 07:51
Re: Detect if player aiming. - by MasonSFW - 22.11.2014, 08:23

Forum Jump:


Users browsing this thread: 1 Guest(s)