> For the complete documentation index, see [llms.txt](https://peppesess.gitbook.io/fenix-development-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://peppesess.gitbook.io/fenix-development-documentation/resources/fnx-startselector.md).

# 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)
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://peppesess.gitbook.io/fenix-development-documentation/resources/fnx-startselector.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.
