πŸ’¬nova_chat

NOVA Framework chat system with styled messages and built-in commands.

Features

  • Styled Chat β€” Custom NUI with message history

  • Command System β€” Slash commands with server-side handling

  • Built-in Commands β€” /me, /ooc, /anuncio, /limpar

  • Character Names β€” Uses character first/last name when available

  • Compatibility β€” Supports chat:addMessage (FiveM standard)

Built-in Commands

Command
Description
Example

/me [action]

Roleplay action (purple, no author)

/me waves hello

/ooc [message]

Out-of-character message

/ooc Anyone need a ride?

/anuncio [message]

Server announcement (admin only)

/anuncio Server restart in 5 min

/limpar

Clear your chat messages

/limpar

How to Register Commands

Option 1: Add to chatCommands table (server/main.lua)

Edit nova_chat/server/main.lua and add to the chatCommands table:

Option 2: Use RegisterCommand (FiveM native)

Commands not found in chatCommands are forwarded to ExecuteCommand. So you can use RegisterCommand in any resource:

When a player types /mycommand in the chat, it will be forwarded to this.

Option 3: Server export to send messages

Server Export

Export
Parameters
Description

SendMessage

source, author, message, color

Send a message to chat

Message Types

The type field affects styling:

  • global β€” Normal chat message

  • me β€” Roleplay action (purple)

  • ooc β€” Out-of-character

  • announce β€” Server announcement (yellow)

  • system β€” System message

Usage Examples

Send message from server

Send to specific player

Compatibility with chat:addMessage

Configuration

Locales are in locales.lua (pt/en). Keys include unknown, no_permission, announce, system, console, welcome, player, placeholder.

Notes

  • Chat opens with T (control 245)

  • Messages are limited to 500 characters

  • /anuncio requires nova_core:IsAdmin(source) to be true

  • Provides chat resource (replace default FiveM chat)

Security

  • All operations are validated server-side

  • Internal event names are not disclosed in this documentation for security purposes

Last updated