mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-09-01 10:48:52 +00:00
fix(esx_multicharacter): use correct sex for skin
This commit is contained in:
@@ -273,7 +273,7 @@ if ESX.GetConfig().Multichar then
|
||||
if isNew or not skin or #skin == 1 then
|
||||
local finished = false
|
||||
local sex = skin.sex or 0
|
||||
if sex == 0 then model = mp_m_freemode_01 else model = mp_f_freemode_01 end
|
||||
local model = sex == 0 and mp_m_freemode_01 or mp_f_freemode_01
|
||||
RequestModel(model)
|
||||
while not HasModelLoaded(model) do
|
||||
RequestModel(model)
|
||||
@@ -281,8 +281,11 @@ if ESX.GetConfig().Multichar then
|
||||
end
|
||||
SetPlayerModel(PlayerId(), model)
|
||||
SetModelAsNoLongerNeeded(model)
|
||||
skin = Config.Default
|
||||
skin.sex = sex
|
||||
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()
|
||||
SetPedAoBlobRendering(playerPed, true)
|
||||
|
||||
Reference in New Issue
Block a user