From d1cdd3584b6d2c2dc46e1f62ca9eb491d5f1d90f Mon Sep 17 00:00:00 2001 From: Ilias Rbayti <63159154+Kenshiin13@users.noreply.github.com> Date: Sun, 1 Dec 2024 00:09:23 +0100 Subject: [PATCH] refactor(es_extended/client/main): lowercase ammo --- [core]/es_extended/client/main.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/[core]/es_extended/client/main.lua b/[core]/es_extended/client/main.lua index a4d1daa9..2b82a1d1 100644 --- a/[core]/es_extended/client/main.lua +++ b/[core]/es_extended/client/main.lua @@ -288,7 +288,7 @@ function StartServerSyncLoops() if Config.CustomInventory then return end -- keep track of ammo CreateThread(function() - local currentWeapon = { Ammo = 0 } + local currentWeapon = { ammo = 0 } while ESX.PlayerLoaded do local sleep = 1500 if GetSelectedPedWeapon(ESX.PlayerData.ped) ~= -1569615261 then @@ -298,11 +298,11 @@ function StartServerSyncLoops() if weapon then local ammoCount = GetAmmoInPedWeapon(ESX.PlayerData.ped, weaponHash) if weapon.name ~= currentWeapon.name then - currentWeapon.Ammo = ammoCount + currentWeapon.ammo = ammoCount currentWeapon.name = weapon.name else - if ammoCount ~= currentWeapon.Ammo then - currentWeapon.Ammo = ammoCount + if ammoCount ~= currentWeapon.ammo then + currentWeapon.ammo = ammoCount TriggerServerEvent("esx:updateWeaponAmmo", weapon.name, ammoCount) end end