How would I make a derma panel show up upon use()ing an entity?
4 replies, posted
Hello,
I'd like to make an entity that makes a DERMA panel show up upon using it. How would I do this? As I can't find any tutorials or info on doing this. I can find stuff for making derma panels, but not how to trigger them from using an entity.
I don't know if this is the best way but I usually use [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/Player/ConCommand]Player:ConCommand[/url] ie
ply:ConCommand("dermapanel") on use
Use net message.
In the ENT:Use() function (serverside), tell it to send a net message to the player who 'used' that entity. On the client you would net.Receive the message and then run a function to open your Derma panel.
Heres a wonderful tutorial on the net library:
[url]http://wiki.garrysmod.com/page/Net_Library_Usage[/url]
Here's an example of what others are saying: [url]https://dl.dropboxusercontent.com/u/26074909/tutoring/_zipped_code/acecool_npc_jointeam_example.rar[/url]
Sorry, you need to Log In to post a reply to this thread.