Need help with this piece of code.


function ScanVGUI:Init()
	self = vgui.Create("DFrame")
	self:SetTitle("Scan Interface -BaseWars")
	self:SetDeleteOnClose(true)
	self:SetKeyboardInputEnabled(true)
	self:SetMouseInputEnabled(true)
	self:SetSize(600,500)
	self:SetPos(ScrW()/2,ScrH()/2)
	self:SetDraggable(false)
	self:Center()
	self:MakePopup()

When i press F2 To open it, It opens for everyone on the server?.
I was thinking would it work if i put it to


self = local.vgui.create("dframe")

Any help is appreciated

Please provide all of the code. Especially the part where pressing F2 is supposed to open it.

If you are sending a usermessage when you press f2, you most likely did not specify any recipients.

Use this on the serverside code to open with F2.

[lua]
hook.Add( “ShowTeam”, “OpenPls”, function( ply )
umsg.Start( “NAME”, ply )
umsg.End()
end )
[/lua]
Make sure you add that player variable, in this case, ‘ply’ after the Name of the usermessage, or else it will open it for everybody.

Hey, Seagull. I love your youtube videos :smiley: