Blaze Scripts
Home

FiveM Scripts

Chat System [Standalone] (Escrow)
Chat System [Standalone]

A feature-rich chat system for FiveM & RedM servers with advanced features including admin styling, preconfigured OOC commands, spam protection, and chat logging.

🔹 Support: Join our Discord
🔹 Video Preview

d63f807d4c601e98dd4298b82f8a010cec6a3887.png

06f1e121c219fc3d1598d996245a8c89c3ce7e00.png

Features

  • Cross-Platform: Works seamlessly on both FiveM and RedM servers with automatic platform detection
  • Custom Templates: Easily create and customize chat message templates via config.lua
  • Admin Styling: Special formatting for admin messages with configurable colors
  • OOC Command: Built-in Out-of-Character chat command (as example for more commands like /me)
  • Spam Protection: Configurable spam detection and timeout system
  • Chat Logging: Comprehensive logging system with timestamps and player identifiers
  • Command Suggestions: Automatic command suggestions based on player permissions
  • Customizable UI: Adjust chat appearance through simple configuration options

Dependencies

  • None
  • Works on FiveM & RedM!

Configuration

All settings can be adjusted in the config.lua file:

871f774bf73eb63c45fb8fd218dce871b540d83c.png

Commands

OOC Command 

Use /ooc [message] to send an Out-of-Character message that will be displayed with a blue [OOC] prefix. 

There is a commands.lua file where you can add more commands (server-side).

Usage Examples

Sending an Important Message

TriggerEvent('chat:addMessage', {
    templateId = 'important',
    args = {'This is an important message!'}
})

Sending an Admin Message

Admin messages are automatically styled when sent by players with admin permissions.

Advanced Usage

Creating Custom Commands

You can easily add your own commands by editing the commands.lua file. Here's an example of how to create a custom /me command:

RegisterCommand('me', function(source, args)
    local playerName = GetPlayerName(source)
    if not playerName then return end
    
    if #args == 0 then
        TriggerClientEvent('chat:addMessage', source, {
            color = {255, 0, 0},
            args = {"SYSTEM", "Please provide an action for /me."}
        })
        return
    end
    
    local message = table.concat(args, ' ')
    
    TriggerClientEvent('chat:addMessage', -1, {
        templateId = 'me',
        args = {playerName, message}
    })
    
    -- Log message if enabled
    logToFile(message, source, "me")
end, false)

Then add a template in config.lua:

Config.Templates['me'] = '^5* {0} {1}'

Adding Custom Styling

You can customize the appearance of the chat window by modifying the Config.Style table in config.lua.

Permissions

  • Admin styling requires the command ACE permission
  • Command suggestions are based on player's ACE permissions


Locked Files: server.lua and client.lua are locked in the resource BY CFX ESCROW. UI, Config, Comamnd.lua is open.