# Integrations

## DrawText3D to Brutal TextUI

Use this wrapper function to easily replace your old `DrawText3D` system with **brutal\_3dtextui**.

#### Wrapper Function

```lua
function DrawText3D(id, x, y, z, heading, text, command, event)
    exports['brutal_3dtextui']:Create3DTextUI(
        id,
        vector4(x, y, z, heading or 0.0),
        "follow",
        6,
        "white",
        "black",
        "white",
        {
            {
                key = 'E',
                keyNum = 38,
                text = text,
                executeCommand = command,
                triggerName = event
            }
        },
    )
end
```

#### Parameters

* **id** – Unique TextUI identifier (must be unique)
* **x, y, z** – World position
* **heading** – Rotation (use `0.0` if not needed)
* **text** – Displayed interaction text
* **command** – Command to execute ("" if unused)
* **event** – Event to trigger ("" if unused)
* **args** *(optional)* – Table of arguments passed to the event.
* **canUseInVeh** *(optional)* – Allows the action to be used inside a vehicle. Default is `false`.

#### Example Usage

```lua
exports['brutal_3dtextui']:Create3DTextUI(
        id,
        vector4(x, y, z, w),
        "follow",
        6,
        "white",
        "black",
        "white"
        {
            {
                key = 'E',
                keyNum = 38,
                text = "Open Bank Menu",
                executeCommand = "openbank",
                triggerName = ""
            }
        },
    )
```
