ns-chat — Installation
Requirements
- FiveM server with OneSync enabled
- Optional: Qbox, QBCore or ESX (character names, 911 jobs, per-character statuses). Without a framework ns-chat runs standalone.
No database and no other dependency is needed.
Steps
-
Download the resource from your Cfx portal (Keymaster → Granted Assets) and put the
ns-chatfolder in yourresourcesfolder. Keep the folder namens-chat. -
Open
server.cfgand replace the default chat:# ensure chat ensure ns-chatPut
ensure ns-chatwhereensure chatwas, before your framework and other resources. Resources that callexports.chat:*(for exampleqbx_chat_theme) need ns-chat to be started first. -
Restart the server (a full restart, not only
restart ns-chat, the first time). -
In game press Enter (or T) to open the chat and type
me test.
Notes
- The manifest declares
provide 'chat', so resources withdependency 'chat'keep working. - Messages sent with
chat:addMessage/exports.chat:addMessage(txAdmin announcements, join / quit messages, MOTD) are shown as system lines. Turn them off withConfig.ExternalMessages = false. - Templates registered with
chat:addTemplate/exports.chat:addTemplateare used for messages that name them withtemplateId({0},{1}... are replaced by the arguments). HTML in templates and messages is shown as plain text. - Qbox: the join / quit messages come from
qbx_chat_theme. Setqbx_chat:joinMessage/qbx_chat:quitMessageto""inserver.cfgif you do not want them. - Players can rebind the open keys in Settings → Key Bindings → FiveM.
Updating
Replace every file except config.lua (and your edited shared/locale.lua), then compare your config.lua with the new one for new options listed in CHANGELOG.md.
Troubleshooting
| Problem | Fix |
|---|---|
| Two chats open | ensure chat is still in server.cfg (or another resource starts it). Remove it. |
No such export ... in resource chat | Start ns-chat before that resource in server.cfg. |
| FiveM / Steam name instead of character name | The character is not loaded yet or the framework is not detected. Set Config.Framework ('qbx', 'qb', 'esx'). |
| Nobody receives 911 | Check Config.EmergencyJobs (job names) and Config.EmergencyRequireDuty. |
| Texts above characters not visible | Config.Overhead.Enabled, player setting "Text above characters", line of sight (RequireLineOfSight). |