Use the same method Garry's Mod uses to detect key presses.

master
Icedream 2015-04-23 21:56:23 +02:00
parent 3a809e213d
commit efba83b6ed
1 changed files with 1 additions and 1 deletions

View File

@ -100,7 +100,7 @@ local function CreateMenu()
end end
hook.Add( "PlayerBindPress", "PlayerBindPressFKeyMenus", function(pl, bind, pressed) hook.Add( "PlayerBindPress", "PlayerBindPressFKeyMenus", function(pl, bind, pressed)
if string.find(bind, "gm_showspare2") then if bind == "gm_showspare2" and pressed then
local menu = CreateMenu() local menu = CreateMenu()
if menu ~= nil then if menu ~= nil then
menu:Open() menu:Open()