I am trying to make an entity (NPC in this case) popup a panel for the player who uses the entity.
Ex: I press E looking at the NPC (being close to it) and a derma menu should pop up, etc…
Entity -> init.lua ::
function ENT:Use(activator, caller) net.Start("npc_base") net.Send(activator) //I have tried using caller instead. Didn't work. end
Gamemode -> clientside ::
net.Receive("npc_base", function(len, caller) caller:PrintMessage(HUD_PRINTTALK, "npc_base was used!") print("npc_base was used!") end)
- I have added the network string (util.AddNetworkString)
- I have tried sending the net message to both the caller and the activator (nothing worked)
Still, no message is sent…
If you need any other pieces of the code, let me know
Any help is appreciated!