> For the complete documentation index, see [llms.txt](https://grp-development.gitbook.io/solid-scripts/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://grp-development.gitbook.io/solid-scripts/resources/solid-chat/exports-and-events.md).

# Exports and events

Use SOLID Chat from your own resources.

SOLID Chat keeps every event and export of the default FiveM chat, and adds its own for tabs, overhead text and message hooks. Resources written for the default chat keep working with no edits. Because SOLID Chat provides `chat`, resources with `dependency 'chat'` start with it too.

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Server exports</strong></td><td>Messages, suggestions, overhead text, hooks and modes.</td><td><a href="https://grp-development.gitbook.io/solid-scripts/resources/solid-chat/exports-and-events/server-exports">https://grp-development.gitbook.io/solid-scripts/resources/solid-chat/exports-and-events/server-exports</a></td></tr><tr><td><strong>Client exports</strong></td><td>Chat state, messages and suggestions from client scripts.</td><td><a href="https://grp-development.gitbook.io/solid-scripts/resources/solid-chat/exports-and-events/client-exports">https://grp-development.gitbook.io/solid-scripts/resources/solid-chat/exports-and-events/client-exports</a></td></tr><tr><td><strong>Events</strong></td><td>Default chat events, message checks and chat visibility.</td><td><a href="https://grp-development.gitbook.io/solid-scripts/resources/solid-chat/exports-and-events/events">https://grp-development.gitbook.io/solid-scripts/resources/solid-chat/exports-and-events/events</a></td></tr></tbody></table>

#### Calling an export

The resource name contains a hyphen, so always use bracket syntax:

```lua
exports['solid-chat']:addMessage(-1, 'Server restart in 5 minutes.')
```

#### Good to know

* **Keep the folder name `solid-chat`.** Exports are called by resource name.
* **Tabs.** Add `tab = 'local'`, `'jobs'` or `'staff'` to a message to show it in that tab. Without it, a message shows in All only.
* **Messages from your resources are trusted.** They skip the word filter and the cooldowns.

{% hint style="info" %}
Missing an export you need? Ask for it in our [Discord](https://discord.gg/cCypB2QcMv).
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://grp-development.gitbook.io/solid-scripts/resources/solid-chat/exports-and-events.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
