> For the complete documentation index, see [llms.txt](https://docs.brutalscripts.com/site/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.brutalscripts.com/site/scripts/3d-text-ui/exports-and-how-to-use.md).

# 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"
)
```
