From fa52482720d756166cb86fef9ca89de170429977 Mon Sep 17 00:00:00 2001 From: SNAILX Date: Wed, 29 Oct 2025 01:54:53 +0100 Subject: [PATCH] Fix keybind command order for proper validation --- [core]/esx_lib/imports/addKeybind/client.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/[core]/esx_lib/imports/addKeybind/client.lua b/[core]/esx_lib/imports/addKeybind/client.lua index 8533c8f7..01233d11 100644 --- a/[core]/esx_lib/imports/addKeybind/client.lua +++ b/[core]/esx_lib/imports/addKeybind/client.lua @@ -81,16 +81,16 @@ function xLib.addKeybind(command_name, label, input_group, key, on_press, on_rel keybinds[data.name] = setmetatable(data, keybind_mt) RegisterCommand('+' .. data.name, function() + if not keybinds[data.name] then return end if data.disabled or IsPauseMenuActive() then return end data.isPressed = true - if not keybinds[data.name] then return end if data.onPressed then data:onPressed() end end) RegisterCommand('-' .. data.name, function() + if not keybinds[data.name] then return end if data.disabled or IsPauseMenuActive() then return end data.isPressed = false - if not keybinds[data.name] then return end if data.onReleased then data:onReleased() end end)