Chat Theme Documentation
Quick Links
- Quick Start - Get running in 5 minutes
- Installation - Complete setup guide
- Configuration - All available settings
- Message Templates - Design custom messages
- Channels - Setup role-based channels
- Commands - Built-in and custom commands
- Placeholders - Dynamic values reference
- Integrations - Framework & resource hooks
- Advanced - Server-side templates, custom handlers
- FAQ - Troubleshooting & common issues
Core Features
Message Templates
Design messages with full control:
Config.Theme['cmd:me'] = T.build()
:bg('#ffffff20') -- Background color
:tag('ME', '#E8A838') -- Badge
:author({ bold = true }) -- Player name (bold)
:text(': ') -- Static text
:message() -- Message content
:done()
Channels with Permissions
Config.Channels = {
{
id = 'police',
label = 'Police Radio',
participants = {
read = { { type = 'job', value = 'police' } },
write = { { type = 'job', value = 'police' } },
},
}
}
Job Whisper System
Config.JobWhisper = {
policeRadio = {
command = "r",
sender = { job = "police", grade = 0 },
receivers = {
{ job = "police", grade = 0 },
},
}
}
Built-in Commands
Key Concepts
Placeholders
Dynamic values that get replaced at runtime:
{Framework:GetName} -- Player character name
{Framework:GetJob} -- Current job
{Placeholder:ServerId} -- Server player ID
{Masked:Framework:GetName} -- "Anonymous" if masked
{Friends:Framework:GetName} -- Only visible to friends
Components
Build messages from components:
T.tag('TEXT') -- Badge
T.author() -- Player name
T.message() -- Message content
T.text('static text') -- Static content
T.icon(svgString) -- SVG icon
T.spacer() -- Spacing
T.bold(), T.italic() -- Formatting
Broadcasting
Send messages with different visibility:
Commands.sendProximity(template, args, range) -- Nearby players
Commands.sendProximityLos(template, args, range) -- Line of sight
Commands.sendPrivate(targetId, template, args) -- One player
Commands.sendAll(template, args) -- Everyone
Installation Overview
# 1. Download from releases
# 2. Extract to resources/of_chat_theme
# 3. Add to server.cfg
ensure chat
ensure of_chat_theme
# 4. Restart server - Done!
All features work out of the box. Customize with config files.
File Structure
of_chat_theme/
└── config/ # User configuration
├── config.lua # Main settings
├── templates.lua # Message designs
├── channels.lua # Channel definitions
├── commands/
│ ├── client.lua # Client commands
│ └── server.lua # Server commands
├── placeholders.lua # Custom placeholders
├── automessages.lua # Scheduled messages
└── locales/ # Translations
Frameworks Supported
- QBCore (1.2+) - Full support
- QBX - Full support
- ESX (Latest) - Full support
Framework detection is automatic. Override with Config.Framework.
Dependencies
Required:
chat- FiveM native chatox_lib- Libraries and utilities
Optional:
ox_targetorqb-target- Target frameworkqb-logs- Automatic chat loggingLB-PHONE- Phone integration
Learning Path
- Start here: Quick Start - 5 minute setup
- Basic usage: Commands - Built-in commands
- Customization: Templates - Design messages
- Advanced: Configuration - Full reference
- Troubleshooting: FAQ - Common issues
Version
Current version: 2.0.0+
Check Installation for version requirements.
Ready to get started? → Quick Start Guide