mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-09-04 08:13:21 +00:00
Compatibility with old loadouts prior to components update, fixes #194
This commit is contained in:
@@ -179,6 +179,13 @@ AddEventHandler('es:playerLoaded', function(source, _player)
|
||||
|
||||
if result[1].loadout ~= nil then
|
||||
userData.loadout = json.decode(result[1].loadout)
|
||||
|
||||
-- Compatibility with old loadouts prior to components update
|
||||
for k,v in ipairs(userData.loadout) do
|
||||
if v.components == nil then
|
||||
v.components = {}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if result[1].position ~= nil then
|
||||
|
||||
Reference in New Issue
Block a user