# Exports & How to use

## Client Exports / Triggers

<table><thead><tr><th width="550" align="center">Export</th><th align="center"></th></tr></thead><tbody><tr><td align="center">exports['brutal_3dtextui']:Create3DTextUI(id, position, type, style, maincolor, textcolor, backgroundcolorm, keys, url)</td><td align="center">Create export</td></tr><tr><td align="center">exports['brutal_3dtextui']:ChangeCoords(id, position)</td><td align="center">ChangeCoords export</td></tr><tr><td align="center">exports['brutal_3dtextui']:Delete3DTextUI(id)</td><td align="center">Delete export</td></tr><tr><td align="center">exports['brutal_3dtextui']:Toggle3DTextUI()</td><td align="center">Toggle export</td></tr></tbody></table>

* **Id**\
  \- It will be used for text identification. e.g. "menu1"&#x20;
* **Position**

  \- The position can be provided as a `vector3`, `vector4`, or an entity.
* **Type**\
  \- Display Type: "follow" or "static"\
  &#x20;  \- `"follow"` → The UI follows the target entity (e.g. player). \
  &#x20;  \- `"static"` → The UI stays at the given coordinates and does not move.
* **Style**\
  \- Preconfigured panel themes (1-6).\
  \- If set to `"custom"`, you can freely configure the additional appearance settings (borderStyle, borderRadius, boxShadow)
* **MainColor**\
  \- The menu's main colors are set by this. (you can set any color you want)
* **TextColor**\
  \- The color of the text in the menu.
* **BackroundColor**\
  \- If you want a background color for the menu items, set it here. \
  \- If not, use "none" to disable the background.
* **Keys**\
  \- Here you can set which button displays which element of the given panel.\
  \- This is what the structure of the keys table looks like:

```lua
	{
		{
			key = 'E', 
			keyNum = 38, -- Controls list: https://docs.fivem.net/docs/game-references/controls/
			text = 'Open Menu', 
			executeCommand = '', -- You can put your command here
			triggerName = '' -- You can put your trigger event here
      args = {}, -- (Optional) Table of arguments passed to the event
      canUseInVeh = false -- (Optional) Allow usage while inside a vehicle (default: false)
		},
    -- You can add more actions here...
	}
```

* **markerType** (optional, default: "dot")\
  **-** `"dot"` → Dynamic point marker (matches border style)\
  **-** `"cube"` → Dynamic cube marker\
  **-** `"<URL>"` → Custom image marker (direct image link)
* **DisplayDist** (*optional*)

  *-* Distance in which the TextUI becomes visible. (default value: 10.0)
* **InteractDist** (*optional*)

  *-* Distance in which the interaction buttons become usable. (default value: 2.0)
* **borderStyle** (*optional*)

  *-* Border type of the panel. (only required if `style = "custom"`)
* **borderRadius** (*optional*)

  *-* Enables rounded corners. (only required if `style = "custom"`)
* **boxShadow** (*optional*)

  *-* Enables panel shadow effect. (only required if `style = "custom"`)

## How to use?!

```lua
exports['brutal_3dtextui']:Create3DTextUI("example", vector4(-1269.9741, -1512.2517, 4.3138, 303.9054), "follow", 6, "white", "white", "black", 
	{
		{
			key = 'E', 
			keyNum = 38, 
			text = 'Open Menu', 
			executeCommand = '', 
			triggerName = ''
		}
	},
  "dot"
)
```


---

# 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://docs.brutalscripts.com/site/scripts/3d-text-ui/exports-and-how-to-use.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.
