how to detect if a player aiming a npc
#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


Messages In This Thread
how to detect if a player aiming a npc - by 3417512908 - 12.11.2018, 09:27
Re: how to detect if a player aiming a npc - by ReD_HunTeR - 12.11.2018, 09:51

Forum Jump:


Users browsing this thread: 1 Guest(s)