put his line on top of the qb-clothing/client/main.lua
local CreateFirstCharacter = false
open qb-clothing/client/main.lua
and replace this close callback.
RegisterNUICallback('close', function()
SetNuiFocus(false, false)
if CreateFirstCharacter then
TriggerEvent('ds-cutscene:start')
end
CreateFirstCharacter = false
creatingCharacter = false
disableCam()
FreezeEntityPosition(PlayerPedId(), false)
end)
find qb-clothes:client:CreateFirstCharacter
event and replace with this.
RegisterNetEvent('qb-clothes:client:CreateFirstCharacter')
AddEventHandler('qb-clothes:client:CreateFirstCharacter', function()
CreateFirstCharacter = true
QBCore.Functions.GetPlayerData(function(PlayerData)
local skin = "mp_m_freemode_01"
openMenu({
{menu = "character", label = "Character", selected = true},
{menu = "clothing", label = "Features", selected = false},
{menu = "accessoires", label = "Accessories", selected = false}
})
if PlayerData.charinfo.gender == 1 then
skin = "mp_f_freemode_01"
end
ChangeToSkinNoUpdate(skin)
SendNUIMessage({
action = "ResetValues",
})
end)
end)
open esx_skin/client/main.lua
and edit replace below code or add lines as per example image.
local newCharacter = false --- add this line before below function
function OpenSaveableMenu(submitCb, cancelCb, restrict)
TriggerEvent('skinchanger:getSkin', function(skin) lastSkin = skin end)
OpenMenu(function(data, menu)
menu.close()
DeleteSkinCam()
TriggerEvent('skinchanger:getSkin', function(skin)
TriggerServerEvent('esx_skin:save', skin)
if newCharacter then --- add this lines here
TriggerEvent('ds-cutscene:start') --- add this lines here
newCharacter = false --- add this lines here
end
if submitCb ~= nil then
submitCb(data, menu)
end
end)
end, cancelCb, restrict)
end
AddEventHandler('esx_skin:playerRegistered', function()
CreateThread(function()
while not ESX.PlayerLoaded do
Wait(100)
end
if firstSpawn then
newCharacter = true --- add this lines here
ESX.TriggerServerCallback('esx_skin:getPlayerSkin', function(skin, jobSkin)
if skin == nil then
TriggerEvent('skinchanger:loadSkin', {sex = 0}, OpenSaveableMenu)
Wait(100)
skinLoaded = true
else
TriggerEvent('skinchanger:loadSkin', skin)
Wait(100)
skinLoaded = true
end
end)
firstSpawn = false
end
end)
end)
Trigger below client side event when you want to start cutscene.
you can trigger after player close clothing menu on player create new creaction.
TriggerEvent('ds-cutscene:start')
Find qb-clothes:client:CreateFirstCharacter
event and replace with this.
RegisterNetEvent('qb-clothes:client:CreateFirstCharacter', function()
QBCore.Functions.GetPlayerData(function(pd)
local skin = 'mp_m_freemode_01'
if pd.charinfo.gender == 1 then
skin = "mp_f_freemode_01"
end
exports['fivem-appearance']:setPlayerModel(skin)
-- Fix for tattoo's appearing when creating a new character
local ped = PlayerPedId()
exports['fivem-appearance']:setPedTattoos(ped, {})
ClearPedDecorations(ped)
QBCore.Functions.TriggerCallback("QBCore:HasPermission", function(permission)
local config = getConfigForPermission(permission)
exports['fivem-appearance']:startPlayerCustomization(function(appearance)
if (appearance) then
TriggerServerEvent('fivem-appearance:server:saveAppearance', appearance)
--TriggerEvent('introCinematic:start')
TriggerEvent('ds-cutscene:start')
end
end, config)
end, Config.PedMenuGroup)
end)
end)
go to illenium-appearance/client/client.lua
and replace this function
function InitializeCharacter(gender, onSubmit, onCancel)
SetInitialClothes(Config.InitialPlayerClothes[gender])
local config = getNewCharacterConfig()
TriggerServerEvent("illenium-appearance:server:ChangeRoutingBucket")
client.startPlayerCustomization(function(appearance)
TriggerEvent('ds-cutscene:start')
if (appearance) then
TriggerServerEvent("illenium-appearance:server:saveAppearance", appearance)
if onSubmit then
onSubmit()
end
elseif onCancel then
onCancel()
end
Framework.CachePed()
TriggerServerEvent("illenium-appearance:server:ResetRoutingBucket")
end, config)
end