Clicking on NPC

Create your mod for Garry’s Mod, wanted to create NPC Shop by pressing the “E” on the NPC, but how do I do that already looked everywhere …

You would create the entity;

And use the ent use function to check when someone presses E on it;

You could use net messages to open a shop vgui for the player

I did everything as a guide only and not Addons in “gamemodes/gamemode/gamemode/entities/npc/citizen_shop/” and writes that this is the NPC does not exist!

Take a look at this, this handles everything: https://dl.dropboxusercontent.com/u/26074909/tutoring/_zipped_code/acecool_npc_jointeam_example.rar

I will be updating that code soon to allow it to be modular so when spawned, you assign an id and that id matches up with an action ( such as open x store or whatever )