refactor(es_extended/client/main): lowercase ammo

This commit is contained in:
Ilias Rbayti
2024-12-01 00:09:23 +01:00
parent 0fe6ef4b1c
commit d1cdd3584b
+4 -4
View File
@@ -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