I’ve put some derma code in the draw function, but it’s only shown if a value is true - however, it opens the derma for everyone, I only want it to open for the player who click E on it(ENT:Use(ply)). I have set so the Use function changes a network var to 1 which then will make it draw in the cl_init.lua, then it sets the network var to 0. But how can I make it only draw for the ply?
Since you provided no code to help off of, I’m going to go ahead and go out on a limb and give you this. Note, you don’t have to use values to activate the menu since the net message activates the menu only when the player presses ‘e’ on the ent.
Assuming you have ENT:AcceptInput this is what it should look server side. I used net messages to do it here.
function ENT:AcceptInput( name, activator, caller )
if ( name == “Use” && IsValid( activator ) && activator:IsPlayer() ) then
net.Start(“OpenDermaMenu”) --Open the menu for the activator
This should be client side. It receives the sent net message and opens your menu.
–Do your derma stuff here