NPC Running a Console Command???!!!???

Hello, I am creating a npc that opens up a derma menu. However I am oblivious of how to get it to actually run the console command on player use. Please help

npc’s cant run console commands afaik…

I think he means he wants the menu to show up on the client when they goto an npc and press use.

Thank you for understanding unlike some idiots… Sort of stated and I quote “ENT:Use”

You need to set the entity’s usetype (Entity:SetUseType(SIMPLE_USE)) to make it usable.

[lua]
function ENT:Initialize()
– code

self:SetUseType(SIMPLE_USE)

end
[/lua]

Then, you can use ENT:Use or ENT:AcceptInput and use Player:ConCommand(“command”) to run a console command:

[lua]
function ENT:Use(activator, caller, usetype, value)
activator:ConCommand(“kill”)
end

– If the above doesn’t work, try this instead
function ENT:AcceptInput(input, activator, caller)
if (input == “Use” and activator:IsPlayer()) then
activator:ConCommand(“kill”)
end
end
[/lua]

In this case, using the entity/NPC will kill the player.

Thank you so much man!