Triggering this event sends a chat message to the client it runs on. It’s the
event-based equivalent of the addMessage export, useful when you’re already
in a client script and don’t need the export indirection.
Event Name
chat:addMessageParameters
- object message: The message to display
- template (optional): ID of a template registered with
chat:addTemplate - color (optional):
{r, g, b}array for the message color - multiline (optional): Whether the message can wrap across multiple lines
- args: Array of strings substituted into the message, typically
{author, text}
- template (optional): ID of a template registered with
Example
TriggerEvent('chat:addMessage', {
color = { 255, 0, 0 },
multiline = true,
args = { 'Me', 'Please be careful to not step on too many snails!' }
})