EH-DOCUMENTATION
  • ERROR HUB
    • Welcome
    • Terms Of Service
    • Customer Service
    • Common Issues
    • FAQ
    • Discord Guide
  • OUR SCRIPTS
    • Advanced Cutscene
      • Installation
      • Configuration
        • Clothing
        • Multicharacter
          • Renzu Multicharacter
          • ZSX Multicharacter
        • QB-Apartment
        • Vehicle Keys
      • Events and Exports
      • Shared Files
    • Codekit
      • Installation
  • HOUSING SHELLS
    • Modern & Classic Mid Shell
Powered by GitBook
On this page
  1. OUR SCRIPTS
  2. Advanced Cutscene
  3. Configuration

Clothing

PreviousConfigurationNextMulticharacter

Last updated 2 months ago

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 you're unsure about the compatibility of your script with the cutscene resource, feel free to open a support ticket. And if you don't see your clothing script listed, we'd love for you to join our Discord community!

  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 
        exports["eh_cutscene"]:start() -- > Start eh_cutscene
        print('^2Started eh_cutscene')
    end
    CreateFirstCharacter = false
    creatingCharacter = false
    disableCam()
    FreezeEntityPosition(PlayerPedId(), false)
end)
  1. Open the client.lua file in the illenium-appearance/client folder.

  2. Replace the function InitializeCharacter(gender, onSubmit, onCancel) with the code below:

function InitializeCharacter(gender, onSubmit, onCancel)
    SetInitialClothes(Config.InitialPlayerClothes[gender])
    local config = getNewCharacterConfig()
    TriggerServerEvent("illenium-appearance:server:ChangeRoutingBucket")
    client.startPlayerCustomization(function(appearance)
        if (appearance) then
            exports["eh_cutscene"]:start() -- > Start eh_cutscene
            print('^2Started eh_cutscene')
            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
  1. Open the init.js file in the bl_appearance/dist/client folder.

  2. Replace the closeMenu() function with the code below:

function closeMenu() {
  SetPedArmour(ped, armour);
  stopCamera();
  SetNuiFocus(false, false);
  sendNUIEvent("appearance:visible", false);
  exports.bl_appearance.hideHud(false);
  if (resolvePromise) {
    resolvePromise();
  }
  open = false;
  
  if (isNewCharacter) {
    emit('eh_cutscene:client:StartCutscene');
    isNewCharacter = false;
  }
}
  1. Replace exports("InitialCreation", async (cb) with the code below:

let isNewCharacter = false;

exports("InitialCreation", async (cb) => {
  isNewCharacter = true;
  await openMenu({ type: "appearance", coords: [0, 0, 0, 0] }, true);
  if (cb) {
    cb();
  }
});
  1. Open the config.lua file in the codem-appearance/shared folder.

  2. Replace the line Config.OnMenuClose = function() with the code below:

Config.OnMenuClose = function()
    TriggerEvent("mHud:ShowHud")

    if firstCharacter then 
        exports["eh_cutscene"]:start() -- > Start eh_cutscene
        print('^2Started eh_cutscene')
    end

    if firstCharacter then firstCharacter = false end
end
  1. Open the editable.lua file in the codem-appearance/client folder.

  2. Replace the event RegisterNetEvent("qb-clothes:client:CreateFirstCharacter") with the code below:

    firstCharacter = false
    
    RegisterNetEvent("qb-clothes:client:CreateFirstCharacter")
    AddEventHandler("qb-clothes:client:CreateFirstCharacter", function()
        firstCharacter = true
        OpenMenu("charcreator")
    end)
  1. Replace the event RegisterNetEvent('qb-clothes:client:CreateFirstCharacter') with the code below:

RegisterNetEvent('qb-clothes:client:CreateFirstCharacter', function()
    QBCore.Functions.GetPlayerData(function(pd)
    local gender = "Male"
    local skin = 'mp_m_freemode_01'
    if pd.charinfo.gender == 1 then
        skin = "mp_f_freemode_01"
        gender = "Female"
    end
    exports[resourceName]:setPlayerModel(skin)
    -- Fix for tattoo's appearing when creating a new character
    local ped = PlayerPedId()
    -- exports[resourceName]:setPedTattoos(ped, {})
    exports[resourceName]:setPedComponents(ped, Config.InitialPlayerClothes[gender].Components)
    exports[resourceName]:setPedProps(ped, Config.InitialPlayerClothes[gender].Props)
    exports[resourceName]:setPedHair(ped, Config.InitialPlayerClothes[gender].Hair)
    ClearPedDecorations(ped)
    local config = getNewCharacterConfig()
    exports[resourceName]:startPlayerCustomization(function(appearance)
        if (appearance) then
            TriggerServerEvent('fivem-appearance:server:saveAppearance', appearance)
            exports["eh_cutscene"]:start() -- > Start eh_cutscene
            print('^2Started eh_cutscene')
            end
        end, config)
    end, Config.PedMenuGroup)
end)
  1. Open the cl_save_functions.lua file in the pure-clothing/client/functions folder.

  2. Insert the following code above the line containing charactersFirstCharacter = false:

if charactersFirstCharacter then 
    exports["eh_cutscene"]:start() -- > Start eh_cutscene
    print('^2Started eh_cutscene')
end
  1. Open the utils.lua file in the ak47_qb_clothing/client folder.

  2. Replace the function playCutScene() with the code below:

    function playCutScene()
        if not cutScenePlayed then
            cutScenePlayed = true
            exports["eh_cutscene"]:start() -- > Start eh_cutscene
            print('^2Started eh_cutscene')
        end
    end

qb-clothing
illenium-appearance
bl_appearance
codem-appearance
ak47_qb_clothing
fivem-appearance
pure-clothing