mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-09-04 08:13:21 +00:00
Minor adjustments
This commit is contained in:
@@ -168,7 +168,7 @@ ESX.SavePlayer = function(xPlayer, cb)
|
||||
['@group'] = xPlayer.getGroup(),
|
||||
['@loadout'] = json.encode(xPlayer.getLoadout(true)),
|
||||
['@position'] = json.encode(xPlayer.getCoords()),
|
||||
['@identifier'] = xPlayer.identifier,
|
||||
['@identifier'] = xPlayer.getIdentifier(),
|
||||
['@inventory'] = json.encode(xPlayer.getInventory(true))
|
||||
}, function(rowsChanged)
|
||||
cb()
|
||||
|
||||
+6
-6
@@ -131,6 +131,10 @@ function loadESXPlayer(identifier, playerId)
|
||||
})
|
||||
end
|
||||
|
||||
table.sort(userData.inventory, function(a, b)
|
||||
return a.label < b.label
|
||||
end)
|
||||
|
||||
-- Group
|
||||
if result[1].group then
|
||||
userData.group = result[1].group
|
||||
@@ -138,10 +142,6 @@ function loadESXPlayer(identifier, playerId)
|
||||
userData.group = 'user'
|
||||
end
|
||||
|
||||
table.sort(userData.inventory, function(a, b)
|
||||
return a.label < b.label
|
||||
end)
|
||||
|
||||
-- Loadout
|
||||
if result[1].loadout and result[1].loadout ~= '' then
|
||||
local loadout = json.decode(result[1].loadout)
|
||||
@@ -184,12 +184,12 @@ function loadESXPlayer(identifier, playerId)
|
||||
xPlayer.triggerEvent('esx:playerLoaded', {
|
||||
accounts = xPlayer.getAccounts(),
|
||||
coords = xPlayer.getCoords(),
|
||||
identifier = xPlayer.identifier,
|
||||
identifier = xPlayer.getIdentifier(),
|
||||
inventory = xPlayer.getInventory(),
|
||||
job = xPlayer.getJob(),
|
||||
loadout = xPlayer.getLoadout(),
|
||||
maxWeight = xPlayer.maxWeight,
|
||||
money = xPlayer.getMoney(),
|
||||
money = xPlayer.getMoney()
|
||||
})
|
||||
|
||||
xPlayer.triggerEvent('esx:createMissingPickups', ESX.Pickups)
|
||||
|
||||
Reference in New Issue
Block a user