Skip to content

Commit

Permalink
refactor(es_extended/client/main): use esx function for keymapping
Browse files Browse the repository at this point in the history
  • Loading branch information
Thekuca authored Dec 22, 2023
1 parent 1c530ac commit 47920b7
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions [core]/es_extended/client/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -453,13 +453,11 @@ function StartServerSyncLoops()
end

if not Config.OxInventory and Config.EnableDefaultInventory then
RegisterCommand('showinv', function()
if not ESX.PlayerData.dead then
ESX.ShowInventory()
end
end)

RegisterKeyMapping('showinv', TranslateCap('keymap_showinventory'), 'keyboard', 'F2')
ESX.RegisterInput('showinv', TranslateCap('keymap_showinventory'), 'keyboard', 'F2', function()
if not ESX.PlayerData.dead then
ESX.ShowInventory()
end
end)
end

-- disable wanted level
Expand Down

0 comments on commit 47920b7

Please sign in to comment.