> For the complete documentation index, see [llms.txt](https://los-santos-project.gitbook.io/project-los-santos-scripts/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://los-santos-project.gitbook.io/project-los-santos-scripts/scripts/text-ui.md).

# Text UI

## Exports

### Show Text UI

```lua
exports.ls_textui:showTextUI()

params: [
    data: table [
        id: 'string',
        icon: 'string',
        key: 'string'
        message: 'string',
    ]
]

Example:
exports.ls_textui:showTextUI({{id = 'clothing_store', key = 'E', message = 'Open clothing store'}})
exports.ls_textui:showTextUI({{id = 'clothing_store', icon = 'far fa-basket-shopping-simple', message = 'Open clothing store'}})

You can use a key like 'E' or an icon like 'far fa-car', but only font awesome icons are supported.
```

### Hide Text UI

```lua
Support two type, string or table,

If you have only one text UI that you want to hide, you can simply use a string to hide it.
exports.ls_textui:hideTextUI('clothing_store')

If you have more than one text UI, you can use a table format and list them one after another, like this:
exports.ls_textui:hideTextUI({'example_1', 'example_2', 'example_3'})
```

### Get Text UI's

<pre class="language-lua"><code class="lang-lua">local retreval = exports.ls_textui:getTextUIs()

<strong>This export returns the currently available text UIs. 
</strong><strong>If there are no active text UIs, it will return false.
</strong></code></pre>


---

# 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://los-santos-project.gitbook.io/project-los-santos-scripts/scripts/text-ui.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.
