Hello i have created a menu that opens everytime when a player press LShift + R but it opens also when i am chatting or when i am typing something in the Console. Does anybody know how i can abvoid it from opening the menu when im typing in the chat and typing something in the console?
It won’t be doing that randomly, there will be something in your code making it do that. Can you share your code?
local f3delay = 0 hook.Add("Think", "ShiftRPressCheck", function() -- loop funktion if input.IsKeyDown(KEY_LSHIFT) and input.IsKeyDown(KEY_R) and f3delay < CurTime() then f3delay = CurTime() + 1 -- 1 sekunde delay zwischen nochmal erfasse if ( frame ) then frame:Close() else OpenShiftRMenu() end if ( gui.EnableScreenClicker ) then gui.EnableScreenClicker( false ) end end end) function OpenShiftRMenu() --menu code end
Here is the code
Oh yeah, its probably when you are holding shift to put a capital r then. Like @Florian4016 said use the PlayerButtonDown hook as that wont be called when a panel has keyboard input such as the chatbox or console.
Yeah thx that helped me with my Menu. But i also running a hook which calls if a Player Press a Specifig button like when the Player is Pressing Shift + V then RunConsoleCommand(“ulx” “cloak”)
How do i do it then?
Cant you just do the same thing you did with the menu? Just use the PlayerButtonDown hook again.
Ok butit won’t work for me
Whats the code your using?
Nevermind i got it thx for the Help
Do you know how i can close this Post?
I don’t think you can except the moderators.