Requirements#
- FXServer build 6116 or newer. The manifest asks for it, older builds refuse to start the resource.
- OneSync on (
set onesync onin server.cfg, or the OneSync setting in txAdmin). The server reads player positions to route IC speech. - A framework is optional: QBox, QBCore, ESX, ox_core or ND_Core. It gives character names, jobs and duty (departments, 911 cards), money (paid adverts) and items (mask and Darknet item checks). Without one the chat runs standalone: names show as "Unknown", adverts are free, and the department and 911 channels have nobody in them.
- oxmysql is optional. It's only used when you set
Config.logs.database = true(see Database). - No ox_lib and no build step are needed.
Optional resources the chat picks up by itself when they run:
| Resource | What it adds |
|---|---|
| screenshot-basic | /photo (also needs an upload URL, see step 5) |
| pma-voice | radio auto-tune, speech mode sets your mic range, talking ring on avatars |
| ncore_hud | RP mode shared with the HUD, voice range sync, staff toasts for reports and mutes |
| ps-dispatch or cd_dispatch | 911 and 311 calls are forwarded to it as well |
| loaf_headshot_base64 or MugShotBase64 | avatars of players who are far away |
| illenium-appearance, fivem-appearance, esx_skin, qb-clothing, ncore_inventory, ncore_character | your avatar is retaken after an outfit change |
Steps#
-
Copy the
ncore_chatfolder intoresources/[ncore](create the[ncore]folder if you do not have one yet). Do not rename it. -
Remove the stock
chatresource: delete its folder (in the default server data it'sresources/[gameplay]/chat) and removeensure chatfrom server.cfg. ncore_chat provideschat, so resources that listchatas a dependency still start. -
Add ncore_chat to server.cfg. The framework is detected once, at start, so your framework (and oxmysql) go above it. Put it before your other scripts so their chat suggestions arrive.
Standalone
server.cfgensure ncore_chatQBCore
server.cfgensure oxmysql ensure qb-core ensure ncore_chat # your qb- resources after this lineQBox
server.cfgensure ox_lib ensure oxmysql ensure qbx_core ensure ncore_chatESX
server.cfgensure oxmysql ensure es_extended ensure ncore_chat # your esx_ resources after this lineox_core
server.cfgensure oxmysql ensure ox_lib ensure ox_core ensure ox_inventory ensure ncore_chatND_Core
server.cfgensure oxmysql ensure ND_Core ensure ncore_chatOptional resources from the table above can go before or after ncore_chat. screenshot-basic has to be running when a player uses
/photo.If the detection picks the wrong framework, force it above the
ensureline:server.cfgset lrc:framework "qb" # auto | esx | qb | qbx | ox | nd | standaloneOnly force a framework that is really running.
-
Give your staff the staff permission. Framework admins already count as staff (QBCore
adminandgod, QBoxadminandqbx.admin, ox_coreadminandstaffgroups, ND_Coreadmin, ESX every group exceptuser, set inConfig.staff). On any setup, the ACE works too:server.cfgadd_ace group.admin lrc.staff allow add_principal identifier.license:<license> group.adminTwo smaller ACEs let someone do one thing without being staff:
lrc.announcefor/announceandlrc.pinfor pinning messages. -
Optional webhooks. Set these above the
ensureline. They stay on the server and are never sent to players.server.cfgset lrc:logWebhook "https://..." # every channel, private messages included set lrc:logWebhookStaff "https://..." # staff channel and staff actions set lrc:logWebhook911 "https://..." # 911 and 311 set lrc:photoWebhook "https://..." # where /photo uploads go set lrc:photoWebhookField "files[]" # the multipart field name of the uploadThe photo endpoint has to answer with the image URL: JSON with
urlorattachments[1].url, or a plain link in the reply. Withoutlrc:photoWebhook,/phototells the player photos are not set up.Keep the URLs in convars, not in
config/config.lua. A URL in config.lua still works, but that file is also sent to every client, and the console warns you at start. Usesetfor these. Asetrconvar is sent to every client, which would give the URL away again. -
Config.demoModeinconfig/config.luashipsfalse, leave it that way on a live server. On a test server you can set it totrueto try the chat with nobody online: staff get/lrcdemo, which puts ten scripted characters around you in three groups so you can hear the ranges work, and/lrcshowcase, which I use to record videos. The showcase changes the staff member's model, framework job, time and weather while it runs. README.md has the details under "Trying it on a test server". -
Restart the server. The console prints the language and the framework it picked, for example
[lrc] framework bridge: qbx.
Database#
The database is off by default. To turn it on:
- Run oxmysql and start it above ncore_chat.
- Set
Config.logs.database = trueinconfig/config.lua. - Restart. The 7 tables in
sql/ncore_chat.sqlare created at start. Your database user needs CREATE rights, and the JSON columns need MySQL 5.7.8+ or MariaDB 10.2.7+. You can also import the file by hand.
With the database on you get a message archive, saved Chirp posts, report numbers that keep counting after a restart, mutes that survive a restart, and stored avatars.
Logs#
Config.logs.file = true (the default) writes daily files to logs/ inside the resource folder. They hold message text, private messages included, with license and position. Nothing is deleted on its own. Delete old files by hand, or set Config.logs.file = false. Don't zip and share the resource folder with that logs/ folder in it.
lrc_forget <license> in the server console removes a player from the database and from today's log file. Older log files are not touched. README.md has the details.
Good to know#
- Do not run the stock
chatresource next to ncore_chat. - Players' settings are saved on their own PC.
setr ncore_chat:debug trueinserver.cfgprints extra debug lines while you look for a problem. It wins over the olderlrc:debugconvar, which still works.- Scripts that use stock
chat:addMode/registerModetables need a small change. Everything else written for the stock chat keeps sending to it.
