how to detect if a player aiming a npc
#1

it's possible?
Reply
#2

yes
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys & KEY_AIM) //When player aims
    {
        new targetplayer = GetPlayerTargetPlayer(playerid); //this functions helps us to find out that if player is aiming other player or NPC
        if(IsPlayerNPC(targetplayer)) //if target player is npc
        {
            //Blabla
        }
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)