Skip to main content
Hook into chat events from your own scripts.

Server-side

chatMessage (legacy, compatible)

Standard FiveM event — backwards-compatible.
Server
number
The sender’s server ID.
string
Sender display name (character name in roleplay, Steam name otherwise).
string
Raw message text (after color-code parsing).
Raw strings only. For rich payloads use fxChat:messageReceived below.

fxChat:messageReceived

Rich message event with the full options payload.
Server
number
Sender server ID.
object
Same shape as the options argument of addMessageargs, title, label, color, badge, special.
Example — log to your own analytics

fxChat:playerMuted

Fired when a player is muted (manually or auto-muted by rate limiter).
Server
number
Server ID of the muted player.
number | nil
Mute duration in ms, or nil for permanent.
string
"manual", "rate_limit", or "blacklist".

fxChat:playerUnmuted

Fired when a mute expires or is lifted.
Server

Client-side

fxChat:opened

Fired when the chat input becomes focused (T pressed).
Client

fxChat:closed

Fired when chat input loses focus (ESC pressed or message sent).
Client

fxChat:themeChanged

Fired when the active theme changes for this client (player picked a new one, or admin force-changed it).
Client
string
Filename without .json (e.g. "midnight").

Triggering events from your code

For most cases use the exports — but you can trigger these events manually if you need to.
Triggering fxChat:messageReceived notifies listeners but doesn’t broadcast. Use addMessage to send a real message.