Skip to main content

Documentation Index

Fetch the complete documentation index at: https://fxscripts.dev/docs/llms.txt

Use this file to discover all available pages before exploring further.

Same call signature on client or server.

formatMessage(args)

Apply fxChat’s color-code and markdown parser to a string. Returns the HTML that fxChat would render.
Shared
local html = exports.fxChat:formatMessage('Hello {#ec4899}world{/}!')
args
string
required
Raw input with optional inline color codes and markdown.
returns
string
Sanitized HTML. Already escaped — safe to pass through to NUI directly.
Example
local rendered = exports.fxChat:formatMessage('**bold** ^4blue^0 normal')
print(rendered)
-- → <strong>bold</strong> <span style="color:#0000ff">blue</span> normal
Useful for mimicking fxChat’s rendering in your own NUI.

getConfig(key?)

Read a value from configs/chat.lua from either side. Returns the entire config table when called without arguments.
Shared
local rateLimit = exports.fxChat:getConfig('RateLimit')
local entire = exports.fxChat:getConfig()
key
string
Top-level config key. Omit to get the full table.
returns
any
The config value. nil if the key doesn’t exist.
Example
-- Adapt your own behavior to match fxChat's rate limit
local rate = exports.fxChat:getConfig('RateLimit')
print(('Chat allows %d messages per %dms'):format(rate.messages, rate.window))

getThemeNames()

List the theme filenames installed on the server.
Shared
local themes = exports.fxChat:getThemeNames()
returns
string[]
e.g. { "default", "midnight", "crimson", "glass", "catppuccin", "samp", "ghostty" }
Example
local available = exports.fxChat:getThemeNames()
print('Themes:', table.concat(available, ', '))

getVersion()

Returns the fxChat version string from fxmanifest.lua.
Shared
local version = exports.fxChat:getVersion()
returns
string
e.g. "2.0.0".
Example
if exports.fxChat:getVersion() < '2.0.0' then
    print('Older fxChat — some features may be missing')
end

Don’t make security decisions based on client-side getConfig — the server source is the only trusted one.