This kid needs to quit raging. Here is the code I used when I first started messing with dermas…
[lua]
function Playermenu()
DermaPanel1 = vgui.Create( “DFrame” )
DermaPanel1:SetPos( 50,25 )
DermaPanel1:SetSize( 500, 500 )
DermaPanel1:SetTitle( “Weapon Menu (Coded by Mat)” )
DermaPanel1:SetVisible( true )
DermaPanel1:SetDraggable( true )
DermaPanel1:ShowCloseButton( true )
DermaPanel1:MakePopup()
local DermaButton1 = vgui.Create( "DButton", DermaPanel1 )
DermaButton1:SetText( "Super Shorty" )
DermaButton1:SetPos( 12.5, 30 )
DermaButton1:SetSize( 100, 25 )
DermaButton1.DoClick = function()
RunConsoleCommand("give", "weapon_supershorty")
end
local DermaButton2 = vgui.Create( "DButton", DermaPanel1 )
DermaButton2:SetText( "Baseball Bat" )
DermaButton2:SetPos( 125.5, 30 )
DermaButton2:SetSize( 100, 25 )
DermaButton2.DoClick = function()
RunConsoleCommand( "give", "weapon_bat" )
end
local DermaButton3 = vgui.Create( "DButton", DermaPanel1 )
DermaButton3:SetText( "AK-47" )
DermaButton3:SetPos( 235, 30 )
DermaButton3:SetSize( 100, 25 )
DermaButton3.DoClick = function()
RunConsoleCommand("give", "weapon_zpsak47")
end
local DermaButton4 = vgui.Create( "DButton", DermaPanel1 )
DermaButton4:SetText( "Glock 18C" )
DermaButton4:SetPos( 345, 30 )
DermaButton4:SetSize( 100, 25 )
DermaButton4.DoClick = function()
RunConsoleCommand("give", "weapon_zpsglock")
end
local DermaButton5 = vgui.Create( "DButton", DermaPanel1 )
DermaButton5:SetText( "Revolver" )
DermaButton5:SetPos( 12.5, 70 )
DermaButton5:SetSize( 100, 25 )
DermaButton5.DoClick = function()
RunConsoleCommand("give", "weapon_zpsrevolver")
end
local DermaButton6 = vgui.Create( "DButton", DermaPanel1 )
DermaButton6:SetText( "Desert Eagle" )
DermaButton6:SetPos( 130.5, 70 )
DermaButton6:SetSize( 100, 25 )
DermaButton6.DoClick = function()
RunConsoleCommand("give", "weapon_zpsdeagle")
end
end
function Hidemenu()
if DermaPanel1:IsVisible() == true then
DermaPanel1:SetVisible(false)
end
end
concommand.Add(“matsmenu”, Playermenu)
concommand.Add("+matsmenu", Playermenu)
concommand.Add("-matsmenu", Hidemenu)
[/lua]
It was a singleplayer menu to give me the weapons for my gamemode, I was making a Left 4 Dead gamemode but I got stuck and stopped.