Features
Detailed overview of nox-chat features.
Channels
nox-chat supports multiple chat channels:
World (Proximity)
- Messages only visible to nearby players
- Default 20m radius (configurable)
- Used for roleplay conversations
Global
- Messages visible to all players
- Used for OOC and announcements
System
- Admin-only input channel
- Used for server announcements
Custom Tags
Players can create personalized name tags:
- Open settings menu
- Navigate to "Custom Tag"
- Enter tag text (max 20 characters)
- Select tag color
- Save changes
Tag appears before player name in chat:
[VIP] PlayerName: Hello everyone!
Discord Role Requirement
If Config.discordRoles.features.customTag.enabled = true, players need the configured Discord role to use custom tags.
Speech Bubbles
3D speech bubbles appear above players when they chat:
- Automatically positioned above player head
- Fades based on distance
- Multiple design presets available
Presets
| Preset | Description |
|---|---|
| Classic | Black background, white text |
| Modern | Dark gray, subtle border |
| Neon | Black with neon green text |
TTS (Text-to-Speech)
Convert chat messages to audio:
Requirements
- xsound resource installed and running
Supported Languages
| Language | Code |
|---|---|
| English | en |
| Korean | ko |
| Japanese | ja |
| Chinese | zh-CN |
Usage
- Enable TTS in settings
- Select preferred voice
- Chat messages will be spoken aloud
Whisper System
Private messaging between players:
Send Whisper
/w [player_id] [message]
/w 5 Hey, meet me at the bank
Reply to Whisper
/r [message]
/r Sure, I'll be there in 5 minutes
RP Commands
/me - Action
Describes what your character is doing:
/me waves hello
Output: * PlayerName waves hello
/do - Description
Describes the environment or situation:
/do The door creaks open slowly
Output: * The door creaks open slowly (PlayerName)
/ooc - Out of Character
Global OOC chat:
/ooc brb in 5 minutes
Output: [OOC] PlayerName: brb in 5 minutes
/twt - Twitter
Social media style messages:
/twt Just arrived in Los Santos! #newlife
Output: [Twitter] @PlayerName: Just arrived in Los Santos! #newlife
/ad - Advertisement
Advertisements with phone number:
/ad Selling Elegy for $50k, call me!
Output: [AD] Selling Elegy for $50k, call me! | NO: 555-1234
Anti-Spam Protection
Built-in spam prevention:
- Detection - Monitors message frequency
- Warning - Players receive warnings
- Cooldown - Temporary chat restriction
- Block - Extended block after multiple warnings
Thresholds
| Setting | Default | Description |
|---|---|---|
| Threshold | 10 | Messages before warning |
| Window | 5s | Detection timeframe |
| Max Warnings | 3 | Warnings before block |
| Block Time | 30s | Block duration |
Discord Integration
Sync permissions with Discord roles:
Setup
- Create Discord bot
- Add bot to your server
- Enable "Server Members Intent"
- Configure role mappings in config
Features by Role
- Custom Tags - Allow tag customization
- TTS - Allow text-to-speech
- Bubble Custom - Allow bubble customization
- Shortcuts - Extended shortcut slots
Donation Tier Display
For QBCore servers with donation systems:
Config.donation = {
enabled = true,
BLUE_1 = { icon = 'blue_1.png', color = '#3498db' },
BLUE_2 = { icon = 'blue_2.png', color = '#2980b9' },
-- Add more tiers...
}
Donation tier is displayed as an icon next to player name.
Integration API
Send chat messages from other resources using events and exports.
Server Events
Send Proximity Message
Send a message to nearby players:
-- Server-side
TriggerEvent('chat:server:SendProximityMessage', {
message = 'Hello nearby players!',
position = GetEntityCoords(GetPlayerPed(source))
})
Send Global Message
Send a message to all players:
-- Server-side
TriggerClientEvent('chat:addGlobalMessage', -1, playerName, {
channel = 'global',
category = 'global',
prefix = '[System]',
name = 'Server',
text = 'Welcome to the server!'
})
Send System Message
Send a system notification:
-- Server-side (to specific player)
TriggerClientEvent('chat:addMessage', targetSource, {
channel = 'system',
category = 'system',
prefix = '[Alert]',
name = '',
text = 'You have received a reward!'
})
-- Server-side (to all players)
TriggerClientEvent('chat:addMessage', -1, {
channel = 'system',
category = 'system',
text = 'Server restart in 5 minutes!'
})
Client Events
Add Message (Client-side)
-- Client-side
TriggerEvent('chat:addMessage', {
channel = 'system',
category = 'system',
prefix = '[Info]',
text = 'Local notification message'
})
FiveM Default Format Compatible
nox-chat supports the default FiveM chat format:
-- Server-side (FiveM default format)
TriggerClientEvent('chat:addMessage', source, {
args = { 'Server', 'Your message here' }
})
-- With color
TriggerClientEvent('chat:addMessage', source, {
color = { 255, 0, 0 },
args = { 'Error', 'Something went wrong!' }
})
Server Exports
Custom Tag Management
-- Get player's custom tag (sync)
local tag = exports['nox-chat']:GetPlayerCustomTagSync(source)
-- Returns: { text = "VIP", color = "#ff0000" } or nil
-- Get player's custom tag (async)
exports['nox-chat']:GetPlayerCustomTag(source, function(tag)
if tag then
print("Tag: " .. tag.text)
end
end)
-- Set player's custom tag (admin)
exports['nox-chat']:SetPlayerCustomTag(source, "VIP", "#ff0000", function(success)
if success then
print("Tag set successfully")
end
end)
-- Clear player's custom tag (admin)
exports['nox-chat']:ClearPlayerCustomTag(source, function(success)
print(success and "Tag cleared" or "Failed to clear tag")
end)
Example: Custom Resource Integration
Police Alert System
-- server.lua
RegisterCommand('policealert', function(source, args)
local message = table.concat(args, ' ')
-- Send to all players
TriggerClientEvent('chat:addMessage', -1, {
channel = 'system',
category = 'system',
prefix = '[🚨 POLICE]',
text = message
})
end, true) -- admin only
Custom Notification Resource
-- server.lua
function SendChatNotification(targetSource, title, message, color)
TriggerClientEvent('chat:addMessage', targetSource, {
channel = 'system',
category = 'system',
prefix = '[' .. title .. ']',
text = message,
color = color
})
end
-- Usage
SendChatNotification(-1, 'EVENT', 'Double XP weekend starts now!', '#00ff00')
Last updated: January 28, 2026