esx_chat_theme
esx_chat_theme for ESX Legacy explained. What the ESX chat theme changes, how it hooks into the cfx chat resource, and how to customize or remove it.
esx_chat_theme is a visual theme for the default FiveM chat resource. It
gives chat messages the GTA-style Chalet font with a drop shadow and removes the
chat window background. It contains no Lua code and no API; it is a pure style
add-on you can keep, edit or remove.
Overview
| Resource | esx_chat_theme |
| Side | Client (NUI styles for chat) |
| Dependencies | The cfx chat resource (not declared in the manifest) |
| Config | None, edit style.css |
| Required | No |
| Game | common |
How it works
The cfx chat resource scans running resources for a chat_theme entry in their
fxmanifest.lua and loads the listed files into the chat page. esx_chat_theme
registers a theme named esx:
chat_theme 'esx' {
styleSheet = 'style.css',
script = 'shadow.js',
msgTemplates = {
default = '<b>{0}</b><span>{1}</span>'
}
}| Part | Purpose |
|---|---|
style.css | Fonts (Font2, Font2_cond loaded from runtime.fivem.net), transparent .chat-window, message size and spacing |
shadow.js | Injects an SVG drop shadow filter (#svgDropShadowFilter) that .msg uses for readable text on any background |
msgTemplates.default | Renders the author ({0}) in bold followed by the message ({1}) |
Customization
Change the look in style.css. The .msg rule controls most of it:
.msg {
font-family: Font2, sans-serif;
color: #ffffff;
font-size: calc(1.7vh);
filter: url(#svgDropShadowFilter);
line-height: calc(2.7vh * 1.2);
margin-bottom: 0;
}The font files are loaded from runtime.fivem.net at runtime. If that host is
unreachable, the chat falls back to sans-serif.
Install order
Start chat before the theme. The official recipe starts chat first and the
theme as part of [core]:
ensure chat
ensure oxmysql
ensure esx_lib
ensure es_extended
ensure [core]Common issues
- Theme has no effect. The
chatresource is not running, or you use a third-party chat that ignoreschat_themeentries. - Styles clash with another theme. Several
chat_themeresources can be active at once and their CSS stacks. Stop the one you do not want.
Related
Frequently asked questions
Independent documentation
Last updated on
esx_loadingscreen
esx_loadingscreen for ESX Legacy explained. How the loading screen works, how to change the logo, tips and texts, and how shutdown with multicharacter works.
cron
cron reference for ESX Legacy. Schedule daily server tasks at a fixed time with the cron:runAt event, weekday handling, timezone and common pitfalls.