INVENTORY KEYBIND CONFLICT
The Inventory quick access keybind conflicts with the Emote menu. The Emote menu uses SHIFT + 1 TO 9
, while the Inventory typically uses 1 TO 6
. When attempting to access items on the inventory hotbar or use an emote, both actions are triggered simultaneously. Here’s how to resolve the issue:
Navigate to this directory:
qb-inventory\client\main.lua
Locate this:
for i = 1, 6 do
RegisterCommand('slot' .. i, function()
if not PlayerData.metadata['isdead'] and not PlayerData.metadata['inlaststand'] and not PlayerData.metadata['ishandcuffed'] and not IsPauseMenuActive() and not LocalPlayer.state.inv_busy then
if i == 6 then
i = Config.MaxInventorySlots
end
TriggerServerEvent('inventory:server:UseItemSlot', i)
closeInventory()
end
end, false)
RegisterKeyMapping('slot' .. i, Lang:t('inf_mapping.use_item') .. i, 'keyboard', i)
end
Replace it with this:
for i = 1, 6 do
RegisterCommand('slot' .. i, function()
if IsControlPressed(0, 21) or IsControlPressed(0, 36) or IsControlPressed(0, 19) then -- This line added
return
end
if not PlayerData.metadata['isdead'] and not PlayerData.metadata['inlaststand'] and not PlayerData.metadata['ishandcuffed'] and not IsPauseMenuActive() and not LocalPlayer.state.inv_busy then
if i == 6 then
i = Config.MaxInventorySlots
end
TriggerServerEvent('inventory:server:UseItemSlot', i)
closeInventory()
end
end, false)
RegisterKeyMapping('slot' .. i, Lang:t('inf_mapping.use_item') .. i, 'keyboard', i)
end