im trying to make a entity where you press e on it and it makes a derma panel
but every time i press e on it opens up 6 derma pannels how can i make it so it only opens once on multiplayer
i currently have how can i make this work on multiplayer or will this work on multiplayer i dont have another person or a server so i can't check if this would work on multiplayer i know the code if have right now works on single player
net.Receive("SWRPOpenShopMenu", openmenu)
function openmenu()
if !isopen then
isopen = true
local Frame = vgui.Create( "DFrame" )
Frame:SetPos( ScrW()/2, ScrH()/2 )
Frame:SetSize( 300, 150 )
Frame:SetTitle( "Name window" )
Frame:SetVisible( true )
Frame:SetDraggable( false )
Frame:ShowCloseButton( true )
Frame:MakePopup()
Frame:Center()
local close = vgui.Create("DButton", Frame )
close:SetText("Close")
close:SetSize(10,10)
close:Center()
close.DoClick = function()
Frame:Remove()
isopen = false
Entity/SetUseType
openmenu is nil when you call net.Receive?
@gonzo thanks
@LoweChaser im not having any issues with that i was just trying to figure out how to make the use button only hit once
Sorry, you need to Log In to post a reply to this thread.