From f7ec1f9fe2c9cf9470b23f116474a7b40bafc8cf Mon Sep 17 00:00:00 2001 From: Arctos2win <116841243+Arctos2win@users.noreply.github.com> Date: Sun, 17 Sep 2023 15:17:15 +0200 Subject: [PATCH] update weapons loop --- [core]/es_extended/client/functions.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/[core]/es_extended/client/functions.lua b/[core]/es_extended/client/functions.lua index 80f38cc9..c4b74ae2 100644 --- a/[core]/es_extended/client/functions.lua +++ b/[core]/es_extended/client/functions.lua @@ -1077,7 +1077,8 @@ function ESX.ShowInventory() elements[1].title = TranslateCap('inventory', currentWeight, Config.MaxWeight) - for _, v in ipairs(Config.Weapons) do + for i=1, #Config.Weapons do + local v = Config.Weapons[i] local weaponHash = joaat(v.name) if HasPedGotWeapon(playerPed, weaponHash, false) then @@ -1096,8 +1097,8 @@ function ESX.ShowInventory() canRemove = true } end - end - + end + ESX.CloseContext() ESX.OpenContext("right", elements, function(_, element)