How to make an NPC/Entity make a menu when pressing the "use" key on it?
3 replies, posted
I'm trying to make an NPC or an Entity in Garry's Mod have a menu pop up when I hit "use" on them, but I can't seem to figure it out. Really really new to coding, would appreciate help. Sorry if it's already on the wiki, but I can't find it.
There really needs to be some kind of collaborative user-created snippet page or something.. too many questions get asked over and over again.
Google for gmod NPC shop and you'll find code for it.
Could have some outdated code, but you could take a look at this
[url]https://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index7853.html[/url]
[URL="https://wiki.garrysmod.com/page/Net_Library_Usage"]https://wiki.garrysmod.com/page/Net_Library_Usage[/URL]
[url]https://www.youtube.com/watch?v=ODlGyS6lR1M[/url]
[lua]
function ENT:Use( activator, caller )
// bleh
end
[/lua]
Sorry, you need to Log In to post a reply to this thread.