mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 08:01:24 +00:00
fix(esx_multicharacter & es_extended): Character not loading
This commit is contained in:
@@ -298,8 +298,18 @@ function loadESXPlayer(identifier, playerId, isNew)
|
||||
TriggerEvent('esx:playerLoaded', playerId, xPlayer, isNew)
|
||||
|
||||
xPlayer.triggerEvent('esx:playerLoaded',
|
||||
{accounts = xPlayer.getAccounts(), coords = xPlayer.getCoords(), identifier = xPlayer.getIdentifier(), inventory = xPlayer.getInventory(),
|
||||
job = xPlayer.getJob(), loadout = xPlayer.getLoadout(), maxWeight = xPlayer.getMaxWeight(), money = xPlayer.getMoney(), dead = false}, isNew,
|
||||
{
|
||||
accounts = xPlayer.getAccounts(),
|
||||
coords = xPlayer.getCoords(),
|
||||
identifier = xPlayer.getIdentifier(),
|
||||
inventory = xPlayer.getInventory(),
|
||||
job = xPlayer.getJob(),
|
||||
loadout = xPlayer.getLoadout(),
|
||||
maxWeight = xPlayer.getMaxWeight(),
|
||||
money = xPlayer.getMoney(),
|
||||
sex = xPlayer.get("sex") or "m",
|
||||
dead = false
|
||||
}, isNew,
|
||||
userData.skin)
|
||||
|
||||
if not Config.OxInventory then
|
||||
|
||||
@@ -272,8 +272,9 @@ if ESX.GetConfig().Multichar then
|
||||
local spawn = playerData.coords or Config.Spawn
|
||||
if isNew or not skin or #skin == 1 then
|
||||
local finished = false
|
||||
local sex = skin.sex or 0
|
||||
local model = sex == 0 and mp_m_freemode_01 or mp_f_freemode_01
|
||||
skin = Config.Default[playerData.sex]
|
||||
skin.sex = playerData.sex == "m" and 0 or 1
|
||||
local model = skin.sex == 0 and mp_m_freemode_01 or mp_f_freemode_01
|
||||
RequestModel(model)
|
||||
while not HasModelLoaded(model) do
|
||||
RequestModel(model)
|
||||
@@ -281,13 +282,8 @@ if ESX.GetConfig().Multichar then
|
||||
end
|
||||
SetPlayerModel(PlayerId(), model)
|
||||
SetModelAsNoLongerNeeded(model)
|
||||
while not ESX.PlayerData.sex do
|
||||
Wait(0)
|
||||
end
|
||||
skin = Config.Default[ESX.PlayerData.sex]
|
||||
skin.sex = ESX.PlayerData.sex == "m" and 0 or 1
|
||||
TriggerEvent('skinchanger:loadSkin', skin, function()
|
||||
playerPed = PlayerPedId()
|
||||
local playerPed = PlayerPedId()
|
||||
SetPedAoBlobRendering(playerPed, true)
|
||||
ResetEntityAlpha(playerPed)
|
||||
TriggerEvent('esx_skin:openSaveableMenu', function()
|
||||
|
||||
Reference in New Issue
Block a user