Clothing

To get the cutscene script working, you'll need to configure it with your clothing script. Below are the default setups for supported clothing scripts.

Supported clothing scripts:

If your clothing script isn’t listed, join our Discord and open a support ticket to check if your script is compatible with the cutscene resource.

  1. Open the main.lua file in the qb-clothing/client folder.

  2. Insert the following code above or below the line local creatingCharacter = false (around line 3):

local CreateFirstCharacter = false
  1. Replace the event RegisterNetEvent('qb-clothes:client:CreateFirstCharacter') with the code below:

RegisterNetEvent('qb-clothes:client:CreateFirstCharacter')
AddEventHandler('qb-clothes:client:CreateFirstCharacter', function()
    CreateFirstCharacter = true
    QBCore.Functions.GetPlayerData(function(pData)
        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 pData.charinfo.gender == 1 then
            skin = "mp_f_freemode_01"
        end

        ChangeToSkinNoUpdate(skin)
        SendNUIMessage({
            action = "ResetValues",
        })
    end)
end)
  1. Replace RegisterNUICallback('close', function(_, cb) with the following code:

RegisterNUICallback('close', function(_, cb)
    SetNuiFocus(false, false)
    if CreateFirstCharacter then 
        TriggerEvent("eh_cutscene:client:StartCutscene") -->> Start eh_cutscene
        print('^2Started eh_cutscene')
    end
    CreateFirstCharacter = false
    creatingCharacter = false
    disableCam()
    FreezeEntityPosition(PlayerPedId(), false)
end)

Last updated