Integrations

of_chat_theme integrates with popular FiveM resources.

Target System Integration

Control which target system is used:

Config.Target = "qb-target"  -- "ox" | "qb-target"

ox_target

If using ox_target:

Config.Target = "ox"

No additional configuration needed. NUI events are automatically sent to ox_target.

qb-target

If using qb-target:

Config.Target = "qb-target"

Works automatically with built-in commands.

Phone Integration

LB-PHONE

Automatic integration with LB-PHONE. Configure in config/config.lua:

Config.Hooks = {
    ["LB-PHONE"] = {
        birdy = true,  -- Convert Birdy posts to /twitter command
    },
}

When enabled:

  • Birdy app posts are sent as /twitter command
  • Appears in the global Twitter feed
  • Shows with Twitter template styling

Job Logging

qb-logs Integration

Automatic detection and logging:

-- No configuration needed!
-- If qb-logs is running, chat messages are logged automatically

Messages logged to Discord webhook:

  • Command type (me, do, ooc, etc.)
  • Player name and ID
  • Message content
  • Timestamp

Configure the webhook in qb-logs resource.

Framework Detection

Automatic framework detection with fallback:

Config.Framework = "qb"  -- "qb" | "esx"

The script detects:

  • qb-core (QB)
  • qbx_core (QBox)
  • es_extended (ESX)

If manual override needed:

Config.Framework = "esx"  -- Force ESX

Notification System

Control how notifications appear:

Config.Notify = "ox_lib"  -- "ox_lib" | "framework"

ox_lib Notifications

Modern toast-style notifications:

-- Automatic for command errors, info messages

Framework Notifications

Use framework's native notification:

Config.Notify = "framework"
-- Uses QB/ESX notification system

Chat Theme Integration

The resource registers itself with FiveM's chat theme system:

chat_theme 'overtheme' {
    styleSheet = 'assets/styles/main.css',
    script     = 'assets/scripts/main.js',
    msgTemplates = {
        default    = '<span class="msg-content">{0} {1}</span>',
        defaultAlt = '<span class="msg-content">{0}</span>',
    }
}

This enables:

  • Custom CSS styling
  • JavaScript message processing
  • Native FiveM chat integration

Mask System

Integrated identity masking via /mask command:

Config.Modules = {
    mask = true,  -- Enable /mask command
}

When masked:

  • Placeholders show "Anonymous"
  • True identity hidden from others
  • Still visible in logs
  • Toggleable with /mask

Friends System

Optional friends list system:

Config.Modules = {
    friends = true,  -- Enable friend relationships
}

Commands:

  • /friend add [id] - Add friend
  • /friend remove [id] - Remove friend
  • /friends - View your friends

Benefits:

  • Use {Friends:...} placeholder to show data only to friends
  • Private friend-only channels possible
  • Visual indicator of friends in chat

3D Bubble System

Floating chat bubbles above player heads:

Config.Modules = {
    bubble = true,
}

Config.Bubble = {
    duration = 5.0,    -- Bubble visibility duration
    range    = 15.0,   -- Render and broadcast range
    offsetZ  = 0.20,   -- Height above head
}

Commands using bubbles:

  • /me (when enabled)
  • /do (when enabled)

Requirements:

  • NUI rendering (built-in)
  • Client-side script processing

Auto Messages

Scheduled announcements to all players:

Configure in config/automessages.lua:

Config.AutoMessages = {
    {
        interval = 600,           -- Seconds between messages (600 = 10 min)
        template = 'announce',
        messages = {
            "Visit our Discord: discord.gg/overflow",
            "Use /report for issues",
            "Follow server rules!",
        }
    }
}

Messages rotate through the list every interval.

Discord Webhook Integration

Send chat logs to Discord:

Configure in config/log/config.lua:

Config.Webhooks = {
    ["chat"] = "https://discord.com/api/webhooks/...",
}

Logged messages:

  • /me actions
  • /do descriptions
  • /ooc chat
  • Job whispers
  • Private messages

Locale System

Support multiple languages:

Config.Locale = "en"  -- Change to other available locales

Add translations in config/locales/:

-- config/locales/en.lua
return {
    ["cmd.me"]      = "In-character roleplay action",
    ["cmd.do"]      = "Describe the environment",
    ["error.msg_usage"] = "Usage: /msg [id] [message]",
}

Configuration
../configuration/
Commands
../commands/