> For the complete documentation index, see [llms.txt](https://viper-development-1.gitbook.io/viperdocs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://viper-development-1.gitbook.io/viperdocs/viper-scripts/chat/config.md).

# Config

{% code title="config.lua" lineNumbers="true" %}

```
Config = {}

Config.Framework = 'auto' -- 'auto', 'qbcore', 'esx' or 'standalone'
Config.Locale = 'en' -- 'en', 'es', 'fr', 'de'

Config.ServerName = 'Viper Developments' -- Server name shown while chat is open
Config.ShowServerBranding = true -- Shows or hides the logo, server name and player count together
Config.ServerLogo = 'https://r2.fivemanage.com/u0iG0xPG2qnm3Ts9pqtXo/vp-logo.png' -- Direct HTTPS image URL; leave empty to show the fallback letter
Config.ServerLogoFallback = 'V' -- Letter shown when no logo is configured or the image fails
Config.Keybind = 't' -- Key used to open the standalone chat
Config.ThemeColor = '#6BD425' -- Main UI accent color
Config.HeaderPosition = 'center-top' -- 'left-top', 'center-top', 'right-top', 'left-center', 'center', 'right-center', 'left-bottom', 'center-bottom', 'right-bottom'
Config.HeaderOffsetX = 0 -- Horizontal header offset in pixels
Config.HeaderOffsetY = 28 -- Vertical header offset in pixels
Config.ChatPosition = 'left-top' -- Position preset used by the message list
Config.ChatOffsetX = 32 -- Horizontal chat offset in pixels
Config.ChatOffsetY = 88 -- Vertical chat offset in pixels
Config.InputPosition = 'center-top' -- Position preset used by the typing box and command suggestions
Config.InputOffsetX = 0 -- Horizontal typing box offset in pixels
Config.InputOffsetY = 100 -- Vertical typing box offset in pixels

Config.MaxMessages = 100 -- Maximum messages retained in the UI
Config.MaxSuggestions = 8 -- Maximum matching suggestions displayed at once
Config.MaxMessageLength = 280 -- Maximum message size accepted by the server
Config.AutoHideMilliseconds = 9000 -- Time before inactive messages fade while chat is closed
Config.SlowModeMilliseconds = 850 -- Minimum delay between player messages
Config.RepeatBlockMilliseconds = 5000 -- Time repeated messages remain blocked
Config.TransportDuplicateMilliseconds = 250 -- Silently ignores duplicate chat transport events
Config.LocalDistance = 20.0 -- Range for /me, /do and /try
Config.OOCDistance = 0.0 -- Set above 0 for proximity OOC; 0 keeps OOC global
Config.ShowPlayerIds = true -- Shows the server ID beside player names
Config.ShowPlayerJobs = true -- Shows the player's framework job inside the message badge
Config.ShowJobGrade = true -- Shows the player's framework grade label on /job messages
Config.Enable3DMe = true -- Shows /me actions above the player's head
Config.Me3DDuration = 7000 -- Duration of 3D /me text in milliseconds
Config.Me3DDistance = 20.0 -- Maximum distance for rendering 3D /me text
Config.Me3DHeight = 0.32 -- Vertical world-space height above the player's head
Config.Me3DColor = { 255, 255, 255 } -- RGB color used by 3D /me text
Config.ConsoleLogging = false -- Prints player chat messages in the server console
Config.AutoDiscoverCommands = true -- Adds all registered server commands to suggestions
Config.DefaultChatBridge = true -- Routes default FiveM chat messages through Viper Chat
Config.WarnDefaultChat = true -- Warns when the stock chat resource is still running

Config.AdminAce = 'viperchat.admin' -- Standalone/admin ACE used for staff actions
Config.QBCoreAdminPermissions = { 'god', 'admin' } -- QBCore permission groups allowed to moderate chat
Config.ESXAdminGroups = { -- ESX groups allowed to moderate chat
    ['superadmin'] = true,
    ['admin'] = true,
}

Config.HiddenSuggestions = { -- Technical commands hidden from the suggestion list
}

Config.DefaultJobStyle = { icon = 'JOB', color = '#64748B', animation = 'fade', lightAnimation = 'balanced', lights = { '#64748B', '#64748B' } } -- Style used for every job not listed below
Config.JobStyles = { -- Job chat styles. Keys must match framework job names
    ['police'] = { icon = 'LSPD', color = '#3B82F6', animation = 'fade', lightAnimation = 'balanced', lights = { '#155EEF', '#EF2B2D' } },
    ['ambulance'] = { icon = 'EMS', color = '#EF4444', animation = 'fade', lightAnimation = 'balanced', lights = { '#E11D2E', '#F8FAFC' } },
    ['mechanic'] = { icon = 'MECH', color = '#F59E0B', animation = 'fade', lightAnimation = 'balanced', lights = { '#F59E0B', '#FDE68A' } },
    ['fire'] = { icon = 'FIRE', color = '#F97316', animation = 'fade', lightAnimation = 'balanced', lights = { '#F59E0B', '#DC2626' } },
}

Config.Commands = {
    Me = 'me',
    Do = 'do',
    Try = 'try',
    OOC = 'ooc',
    PrivateMessage = 'pm',
    Reply = 'reply',
    Job = 'job',
    Staff = 'staff',
    Announce = 'announce',
    Clear = 'clear',
    ClearAll = 'clearall',
    Refresh = 'chatrefresh',
}

Config.CommandSuggestions = {
    { name = Config.Commands.Me, help = 'suggest_me', params = { { name = 'action', help = 'param_action' } } },
    { name = Config.Commands.Do, help = 'suggest_do', params = { { name = 'description', help = 'param_description' } } },
    { name = Config.Commands.Try, help = 'suggest_try', params = { { name = 'action', help = 'param_action' } } },
    { name = Config.Commands.OOC, help = 'suggest_ooc', params = { { name = 'message', help = 'param_message' } } },
    { name = Config.Commands.PrivateMessage, help = 'suggest_pm', params = { { name = 'player_id', help = 'param_player_id' }, { name = 'message', help = 'param_message' } } },
    { name = Config.Commands.Reply, help = 'suggest_reply', params = { { name = 'message', help = 'param_message' } } },
    { name = Config.Commands.Job, help = 'suggest_job', params = { { name = 'message', help = 'param_message' } } },
    { name = Config.Commands.Staff, help = 'suggest_staff', params = { { name = 'message', help = 'param_message' } } },
    { name = Config.Commands.Announce, help = 'suggest_announce', params = { { name = 'message', help = 'param_message' } } },
    { name = Config.Commands.Clear, help = 'suggest_clear', params = {} },
    { name = Config.Commands.ClearAll, help = 'suggest_clearall', params = {} },
    { name = Config.Commands.Refresh, help = 'suggest_refresh', params = {} },
}

Config.Channels = {
    chat = { label = 'channel_chat', icon = 'CHAT', color = Config.ThemeColor },
    system = { label = 'channel_system', icon = 'SYS', color = '#94A3B8' },
    me = { label = 'channel_me', icon = 'ME', color = '#C084FC' },
    ['do'] = { label = 'channel_do', icon = 'DO', color = '#F472B6' },
    ['try'] = { label = 'channel_try', icon = 'TRY', color = '#FBBF24' },
    ooc = { label = 'channel_ooc', icon = 'OOC', color = '#38BDF8' },
    pm = { label = 'channel_pm', icon = 'PM', color = '#2DD4BF' },
    job = { label = 'channel_job', icon = 'JOB', color = '#60A5FA' },
    staff = { label = 'channel_staff', icon = 'STAFF', color = '#FB7185' },
    announce = { label = 'channel_announce', icon = 'NEWS', color = '#F97316' },
    error = { label = 'channel_error', icon = 'ERR', color = '#EF4444' },
    success = { label = 'channel_success', icon = 'OK', color = Config.ThemeColor },
}

-- Internal: framework auto-detection (do not edit)
function GetFramework()
    if Config.Framework ~= 'auto' then return Config.Framework end
    if GetResourceState('qb-core') == 'started' then return 'qbcore' end
    if GetResourceState('es_extended') == 'started' then return 'esx' end
    return 'standalone'
end




```

{% endcode %}
