---
description: Start selector to give a custom background for your players
---

# fnx-startselector

### Execute SQL files

remember to execute the sql files in the resource folder, remember also to register the items in your inventory



### How can i trigger the menu?

from client&#x20;

```
TriggerEvent("fnx-startselection:OpenPanel")
```

from server

```
TriggerClientEvent("fnx-startselection:OpenPanel")
```

### How can I add it in qbcore?

search **qb-clothes:client:CreateFirstCharacter** and replace the event with this.

```
RegisterNetEvent('qb-clothes:client:CreateFirstCharacter')
AddEventHandler('qb-clothes:client:CreateFirstCharacter', function()
    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",
        })

        Citizen.CreateThread(function ()
            while creatingCharacter do
                Wait(100)
            end

            TriggerEvent("fnx-startselection:OpenPanel")
        end)

    end)
end)
```

### How can I add it in ESX?&#x20;

go to esx\_skin client and search **esx\_skin:playerRegistered**  replace with this code

```
AddEventHandler('esx_skin:playerRegistered', function()
    CreateThread(function()
        while not ESX.PlayerLoaded do
            Wait(100)
        end

        if firstSpawn then
            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
        
        Citizen.CreateThread(function ()
            while firstSpawn do
                Wait(100)
            end

            TriggerEvent("fnx-startselection:OpenPanel")
        end)

    end)
end)
```
