Simple Edit : Toggle command for this mod : SIIIMPLEEEEE

Well, I found this mod that uses autorun ini, it makes npc shoot props somehow, anyways i need it to toggle with npcs_hate_props 1 or 0… is that doable?? thanks!!


function PropSpawned(ply, model, prop)
local bull = ents.Create(“npc_bullseye”)
local X = math.random(-30,30)
local Y = math.random(-30,30)
local Pos = prop:LocalToWorld( prop:OBBCenter( ) )
bullpos = Vector(Pos.x + X,Pos.y + Y, Pos.z) – I had to do this so at least some of the bullseyes could be seen by the enemy
bull:SetNotSolid( true )

hook.Add(“PlayerSpawnedProp”,“PropHateSpawn”, PropSpawned)

function NPCSpawn( ply, npc )
npc:Fire( “setrelationship”, “npc_bullseye D_HT 1” )

hook.Add(“PlayerSpawnedNPC”, “PropHateNPC”, NPCSpawn)


Uh, I suck at convars, but I think you can use them for this.

Hopefully someone else can tell you exactly HOW you can do it, using them.

thanks but that did not really help me… tried it and the command does not do anything lol…

CreateConVar(“npc_hate_props”, “0”, {FCVAR_SERVER_CAN_EXECUTE}) – only serverside can toggle this command, and by default npc’s do not hate props.

if GetConVarNumber(“npc_hate_props”) >= 1 then
– npc’s hate props

thanks!! so i just add that to the top??
liiiike this…

if GetConVarNumber(“npc_hate_props”)
or do i need the >=1 then line??

You need the >= because, if the ConVar number is higher or the same as 1 then npc’s hate props.