Trying to open a dpanel when i press a key this should work right?, it seems to not be, im getting no lua errors in the console
[code]hook.Add( "KeyPress", "OpenF4Menu", function( ply, key )
if ( key == IN_ALT2 ) then
BuildF4Menu()
end
end )
function BuildF4Menu()
local DFrame = vgui.Create("DFrame")
DFrame:SetPos()
local w = ScrW() / 2
local h = ScrH() / 2
DFrame:SetSize(500,500)
DFrame:SetPos(w-250, h-250)
end
[/code]
can someone move this to the right section i thought i clicked on the developer tab but i guess not
Sorry, you need to Log In to post a reply to this thread.