• Binding Q to Derma Menu
    4 replies, posted
My menu function is called MenuInventory, I was wondering how I bind it to the derma menu I have in that function. Thanks
are you coding this as part of a gamemode?
Yeah. I derived it from sandbox but havn't included everything from it because i don't want the default Q spawn menu I wanna use it for inventory
[url]http://bananatree.im/wiki/wiki.garrysmod.com/index8042.html?title=Gamemode.SpawnMenuOpen[/url] Just paste your code for the menu or whatever you want to do then return false.
[code] local function MenuInventory() local frame = vgui.Create( "DFrame" ) frame:SetPos( ScrW() / 4, ScrH() / 4 ) frame:SetSize( 500, 350 ) frame:SetTitle( "Inventory" ) frame:SetVisible( true ) frame:SetDraggable( true ) frame:ShowCloseButton( true ) frame:MakePopup() return false end hook.Add( "SpawnMenuOpen", "MenuInventory", MenuInventory) [/code] Like this?
Sorry, you need to Log In to post a reply to this thread.