# Character creation settings

## ESX MULTICHAR AND IDENTITY

#### ESX MULTICHAR EDIT

esx\_multicharacter > client.lua > find esx:polayerloaded event. Stop esx\_skin, skinchanger events here.

<figure><img src="/files/gPlVKukZsFICEbtWvcs5" alt=""><figcaption></figcaption></figure>

```lua
	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
			local finished = false
			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)
			SetModelAsNoLongerNeeded(model)
			-- TriggerEvent('skinchanger:loadSkin', skin, function()
			-- 	local playerPed = PlayerPedId()
			-- 	SetPedAoBlobRendering(playerPed, true)
			-- 	ResetEntityAlpha(playerPed)
	        --    TriggerServerEvent('els_creation:control')

			-- 	TriggerEvent('esx_skin:openSaveableMenu', function()
			-- 		finished = true end, function() finished = true
			-- 	end)
			-- end)
			finished = true
			repeat Wait(200) until finished
		end
		DoScreenFadeOut(100)

		SetCamActive(cam, false)
		RenderScriptCams(false, false, 0, true, true)
		cam = nil
		local playerPed = PlayerPedId()
		FreezeEntityPosition(playerPed, true)
		SetEntityCoordsNoOffset(playerPed, spawn.x, spawn.y, spawn.z, false, false, false, true)
		SetEntityHeading(playerPed, spawn.heading)
		if not isNew then TriggerEvent('skinchanger:loadSkin', skin or Characters[spawned].skin) end
		Wait(400)
		DoScreenFadeIn(400)
		repeat Wait(200) until not IsScreenFadedOut()
		TriggerServerEvent('esx:onPlayerSpawn')
		TriggerEvent('esx:onPlayerSpawn')
		TriggerEvent('playerSpawned')
		TriggerEvent('esx:restoreLoadout')
		Characters, hidePlayers = {}, false
	end)
```

#### IDENTITY EDIT

esx\_identity > main.lua RegisterNUICallback( find the ‘register’ part and add the charcreate event like this.

<figure><img src="/files/6qo5zEKi1gfc8ev8T57Y" alt=""><figcaption></figcaption></figure>

```lua

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) 

            TriggerEvent('bp_charcreate:create')    

            if not ESX.GetConfig().Multichar then
                -- TriggerEvent('esx_skin:playerRegistered')
            end
        end, data)
    end)

```

### PROOF OF WORK

{% embed url="<https://www.youtube.com/watch?v=Q_xnMWio1TA>" %}

## QB MULTICHAR AND INTERIOR

#### QB MULTICHAR EDIT

qb-multicharacter > main.lua > find the qb-multicharacter:client:closeNUIdefault event . Here disable the qb-clothing event and put the bp\_charcreate event

<figure><img src="/files/o84zXr8UpxjbMaYTXljd" alt=""><figcaption></figcaption></figure>

```lua
RegisterNetEvent('qb-multicharacter:client:closeNUIdefault', function() -- This event is only for no starting apartments
    DeleteEntity(charPed)
    SetNuiFocus(false, false)
    DoScreenFadeOut(500)
    Wait(2000)
    SetEntityCoords(PlayerPedId(), Config.DefaultSpawn.x, Config.DefaultSpawn.y, Config.DefaultSpawn.z)
    TriggerServerEvent('QBCore:Server:OnPlayerLoaded')
    TriggerEvent('QBCore:Client:OnPlayerLoaded')
    TriggerServerEvent('qb-houses:server:SetInsideMeta', 0, false)
    TriggerServerEvent('qb-apartments:server:SetInsideMeta', 0, 0, false)
    Wait(500)
    openCharMenu()
    SetEntityVisible(PlayerPedId(), true)
    Wait(500)
    DoScreenFadeIn(250)
    TriggerEvent('qb-weathersync:client:EnableSync')
    TriggerEvent('bp_charcreate:create')
    -- TriggerEvent('qb-clothes:client:CreateFirstCharacter')
end)

```

#### QB-INTERIOR EDIT

qb-interior > main.lua >CreateApartmentFurnished export . Here disable the qb-clothing event and put the bp\_charcreate event

<figure><img src="/files/tG5DfOrAiPJilO25XZKT" alt=""><figcaption></figcaption></figure>

```lua
exports('CreateApartmentFurnished', function(spawn)
    local exit = json.decode('{"x": 1.5, "y": -10.0, "z": 0, "h":358.50}')
    local model = 'furnitured_midapart'
    local obj = CreateShell(spawn, exit, model)
    if obj and obj[2] then
        obj[2].clothes = json.decode('{"x": -6.028, "y": -9.5, "z": 1.2, "h":2.263}')
        obj[2].stash = json.decode('{"x": -7.305, "y": -3.922, "z": 0.5, "h":2.263}')
        obj[2].logout = json.decode('{"x": -0.8, "y": 1.0, "z": 1.0, "h":2.263}')
    end
    if IsNew then
        SetTimeout(750, function()
            TriggerEvent('bp_charcreate:create')
            -- TriggerEvent('qb-clothes:client:CreateFirstCharacter')
            IsNew = false
        end)
    end
    return { obj[1], obj[2] }
end)
```

## PROOF QB MULTICHAR

{% embed url="<https://www.youtube.com/watch?v=iY0CqUXSbC0>" %}

## illum-appearance description

For illenium-appearance you need to set in illenium-appeluarance > client > framework > esx or qb > compatibility.lua.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.0resmon.org/0resmon/bp-resources/bp-clothingv4/export-and-events-1.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
