Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [ERROR] gamemodes/test/gamemode/custom_menu.lua:5: attempt to index global 'vgui' (a nil value)
- 1. unknown - gamemodes/test/gamemode/custom_menu.lua:5
- 2. unknown - lua/includes/modules/concommand.lua:54
- local Menu
- function gameMenu()
- if (Menu == nil) then
- Menu = vgui.Create( "DFrame" )
- Menu:SetSize(500,500)
- Menu:SetTitle("GameMode")
- Menu:SetDraggable(false)
- Menu:ShowCloseButton(false)
- Menu:SetPos(ScrW()/2 - 250, ScrH()/ 2 - 250)
- Menu:SetDeleteOnClose(false)
- Menu.Paint = function()
- surface.SetDrawColor(60,60,60,255)
- surface.DrawRect(0,0,Menu:GetWide(),Menu:GetTall() )
- surface.SetDrawColor(40,40,40,255)
- surface.DrawRect(0,24,Menu:GetWide(),1)
- end
- else
- if (Menu:IsVisible()) then
- Menu:SetVisible(false)
- gui.EnableScreenClicker(false)
- else
- Menu:SetVisible(true)
- gui.EnableScreenClicker(true)
- end
- end
- end
- concommand.Add("open_game_menu", gameMenu)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement