🎯 Features

Dynamic Chat Modes

The chat system supports unlimited custom chat modes with the following properties:

Properties:

  • Custom commands and aliases

  • Proximity-based or global messaging

  • Permission control

  • Cooldown system

  • Visual customization (colors, icons, formatting)

Default Modes Included:

  • Local, Shout, Whisper, Me, Do, Try, OOC, Admin, Department, Advertisement

Usage:

-- Using commands
/local Hello everyone!
/me waves at crowd
/shout Anyone need help?
/ad Selling car at Legion Square!

Proximity Chat System

Implementation:

Features:

  • 3D distance calculation (includes vertical distance)

  • Configurable range (0-100 meters)

  • Sender always receives their own message

  • Optimized for large player counts (O(n) complexity)

  • Efficient entity coordinate caching

Distance Guidelines:

  • Whisper (5m): Close conversation, same room

  • Normal (15m): Standard speaking distance

  • Shout (30m): Loud yelling, across street

  • Custom: Configure any distance 0-100m

Discord Integration

Architecture:

  • Automatic role fetching on server start

  • Player data caching on join/disconnect

  • 30-minute periodic role refresh

  • 5-second API timeout protection

  • Graceful fallback when API unavailable

API Endpoints Used:

Configuration:

Features:

  • Priority-based role display (Discord hierarchy)

  • Avatar URL generation

  • Username synchronization option

  • Role mapping system

  • Default member role fallback

  • Max roles display limit

  • Show all roles option

  • Graceful fallback for API failures

Fallback Behavior:

Scenario
Behavior

Bot token not configured

Discord integration disabled, uses generic data

Discord API timeout

Uses cached data or generic fallback

Discord API error

Logs error, continues with fallback

Player has no Discord ID

Uses default member role

Role cache empty

Uses fallback priority system

Bot not in guild

Auto-detection fails, disables integration

In-Game Admin Editor

Technology:

  • Full React application embedded in NUI

  • Real-time configuration updates

  • JSON import/export functionality

  • Color picker with multiple formats

  • Icon picker with 1000+ Heroicons

  • Form validation and error handling

Access:

Editor Tabs:

  1. Modes - Chat mode management

    • Add, edit, delete chat modes

    • Configure: name, command, aliases, description

    • Visual: color, icon, format

    • Distance & range settings

    • Cooldown timer

    • Permissions (ACE)

    • Job requirements

  2. Settings - Global settings

    • Toggle cooldowns on/off

    • Enable/disable permission checks

    • Set max message length

    • Configure default chat mode

  3. Appearance - Layout & style

    • Font configuration (family, sizes, weights)

    • Layout settings (size, position, spacing)

    • Style options (border radius, blur, opacity)

  4. Theme - Color palette editor

    • 20+ theme colors

    • Real-time preview

    • Color picker (hex, RGB, HSL)

  5. Discord - Discord integration

    • Enable/disable integration

    • Configure bot token and guild ID

    • Role display settings

    • Default member role

  6. About - Version info and credits

Features:

  • Real-time preview

  • Hot-reload (no server restart needed)

  • Import/Export config

  • Validation prevents breaking changes

Permission System

ACE Integration:

Permission Types:

  • Global admin: daphne_chat.admin

  • Mode-specific: daphne_chat.{mode_name}

  • Custom: Any ACE permission string

Configuration:

Cooldown System

Features:

  • Per-player, per-command tracking

  • Configurable per mode

  • Global enable/disable toggle

  • Visual feedback to player

  • Automatic cleanup on disconnect

Default Cooldowns:

  • Advertisement: 120s (2 minutes)

  • Twitter: 30s

  • Others: 0s

Framework Integration

Supported Frameworks:

  • ESX

  • QBCore

  • QBox

  • Standalone (default)

Auto-Detection: The system automatically detects which framework is available.

Features:

  • Job requirements for chat modes

  • Money costs for messages

  • Group requirements

  • Framework-specific player data

  • Automatic detection or manual override

Last updated