Download the purchased resource from keymaster - the official site of fivem with purchased resources.
2. Adjusting the script to the default core resources
esx_multicharacter
If you using esx_multicharacter you need change only this, do not change esx_identity
Open @esx_multicharacter/client/main.lua
Search for esx:playerLoaded
Replace the trigger with this one below
RegisterNetEvent('esx:playerLoaded')
AddEventHandler('esx:playerLoaded', function(playerData, isNew, skin)
local spawn = playerData.coords or Config.Spawn
if isNew or not skin or #skin == 1 then
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)
Wait(0)
end
SetPlayerModel(PlayerId(), model)
ResetEntityAlpha(PlayerPedId())
SetModelAsNoLongerNeeded(model)
TriggerEvent('skinchanger:loadSkin', skin, function()
ResetEntityAlpha(PlayerPedId())
SetPedAoBlobRendering(PlayerPedId(), true)
TriggerEvent('vms_charcreator:openCreator')
end)
end
if not isNew then
DoScreenFadeOut(100)
end
SetCamActive(cam, false)
RenderScriptCams(false, false, 0, true, true)
cam = nil
SetEntityCoordsNoOffset(PlayerPedId(), spawn.x, spawn.y, spawn.z, false, false, false, true)
SetEntityHeading(PlayerPedId(), spawn.heading)
if not isNew then
TriggerEvent('skinchanger:loadSkin', skin or Characters[spawned].skin)
Wait(400)
DoScreenFadeIn(400)
repeat Wait(200) until not IsScreenFadedOut()
end
TriggerServerEvent('esx:onPlayerSpawn')
TriggerEvent('esx:onPlayerSpawn')
TriggerEvent('playerSpawned')
TriggerEvent('esx:restoreLoadout')
Characters, hidePlayers = {}, false
end)
esx_identity
If you not using multicharacter system you need change only this
Open @esx_identity/client/main.lua
Search for RegisterNUICallback('register'
Replace the nui callback with this one below
RegisterNUICallback('register', function(data, cb)
if not guiEnabled then
return
end
ESX.TriggerServerCallback('esx_identity:registerIdentity', function(callback)
if not callback then
return
end
ESX.ShowNotification(TranslateCap('thank_you_for_registering'))
setGuiState(false)
if not ESX.GetConfig().Multichar then
TriggerEvent('vms_charcreator:openCreator', data.sex)
end
end, data)
end)
qb-multicharacter
If you using qb-multicharacter you need change this
Open @qb-multicharacter/client/main.lua
Search for qb-multicharacter:client:closeNUIdefault
Replace the trigger with this one below
RegisterNetEvent('qb-multicharacter:client:closeNUIdefault', function() -- This event is only for no starting apartments
DeleteEntity(charPed)
SetNuiFocus(false, false)
DoScreenFadeOut(500)
TriggerServerEvent('QBCore:Server:OnPlayerLoaded')
TriggerEvent('QBCore:Client:OnPlayerLoaded')
Wait(500)
openCharMenu()
SetEntityVisible(PlayerPedId(), true)
Wait(500)
DoScreenFadeIn(250)
TriggerEvent('qb-weathersync:client:EnableSync')
TriggerEvent('vms_charcreator:openCreator')
end)
qb-apartaments
If you have qb-apartaments, open config of this script and set this: