Skip to main content

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​

SettingPurpose
LocaleLanguage 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.modeauto, qb, qbx, esx, or custom. auto detects Qbox, QBCore, then ESX.
ChannelsEnable or disable localchat, ooc, anon, pm, me, do, radio, and server. Disabling PM also disables /r.
IdentityAuthor name per supported channel: steam, character, or player (FiveM nickname). ANON and SERVER do not use this setting.
ShowServerIdsShow or hide player IDs per channel: OOC, LOCAL, PM, RADIO, ME, and DO.
SteamAvatarsEnable 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.
MaxMessageLengthGlobal input limit; default: 200 Unicode characters.
MessageCooldownMinimum interval between a player's messages; default: 1000 ms.
HistoryLimitTotal messages retained in the player's chat session; default: 200, range: 1–1000. This is not a conversation archive.
OpenKey, ToggleKey, ToggleLocalKeyInitial 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.

FieldsDefaultAllowed values
scale10090–130%, step 5
width510380–720 px, step 10
height71–20 history rows
opacity8056–80%
messageLimit81–20 entries while chat input is closed
fade120–120 seconds; 0 disables fading
timestamps, compact, notificationstruetrue or false
snapfalseSnap to grid when positioning chat
positionX, positionYunsetOptional 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​

SettingDefault and effect
LocalRangeLOCAL delivery range: 20.0 metres.
LocalBubbleChattrue; disabling LOCAL bubbles preserves its chat history.
Roleplay.me, Roleplay['do']Each has Range = 20.0, Duration = 10000 ms, and Bubbles = true.
Bubbles.MaxPerGroup3 bubbles per author, separately for LOCAL and the shared ME/DO stack.
Bubbles.Typingtrue; show the ME/DO typing indicator.
Bubbles.LocalDurationDuration in ms: Base + characters × PerCharacter, clamped to Min–Max. Defaults: 2000, 60, 8000–30000.
Bubbles.DistanceScaleShrink from full size at Start = 2.0 m to Min = 0.7 at End = 12.0 m. Min = 1 disables shrinking.
BubbleOcclusionlocalchat, 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.