How would I go about binding my VGUI menu to a key for my server?
I have added a concommand to open the menu by typing implode into the console, and tested it in sp by adding the lua to lua>autorun>client>resource.lua The problem is I dont know how to make it open by pressing f3. Any help is appreciated.
Afaik F3 is calling ShowSpare2 in the server.
[lua]
-- Replace "HOOK_NAME_HERE" with something like "F3Menu",
-- it's just a hook name, doesn't matter what it is.
-- Replace "COMMAND_NAME_HERE" with your console command's name. Also doesn't matter what it is.
hook.Add("ShowSpare1", "HOOK_NAME_HERE", function(ply)
ply:ConCommand("COMMAND_NAME_HERE")
end)
[/lua]
Hope I could help.
Sorry, you need to Log In to post a reply to this thread.