fix(es_extended/server): dont return on player creation

This commit is contained in:
Kasey FItton
2024-11-09 00:37:10 +00:00
parent 6f08b59e25
commit a1d482b98b
+13 -14
View File
@@ -226,22 +226,21 @@ function loadESXPlayer(identifier, playerId, isNew)
-- Loadout
if not Config.CustomInventory then
if not result.loadout or result.loadout == "" then
return
end
if result.loadout and result.loadout ~= "" then
local loadout = json.decode(result.loadout)
for name, weapon in pairs(loadout) do
local label = ESX.GetWeaponLabel(name)
local loadout = json.decode(result.loadout)
for name, weapon in pairs(loadout) do
local label = ESX.GetWeaponLabel(name)
if label then
userData.loadout[#userData.loadout + 1] = {
name = name,
ammo = weapon.ammo,
label = label,
components = weapon.components or {},
tintIndex = weapon.tintIndex or 0,
}
if label then
userData.loadout[#userData.loadout + 1] = {
name = name,
ammo = weapon.ammo,
label = label,
components = weapon.components or {},
tintIndex = weapon.tintIndex or 0,
}
end
end
end
end