mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 23:01:30 +00:00
Minor adjustments
This commit is contained in:
+1
-1
@@ -56,7 +56,7 @@ AddEventHandler('esx:playerLoaded', function(playerData)
|
||||
ESX.Game.Teleport(playerPed, {
|
||||
x = playerData.coords.x,
|
||||
y = playerData.coords.y,
|
||||
z = playerData.coords.z + 0.25,
|
||||
z = playerData.coords.z + 0.5,
|
||||
heading = playerData.coords.heading
|
||||
}, function()
|
||||
isLoadoutLoaded, isDead = true, false
|
||||
|
||||
@@ -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