# Events & Exports

You can continue sending messages to the chat through the `chat:addMessage` event and the export `addMessage`  just like before, except now you can add a <mark style="color:yellow;">tag</mark> and <mark style="color:yellow;">mode</mark> elements to the message table so that you can filter it in the different sections of the chat

## Event

<mark style="color:green;">`CLIENT`</mark> <mark style="color:green;"></mark><mark style="color:green;">/</mark> chat:addMessage

```lua
-- tag  => can be anything | default 'feed'
-- mode => can be feed, ooc, game, dispatch, staff | default 'feed'

local message = {
    color = {240, 40, 0}, -- color of the left border
    args = {'Title','Message text'} -- arguments for the chat box
    tag = 'me', -- is new,
    mode = 'game' -- is new
}

TriggerEvent('chat:addMessage', message)
```

***


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://fivem.lvsoft.com.ar/qb-esx/lvs-chat/events-and-exports.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
