The most frequent problems after installing Cuxial Chat, with the cause and the fix for each one.
The resource does not start
Cause. A dependency is missing or starts later than the chat. Cuxial Chat needs OneSync, ox_lib, oxmysql and cuxial_bridge.
Fix. Enable OneSync and start the dependencies first:
ensure ox_lib
ensure oxmysql
ensure cuxial_bridge
ensure cuxial_chatTwo chats appear, or the default chat still opens
Cause. Another chat resource is still running. Cuxial Chat provides chat and cannot share it.
Fix. Remove ensure chat and any other chat script from server.cfg, then restart the server.
Pressing T does nothing and the chat never shows
Cause. The interface is not loading. The folder web/dist is missing or incomplete, usually after a partial upload.
Fix. Make sure web/dist/index.html and the folder web/dist/assets exist inside the resource. If they do not, copy the resource again from the original package and restart the server.
I changed ui.openKey but the chat still opens with the old key
Cause. ui.openKey is only the default. Once a player has joined, FiveM remembers their key binding.
Fix. Each player changes it in the GTA settings, under key bindings for FiveM. New players get the new default.
/me and /do do not appear in the chat
Cause. actions.display is 'head', so actions are shown only above the head.
Fix. Set actions.display = 'both' in shared/config.lua. Players who already picked a value in their settings keep their own choice.
Player names show as "Player 12"
Cause. The chat could not read the character name. cuxial_bridge is not connected to the framework, or it started before it.
Fix. Start your framework before cuxial_bridge, and cuxial_bridge before cuxial_chat.
The name is not hidden when wearing a mask
Cause. One of these:
anonymous.enabledisfalse.anonymous.anyMaskisfalseand the mask number is not inanonymous.masks.- The channel is not set to
trueinanonymous.channels. - The message is a private message or goes to the organization channel. Both always show the real name.
- The clothing resource has just changed the mask.
Fix. Review the anonymous block. To update at once after a clothing change, call exports.cuxial_chat:refreshMask() from the client.
/gchat answers "You do not belong to any organization"
Cause. The player has no gang, and their job is not in gchat.policeJobs (or they are off duty with gchat.requireDuty = true).
Fix. Give the player a gang, or add their job type or job name to gchat.policeJobs.
All organizations have the same colour in /gchat
Cause. cuxial_gang is not running, so every organization uses gchat.fallbackColor.
Fix. Start cuxial_gang, or change gchat.fallbackColor. The chat reads the colours again within a minute; no restart is needed.
The image command does not exist or rejects the link
Cause. images.enabled is false by default. With it enabled, a link is rejected when it is not https, it is longer than 400 characters, its domain is not in images.hosts, it does not end in an extension from images.extensions, or the player went over images.perMinute.
Fix. Set images.enabled = true and add the domains you want to allow. The chat tells the player why a link was rejected.
Settings are lost when the player reconnects
Cause. persistSettings is false, or the table cuxial_chat_settings could not be created.
Fix. Set persistSettings = true and check the server console for oxmysql errors when the resource starts. The database user needs permission to create tables.
Logs do not reach Discord
Cause. The webhook convar is empty or has a different name from logs.discord.convar, or the channel is not enabled in logs.channels.
Fix. Add the convar to server.cfg before the chat starts. It is read once, when the resource starts:
set cuxial_chat_webhook "https://discord.com/api/webhooks/..."Messages are sent in batches, so they can take up to logs.discord.flushMs to arrive. With debug = true the console shows whether Discord is active and any failed response.
Texts appear in the wrong language
Cause. The chat follows the ox:locale convar.
Fix. Set it in server.cfg and restart. en and es are included:
setr ox:locale "en"Commands from another resource are missing in the autocomplete
Cause. That resource does not announce its commands to the chat.
Fix. Add them with the standard event:
TriggerClientEvent('chat:addSuggestion', -1, '/mycommand', 'What it does')Messages sent too fast are dropped
Cause. For text written without a command, the chat accepts one message every 300 milliseconds per player. Messages are limited to 400 characters. This protects the server from spam.
Fix. None needed. It is intended.
