ns-chat — Configuration
Everything is in config.lua. Texts are in shared/locale.lua (en, tr). Framework code is in bridge/framework.lua.
General
| Option | Default | Description |
|---|
Framework | 'auto' | 'auto', 'qbx', 'qb', 'esx', 'standalone' |
Locale | 'tr' | 'tr' or 'en' |
OpenKey | { 'RETURN', 'T' } | One key ('RETURN') or several. Players can rebind them. |
MaxHistory | 100 | Messages kept in the client history |
HideInPauseMenu | true | Hide chat and overhead texts in the pause menu |
Distances and durations
| Option | Default | Description |
|---|
MeDistance / DoDistance / StatusDistance / LocalOOCDistance | 15.0 | Metres, checked on the server |
MeDuration / DoDuration | 5000 | ms on screen (chat line and text above the head) |
StatusDuration | 5000 | ms the [STATUS] chat line stays (the status itself stays on the character) |
MessageDuration | 6000 | ms for ooc, b, pm, twt, ad, 911, system |
Messages fade only while the chat is closed; they stay in the history until clear.
Channels and limits
| Option | Default | Description |
|---|
StatusEnabled, PMEnabled, OOCEnabled, LocalOOCEnabled, TwitterEnabled, AdvertisementEnabled, EmergencyEnabled | true | Turn a channel on / off |
MaxMessageLength / MaxStatusLength | 250 | Characters (UTF-8) |
Cooldowns | see file | ms per command. do must be written ["do"]. |
OOCUseCharacterName | true | OOC, local OOC and PM show the character name (false = FiveM name) |
Status
| Option | Default | Description |
|---|
StatusClearWords | { 'clear' } | status clear removes the status |
StatusOnDeath | 'keep' | 'keep' or 'clear' |
StatusOnDisconnect | 'keep' | 'keep': restored when the same character logs in within StatusKeepTime seconds. 'clear': removed. |
StatusOnRestart | 'keep' | 'keep': saved on resource stop and restored within StatusRestoreWindow seconds |
StatusUpdateInterval | 1500 | ms between proximity checks (only while a status exists) |
StatusPanel / StatusPanelMax | false / 5 | Optional list of nearby statuses under the chat |
StatusClearEvents | {} | Extra server events that clear a status (the bridge already handles framework logout) |
911
| Option | Default | Description |
|---|
EmergencyJobs | { 'police', 'bcso', 'sasp', 'ambulance' } | Job names that receive calls |
EmergencyRequireDuty | false | Only on-duty players (ESX has no duty: always on duty) |
EmergencyShowLocation | true | Street / zone shown under the call |
Standalone (no framework) every player receives 911. Replace Config.CanReceiveEmergency for custom rules.
Player UI
DefaultUI is what a new player gets; each player can change it with the settings button next to the input.
| Field | Default | Range |
|---|
theme | 'classic' | 'classic', 'modern' |
fontSize | 14 | 10 – 24 |
width / height | 620 / 300 | 300 – 1000 / 120 – 700 (px at 1080p) |
x / y | 0.8 / 1.3 | 0 – 90 (% of the screen) |
opacity | 35 | 0 – 90 |
timestamps, fade, overhead, hidden, statusPanel | | on / off |
AllowThemeChange = false forces DefaultUI.theme for everybody.
Text above characters (Overhead)
| Option | Default | Description |
|---|
Enabled, Me, Do, Status | true | What is shown |
Typing | true | "..." bubble above the head while the player has the chat open |
TypingTimeout | 60000 | ms, safety limit for the typing bubble |
ShowOwn | true | Your own texts (hidden in first person) |
DrawDistance | 15.0 | Metres |
RequireLineOfSight | true | Hide behind walls |
MaxLines | 3 | me / do lines per player |
TextSize / StatusTextSize | 20 / 15 | px at 1080p |
MaxWidth / StatusMaxWidth | 340 / 300 | Width before wrapping |
HeadOffset | 0.15 | Metres above the head |
Commands from other resources
| Option | Default | Description |
|---|
AllowOtherCommands | true | /command runs other resources' commands |
OtherCommandsWithoutSlash | true | e dance = /e dance (only commands registered by resources) |
SlashOnlyCommands | see file | Always need / (quit, restart, stop …) |
ExternalMessages | true | Show chat:addMessage messages from other resources |
Security
| Option | Default | Description |
|---|
Security.FloodLimit / FloodWindow | 8 / 5000 | Max chat events per window per player |
Security.LogSuspicious | true | Throttled console log for invalid / flood events |
Hooks
Config.GetCharacterName(source) — name shown in the chat
Config.CanReceiveEmergency(playerId) — who receives 911