Solstice-CyberChat
A cyberpunk-themed advanced chat system for FiveM
1. Installation
Requirements
FiveM Server
OneSync Enabled (recommended)
Quick Install
Copy the Solstice-CyberChat folder to your server's resources directory
Add
ensure Solstice-CyberChat
to yourserver.cfg
Restart your server
Disable Default Chat (Important)
Add these lines to your server.cfg
to disable the default FiveM chat:
setr game_enableFallbackChat 0
sv_useDirectListing true
2. Features
Core Features
🎨 Cyberpunk-themed UI with customizable colors
💬 Command auto-completion
🔔 Advanced notification system
📜 Message history
🎯 Command suggestions
🔄 Message fade effects
🎨 Message type styling (error, success, warning, info)
Key Controls
T
- Open/Close chatL
- Cycle notification modes (Always, Active, Hidden)ESC
- Close chat↑/↓
- Navigate message historyTAB
- Auto-complete commandsENTER
- Send message
Notification Modes
Always: Notifications always visible
Active: Only show when chat is open
Hidden: No notifications shown
3. Configuration
Edit shared/config.lua
to customize the chat system:
Chat Colors
Config.Colors = {
primary = {
main = 'rgb(0, 255, 255)', -- Main accent color
dark = 'rgb(0, 200, 200)', -- Darker variant
dim = 'rgba(0, 255, 255, 0.1)', -- Background effects
glow = 'rgba(0, 255, 255, 0.2)' -- Glow effects
},
background = {
main = 'rgba(0, 20, 40, 0.85)', -- Main background
dark = 'rgba(0, 10, 20, 0.95)' -- Darker background
},
types = {
error = 'rgb(255, 50, 50)', -- Error messages
success = 'rgb(50, 255, 50)', -- Success messages
warning = 'rgb(255, 200, 50)', -- Warning messages
info = 'rgb(50, 150, 255)' -- Info messages
}
}
Message Settings
Config.MessageSettings = {
cooldown = 3000, -- Message cooldown in ms
maxLength = 256, -- Maximum message length
rateLimitCount = 5, -- Messages per minute
rateLimitTime = 60000 -- Rate limit window (ms)
}
Default Settings
Config.DefaultSettings = {
notificationMode = 'active', -- Default mode (always/active/hidden)
fadeTime = 5000, -- Message fade duration
maxMessages = 100, -- Maximum messages shown
maxMessageLength = 256 -- Maximum message length
}
4. Export Functions
Client Exports
Show Notification
exports['Solstice-CyberChat']:showNotification(message, type, duration, persistent)
message
: Message texttype
: 'success', 'error', 'warning', 'info'duration
: Duration in ms (default: 3000)persistent
: Boolean, stays visible in any mode
Example:
exports['Solstice-CyberChat']:showNotification('Item purchased!', 'success', 3000)
Add Message
exports['Solstice-CyberChat']:addMessage({
type = 'info',
text = 'Message text',
author = 'System'
})
Add Command Suggestion
exports['Solstice-CyberChat']:addSuggestion(command, description, params)
Example:
exports['Solstice-CyberChat']:addSuggestion(
'/car',
'Spawn a vehicle',
{
{ name = 'model', help = 'Vehicle model name' }
}
)
Server Exports
Register Command
exports['Solstice-CyberChat']:registerChatCommand(command, description, handler)
Example:
exports['Solstice-CyberChat']:registerChatCommand('heal', 'Heal a player', function(source, args)
local target = args[1] and tonumber(args[1]) or source
-- Healing logic here
end)
5. Developer Integration
Adding Custom Commands
Server-side:
RegisterServerEvent('myscript:initialize')
AddEventHandler('myscript:initialize', function()
exports['Solstice-CyberChat']:registerChatCommand('customcmd', 'Description', function(source, args)
-- Command logic
end)
end)
Custom Notification Types
Create a new notification type in your resource:
-- Add to Config.Colors.types in config.lua
types = {
custom = 'rgb(150, 75, 255)'
}
-- Using the custom type
exports['Solstice-CyberChat']:showNotification('Custom message', 'custom', 3000)
Message Formatting
The chat supports:
URLs: Automatically converted to clickable links
IDs: #123 format
Mentions: @username format
Colors: ^1 to ^9 color codes
Commands: /command highlighting
6. Troubleshooting
Common Issues
Chat Not Appearing
Check
ensure Solstice-CyberChat
is in yourserver.cfg
Verify default chat is disabled
Check console for errors
Commands Not Registering
Ensure commands are registered after resource start
Check for naming conflicts
Verify permissions if applicable
Notification Issues
Check current notification mode (press L to cycle)
Verify notification settings in config
Check if other resources are conflicting
Support
For additional support or feature requests:
Join our Discord community
Contact our support team
8. License
This resource is protected by copyright law. Redistribution or resale is strictly prohibited.
Need more help? Join our Discord server or contact support!
Last updated
Was this helpful?