I’ve been looking for a fix for the problem that the vgui will not appear when you press F4 for 2 days now, no one seems to know how to fix it, the file is called vgui/PLoadout.lua and is only included in cl_init as include( ‘vgui/PLoadout.lua’ ) which as far as i know is enough. please if you know how to fix this help me the is driving me mad!
[lua]
function PLoadoutPanel()
local aPanel = vgui.Create( “Frame” )
aPanel:SetSize( 800, 500 )
aPanel:SetPos( 100, 100 )
aPanel:SetVisible( true )
aPanel:MakePopup()
local aButton = vgui.Create( “Button”, aPanel )
aButton:SetText( “Accept” )
aButton:SetPos( 650, 450 )
aButton:SetWide( 100 )
function aButton.DoClick()
aPanel:SetVisible( false )
end
end
function KeyPressed (P, KEY_F4)
PLoadoutPanel()
end
hook.Add( “KeyPress”, “KeyPressedHook”, KeyPressed )
[/lua]
There is no errors what so ever in the console or the client, this file and cl_init is being added to CSlua trough init.lua