Opening Derma on ENT:Use

Hopefully quick question, how do you open a derma panel through ENT:Use I have been watching code blue videos and other various tutorials to find out how to do this but none of them really explained running dermas through ENT:Use
any help would be appreciated, thank you.

The server-side waits for the entity to be used, then sends a net message to the client to draw the derma.




--SERVER
util.AddNetworkString("DrawDerma")

function ENT:Use( activator, caller )
    net.Start("DrawDerma")
    net.Send(caller)
end






--CLIENT
net.Receive("DrawDerma", function()
    -- Draw Derma
end )



Thanks it works but its drawing the derma like 8 times every use, anyway to fix?

edit: example if i hold e, it will continue to draw the derma until i stop holding down e

Change the use type on the entity

By this do you mean : ENT.Type = “ai” ?

added Entity:SetUseType( SIMPLE_USE )

fixed now, thanks again