whether it is possible to make the NPC authorization in turrets
Rust NPC turret use
Discussion in 'Plugin Requests' started by HISHNIK__, Dec 16, 2016.
-
HumnNPC Plugin - I assign the kits to the NPC as normal but they do not seem to be able to use the guns or wear the clothing.
Is it possible to authorize NPC on turrets? -
But much simplier would be to exlude them only from being targeted by turrets. -
-
Code:object OnTurretTarget(AutoTurret turret, BaseCombatEntity entity) { if (entity != null && entity is BasePlayer && (entity as BasePlayer).IsAdmin()) return true; return null; }
-
What needs to be changed, to exclude NPCs from being targeted? I tried looking in HumanNPC for anything but I just get this
Code:"Error while compiling: TurretConfig.cs(592,27): error CS0103: The name `npc' does not exist in the current context Error while compiling: TurretConfig.cs(592,27): error CS0103: The name `Humannpcs' does not exist in the current context Error while compiling: TurretConfig.cs(592,27): error CS0103: The name `npc' does not exist in the current context Error while compiling: TurretConfig.cs(592,27): error CS0103: The name `HumanPlayer' does not exist in the current"
-
if you do the above checks and determine that entity is a BasePlayer,
then you can do
Code:if (entity.userID.IsSteamId())