> For the complete documentation index, see [llms.txt](https://dtrx-studio.gitbook.io/dtrx-studio-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dtrx-studio.gitbook.io/dtrx-studio-docs/fivem-products/dtrx-chat/faqs.md).

# FAQs

## FAQs

<details>

<summary>🔒 Which files can I edit? (escrow)</summary>

The purchased resource is escrow protected. The entire **`public/`** folder is open (config, themes, locales, bridge, client/server API helpers under `public/`).

`client/`, `server/`, `utils/`, and the `html/` UI bundle ship locked. Use the in game Admin Panel for channels, runtime limits, theme overrides, and moderation. See What You Receive.

</details>

<details>

<summary>⌨️ I changed the open key in config but it still uses the old key</summary>

FiveM caches keybinds in each player’s `fivem.cfg`. After you change `ChatConfig.Keybinds.OpenChat`, restart `dtrx_chat`, then have affected players remove lines containing `dtrx_chat_open` from `%appdata%\CitizenFX\fivem.cfg` and restart FiveM. Full steps: Commands → Keybind troubleshooting.

</details>

<details>

<summary>💬 The chat window does not open (pressing T does nothing)</summary>

* Confirm `dtrx_chat` is **started** and listed **after** `oxmysql` and your framework.
* Check F8 (client) and server console for Lua errors.
* Set `ChatConfig.Debug = true`, `restart dtrx_chat`, press **T** again.
* Confirm the `html/` folder is intact: `html/index.html` and `html/assets/` must exist (included in your download; no build step).
* If another `chat` resource is still ensured, remove `ensure chat` and set `set resources_useSystemChat false`.

</details>

<details>

<summary>🖥️ I only see a transparent screen (NUI with no UI)</summary>

The pre built UI is missing or was deleted.

* Check that `html/index.html` and `html/assets/` exist inside `dtrx_chat`.
* Re-extract the full package from your purchase download (do not omit the `html` folder).
* Then `restart dtrx_chat`. If the folder is present and the issue remains, contact support.

</details>

<details>

<summary>📋 Two chats appear on screen at the same time</summary>

Native chat was not disabled.

* `set resources_useSystemChat false` in `server.cfg`
* Remove `ensure chat` and framework chat themes (`chat-theme-gtao`, `qbx_chat_theme`, `esx_rpchat`, etc.)
* Full server restart after changing convars

</details>

<details>

<summary>🔐 Admin panel says I have no permission</summary>

Add ACE to `server.cfg` or `permissions.cfg`:

```cfg
add_ace group.admin dtrx_chat.admin allow
```

* Permission must match `ChatConfig.Admin.AcePermission` (default `dtrx_chat.admin`).
* Restart the server (or refresh ACE), then `/chatadmin`.
* Being a “staff job” alone is **not** enough unless the job group is listed in `ChatConfig.Admin.FrameworkGroups`.

</details>

<details>

<summary>🗄️ Database tables were not created</summary>

* Ensure **oxmysql** is running and MySQL credentials in `server.cfg` are correct.
* MySQL user needs `CREATE` privilege on first boot.
* After fixing DB: `restart dtrx_chat` and watch console for SQL errors.

</details>

<details>

<summary>🌉 Framework shows as unknown / wrong bridge</summary>

Force the bridge in `public/shared/config.lua`:

```lua
Bridge = {
    Framework = "qb-core",   -- or "qbx_core", "es_extended"
    Notify    = "ox_lib",
}
```

Restart `dtrx_chat`. For fully custom cores, implement `public/bridge/framework/`.

</details>

<details>

<summary>📨 Messages do not appear for other players</summary>

* Check channel **scope** and **radius** in Admin → Categories (local channels only reach nearby players).
* JOB channel: sender must match configured `jobs` list.
* Receiver may be **muted** or **blocked** — check Admin → Players.
* Anti-spam may have auto-muted the sender — check server console with `Debug = true`.

</details>

<details>

<summary>📜 Why is the channel chat empty when I join? (no old messages)</summary>

{% hint style="info" %}
**Channel chat (ALL, ME, DO, OOC, JOB, custom channels)**\
Public channel messages only appear **while you are online**. When you connect, you do **not** receive a scrollback of everything that was said before you joined. You only see new lines sent after you entered the server (or after you opened that channel tab during the session).

**Private Messages (PM)**\
PM works differently. Conversations are **saved in the database**. When you open a PM thread, past messages with that player can load again, subject to hide thread and read settings.

This is intentional: channel chat is a live feed for players who are there; PM is a persistent inbox between characters.
{% endhint %}

**Server owners:** channel rows can still be stored on the server for moderation and admin **wipe history**. That archive is not shown as a login backlog to every player. `maxHistoryClient` limits how many lines stay in the chat window **during your current session**, not messages from before you joined.

</details>

<details>

<summary>📜 Chat history does not save / disappears (server or admin)</summary>

* Verify MySQL user has `INSERT`, `UPDATE`, `SELECT`, `DELETE`.
* Runtime setting `maxHistoryServer` controls how many channel messages the **server** keeps in the database (for logs, wipes, and staff tools). It does **not** load old channel lines for players when they join.
* Admin **wipe history** in Control Messages deletes stored rows for that channel.
* If **PM** history is missing, open the thread again or check that both players used PM while logged in with a valid character.

</details>

<details>

<summary>🎨 Theme or language does not change</summary>

* `ChatConfig.Theme` / player setting must match an id in `themes.json` or admin Themes tab.
* `ChatConfig.Locale` must match `public/shared/locales/<code>.json` (`en`, `pt`, `es`).
* `restart dtrx_chat` after editing JSON files.
* Players pick locale/theme in **Chat Settings** — overrides defaults per character.

</details>

<details>

<summary>✏️ 3D ME/DO text does not show above players</summary>

* Channel must have `text3d` enabled (default on `/me` and `/do`).
* Runtime Settings → `draw3d.enabled` must be `true`.
* Player may be beyond `maxRenderDistance` / `cullDistance`.
* Player toggles ME/DO 3D options in **Chat Settings → DrawText 3D**.

</details>

<details>

<summary>🎲 Dice button missing or does nothing</summary>

* Channel flag `allowDice` must be enabled (default on `me`, not on `do`).
* Runtime Settings → `dice.enabled` must be `true`.
* Cooldown: wait for `dice.cooldownMs` between rolls.
* Animation requires valid `ChatConfig.Dice.AnimDict` / `AnimName` on your game build.

</details>

<details>

<summary>📌 Sticky notes — cannot place or read</summary>

* Runtime Settings → `sticky.enabled` must be `true`.
* `maxPerPlayer` limit — delete an old note first.
* Stand within `Proximity.interactDistance` (default 2.5m) and press **E** / **G**.
* Prop model `ChatConfig.Sticky.PropModel` must exist on your server build.

</details>

<details>

<summary>🎤 Voice messages fail or are cut off</summary>

* Channel must allow audio (`allow_audio` in channel editor).
* Hard caps: `ChatConfig.Audio.MaxDurationSec` and `MaxSizeKb` — UI cannot exceed these.
* PM supports voice when mic is shown, still subject to the same caps.

</details>

<details>

<summary>📍 Location pin on cooldown</summary>

`ChatConfig.Location.CooldownSec` (default 10s) applies per player. Set to `0` to disable cooldown.

</details>

<details>

<summary>💼 `/job` channel — I cannot send messages</summary>

Default seed only allows job `police`. Edit the channel in Admin → Categories and add your job names to the **jobs** list, or change scope to `global`.

</details>

<details>

<summary>📤 Exports from another resource return nothing</summary>

* Resource name is **`dtrx_chat`** (not `dtrx-chat`).
* `ensure dtrx_chat` before the calling resource, or delay calls until player loaded.
* Server: `Broadcast` / `SendTo` need a valid `channelKey`.
* Client: `Send` still requires the player not to be muted/blocked.

</details>

<details>

<summary>👤 Player settings reset after multichar</summary>

Call `exports.dtrx_chat:NotifySessionReady()` when the character finishes loading and `NotifySessionEnded()` on logout if your framework does not use the built-in ESX/QB/QBX hooks.

</details>

<details>

<summary>⚡ Performance / “resmon” concerns</summary>

* Idle cost targets \~0.00ms when no 3D entries and chat closed.
* 3D renderer thread only runs while entries exist.
* StateBags replicate channels/settings — no callback polling loops.
* Lower `draw3d.maxRenderDistance` in Runtime Settings on busy servers.

</details>

<details>

<summary>🔄 Updated the resource — lost config?</summary>

* File config: keep your backed-up `public/shared/config.lua`.
* Live channels/settings: stored in DB — updates do not drop tables.
* Use the new `html/` folder from the update download; merge your saved `public/` edits only.

</details>

<details>

<summary>🛠️ If i removed themes still selecte from players what happen ?</summary>

Players with an old theme id fall back to the server default (`dtrx`) on next bootstrap. Clear custom DB theme rows in Admin → Themes if needed.

</details>

***

<br>


---

# 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://dtrx-studio.gitbook.io/dtrx-studio-docs/fivem-products/dtrx-chat/faqs.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.
