Configuration
Edit the existing values in config/config.lua, then run restart f5_chat. The Lua examples below can be placed after the existing Config table. Field names in the tables are relative to Config.
General settings
| Setting | Purpose |
|---|---|
Locale | Language of the interface, command help, errors, Discord logs, and console messages: ar, cs, de, en, es, fr, nl, pl, pt (Brazilian), th, tr, or zh (Simplified); default: en. Arabic uses a right-to-left layout. An unsupported code falls back to English. |
Framework.mode | auto, qb, qbx, esx, or custom. auto detects Qbox, QBCore, then ESX. |
Channels | Enable or disable localchat, ooc, anon, pm, me, do, radio, and server. Disabling PM also disables /r. |
Identity | Author name per supported channel: steam, character, or player (FiveM nickname). ANON and SERVER do not use this setting. |
ShowServerIds | Show or hide player IDs per channel: OOC, LOCAL, PM, RADIO, ME, and DO. |
SteamAvatars | Enable Steam profile lookup. Player messages show avatars only in OOC and LOCAL using Steam identity. Requires the server's steam_webApiKey and a Steam identifier for the player. |
MaxMessageLength | Global input limit; default: 200 Unicode characters. |
MessageCooldown | Minimum interval between a player's messages; default: 1000 ms. |
HistoryLimit | Total messages retained in the player's chat session; default: 200, range: 1–1000. This is not a conversation archive. |
OpenKey, ToggleKey, ToggleLocalKey | Initial key bindings: t, l, k. Existing player bindings take precedence. |
For standalone servers without character data, select player identity for the relevant channels. A character identity without available character data displays “Unknown character”. Identity and ShowServerIds control messages sent through F5 Chat; external integrations provide their own author and ID fields.
ChannelLimits overrides message length and adds a cooldown for individual channels:
Config.ChannelLimits = {
anon = { MessageCooldown = 5000 },
me = { MaxMessageLength = 400 },
['do'] = { MaxMessageLength = 400 }
}
The global cooldown still applies between all channels. /r shares PM limits. Message lengths accept 1–16384; cooldowns accept 0–3600000 ms. The input limit includes command names and PM recipient IDs.
Player defaults
PlayerDefaults applies to new players and the reset button. Saved preferences take precedence.
| Fields | Default | Allowed values |
|---|---|---|
scale | 100 | 90–130%, step 5 |
width | 510 | 380–720 px, step 10 |
height | 7 | 1–20 history rows |
opacity | 80 | 56–80% |
messageLimit | 8 | 1–20 entries while chat input is closed |
fade | 12 | 0–120 seconds; 0 disables fading |
timestamps, compact, notifications | true | true or false |
snap | false | Snap to grid when positioning chat |
positionX, positionY | unset | Optional default position of the chat's top-left corner: both 0–10000, in ten-thousandths of the screen width and height. The chat is kept on screen. Set both or neither. |
Proximity and bubbles
| Setting | Default and effect |
|---|---|
LocalRange | LOCAL delivery range: 20.0 metres. |
LocalBubbleChat | true; disabling LOCAL bubbles preserves its chat history. |
Roleplay.me, Roleplay['do'] | Each has Range = 20.0, Duration = 10000 ms, and Bubbles = true. |
Bubbles.MaxPerGroup | 3 bubbles per author, separately for LOCAL and the shared ME/DO stack. |
Bubbles.Typing | true; show the ME/DO typing indicator. |
Bubbles.LocalDuration | Duration in ms: Base + characters × PerCharacter, clamped to Min–Max. Defaults: 2000, 60, 8000–30000. |
Bubbles.DistanceScale | Shrink from full size at Start = 2.0 m to Min = 0.7 at End = 12.0 m. Min = 1 disables shrinking. |
BubbleOcclusion | localchat, me, and ['do']: true hides other players' bubbles behind obstacles. |
Radio groups
RADIO is a text channel. The first matching entry in Radio.Groups determines a player's conversation. Supported group types are job, gang, and faction.
Set minGrade to the required grade (0 means no grade requirement), and requireDuty = true to require duty status. Your framework or adapter must supply the relevant data. Without a group provider, RADIO is unavailable.
By default, each configured group has its own conversation. To let police and ambulance share one:
Config.Radio.Channels = {
emergency = 'Emergency Services'
}
Config.Radio.Groups = {
{ type = 'job', name = 'police', channel = 'emergency', minGrade = 0, requireDuty = true },
{ type = 'job', name = 'ambulance', channel = 'emergency', minGrade = 0, requireDuty = true }
}
This example replaces the group list. Retain other entries if they should keep access. Omit channel and use label for a separate conversation.
For a custom framework, Framework.custom.getPlayer(source) returns a table with the character's name. Framework.custom.getGroups(source, groups) can provide or override job, gang, and faction for loaded framework players; use mode = 'custom' for a standalone group provider. Each group can be a name string or a table such as { name = 'police', grade = 2, onduty = true }; use the table form for grade/duty requirements. Configure these callbacks in config/config.lua using your framework's server exports.
Discord logs
Edit config/discord.lua. Set the webhook in server.cfg before starting chat:
set f5_chat_discord_webhook "https://discord.com/api/webhooks/WEBHOOK_ID/WEBHOOK_TOKEN"
Use set, not setr or sets, to keep the webhook private. A blank webhook disables delivery to that destination. Apply logging changes with restart f5_chat.
ChatDiscordConfig.Enabled controls logging globally; Channels.<channel>.Enabled controls each category, including clearall. PM logging is disabled by default and also covers /r when enabled. ANON logs identify the real sender for moderation.
Set Username, AvatarUrl, Footer, Color, Thumbnail, and IncludeIdentifiers to customise logs. Individual channel entries can override these fields, Webhook, and Title, which replaces the default category title. Log titles, field names, and the category in the footer follow Locale. IncludeIdentifiers controls license and Discord identifiers. Messages injected through chat:addMessage are not logged automatically.