> For the complete documentation index, see [llms.txt](https://nanoscripts.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://nanoscripts.gitbook.io/docs/scripts/nn_chat.md).

# nn\_chat

**General information before installing**

Welcome to the guide for **NANO Chat**. It replaces the default FiveM chat with a chat built for roleplay: channels as tabs, a badge on every name, and settings each player makes their own.

NANO Chat is a drop-in replacement. Scripts that print to the default chat keep working, without any changes.

You set the rules in two files: `shared/config.lua` for channels, badges and defaults, and `shared/configs/cfg_access.lua` for who may use what.

**What is included**

| Part              | What a player gets                                                                                         |
| ----------------- | ---------------------------------------------------------------------------------------------------------- |
| Channels          | OOC, ME, DO, RADIO, DEPT, GANG, PM, STAFF and SYS as tabs. Each player only sees the tabs they may use     |
| Roleplay commands | `/w` whisper, `/s` shout, `/ad`, `/911`, `/tweet`, `/roll`, `/try` and `/anon`                             |
| Badges            | A badge before every name: staff, job, duty, gang, Discord role, playtime, or one your own scripts set     |
| Settings          | Position or drag anywhere, scale, background, accent colour, text size, visibility, streamer mode and more |
| Row actions       | Click a message to reply, send a PM, copy it, mute the sender for yourself or report them                  |
| In the world      | Typing dots above players who are writing, and `/me` and `/do` text above the speaker                      |
| Staff tools       | A staff channel, `/announce` cards, `/clearall`, `/mute`, and announcements that repeat on a timer         |
| Logs              | Every message, or only the channels you pick, sent to a Discord webhook in batches                         |

**Two things to know before you start**

{% hint style="info" %}
**Players own their look, you own the rules.** Each player sets up their own chat in the settings sheet (`/chat`). You decide the defaults, and which channels, features and settings each player may use.
{% endhint %}

{% hint style="warning" %}
**Stop the default chat first.** Two chats fight over the same events. Remove `ensure chat` from your `server.cfg` before you start NANO Chat. See Installation.
{% endhint %}

**Compatibility**

| Area         | Supported                                                                                          |
| ------------ | -------------------------------------------------------------------------------------------------- |
| Framework    | QBox · QBCore · ESX, through `community_bridge`                                                    |
| Database     | None needed                                                                                        |
| Default chat | `chat:addMessage`, `chat:addSuggestion`, `exports.chat:addMessage`, `registerMessageHook` and more |
| Languages    | English · Français · Deutsch · Español · Português · Polski · Русский · Türkçe · العربية           |

**Support**

If you need more support regarding the script, please reach out via our [discord](https://discord.gg/nanoscripts).
