> For the complete documentation index, see [llms.txt](https://wiki.qfdevelopers.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.qfdevelopers.com/scripts/editor/additional-informations.md).

# Additional Informations

#### Core Features

* **Universal Framework Support:** Built natively for ESX, QBCore, and QBox environments.
* **Mugshot Engine:** Integrates seamless mugshot generation directly within the UI, saving locally or via Fivemanage.
* **Starter Packages:** Define item kits (food, phone, ID) that are injected into the player's inventory upon first creation.
* **Admin Management:** In-game UI for administrators to wipe characters or grant additional slots to supporters.

#### Commands & Permissions

To utilize administrative commands, players must have the required Ace Permissions. Below is the mapping of commands to their required permissions.

| Command       | Permission Node           | Description                                                                                          |
| ------------- | ------------------------- | ---------------------------------------------------------------------------------------------------- |
| `/relog`      | `qf.multicharacter.relog` | Safely disconnects the player from their current character and returns them to the selection screen. |
| `/charadmin`  | `qf.multicharacter.admin` | Opens the graphical Admin Management Panel.                                                          |
| `/delchar`    | `qf.multicharacter.admin` | Forcefully deletes a specific character ID.                                                          |
| `/unlockslot` | `qf.multicharacter.admin` | Grants a locked character slot to a specific player license.                                         |

**Assigning Permissions in `server.cfg`:**

```cfg
add_ace group.admin qf.multicharacter.admin allow
add_ace group.admin qf.multicharacter.relog allow
```

#### Developer API (Events & Lifecycle)

For server developers looking to synchronize external systems (like housing, garages, or custom spawn logic) with the character selection process, `qf_multicharacter` triggers specific client and server-side events.

**1. Player Loaded Event (Client-Side)**

When a character is selected and loaded successfully into the active session, the script emits the following client-side event. This is the optimal place to initialize player HUDs, radars, or custom client scripts.

```lua
-- CLIENT-SIDE
-- Fired when a character is selected and loaded
RegisterNetEvent('qf_multicharacter:bridge:playerLoaded', function(playerData)
    -- playerData contains core player details (identifier, accounts, job, etc.)
    print("Character loaded client-side! Initializing HUD...")
    exports['my_custom_hud']:EnableHud(true)
end)
```

Additionally, the script continues to emit standard framework events for backwards compatibility:

* **ESX:** `esx:playerLoaded`
* **QBCore / QBox:** `QBCore:Client:OnPlayerLoaded`

**2. Triggering Relog Programmatically**

To log a player out and return them to the character selection screen via code, you can use these events, grouped by execution side below:

{% tabs %}
{% tab title="Client-Side Trigger" %}

```lua
-- CLIENT-SIDE
-- Instantly log the local player out and return them to character selection
TriggerEvent('qf_multicharacter:relog')
```

{% endtab %}

{% tab title="Server-Side Trigger" %}

```lua
-- SERVER-SIDE
-- Force a specific player ID to logout and return to character selection
local targetPlayerId = 1
TriggerClientEvent('qf_multicharacter:relog_setup', targetPlayerId)
```

{% endtab %}
{% endtabs %}

***

#### Frequently Asked Questions (Q\&A)

**Q: Players are falling through the map during character selection. How do I fix this?**\
A: This occurs when the coordinates specified in `Config.Cutscenes` do not have the ground collision loaded in time. Ensure the `name` of the interior is a valid, natively loaded IPL or a reliably streamed MLO. You can also adjust `Config.SelectionCoords` to a safe coordinate.

**Q: How does the script handle skin creation for new characters?**\
A: By setting `Config.SkinManager = 'qf_skinmenu'`, our script will automatically yield to the skin creator menu. Once the player finishes creating their ped, the multicharacter sequence resumes and spawns them.

**Q: How can I change the background music of the selection screen?**\
A: You can configure the audio settings, including volume and music, directly within the `config.lua` file. Ensure the track links point to raw audio files (`.mp3` or `.ogg`).


---

# 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://wiki.qfdevelopers.com/scripts/editor/additional-informations.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.
