22.11.2014, 08:23
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;
}