Attacking NPC's To Pepole Not In A Faction
#1

I think it can be done, the npc would not be created if the player is a national guard.

Filter Script in use is from https://sampforum.blast.hk/showthread.php?tid=106257&highlight=Attacking+NPCs The Include Is Also There

pawn Код:
#include <a_samp>
#include <attacking_npc>

#define FILTERSCRIPT

public OnFilterScriptInit()
{
    ConnectNPC("Attack_NPC", "1");
    return 0;
}

//We make sure that the NPC spawns before we make it an attacking NPC
public OnPlayerSpawn(playerid)
{
    if(IsPlayerNPC(playerid))
    {
      if(playerid == GetPlayerID("Attack_NPC")) SetTimer("AttackNPC", 5000, 0);
    }
    return 0;
}

forward AttackNPC();
public AttackNPC()
{
    CreateAttackingNPC("Attack_NPC", 0.0, 0.0, 0.0);
          if(IsANG(playerid))
            return 1;
       else if
       return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)