# 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_textui']:Open(message, color, thema, position)</td><td align="center">Open export</td></tr><tr><td align="center">exports['brutal_textui']:Close()</td><td align="center">Close export</td></tr></tbody></table>

* Message\
  \- Text of the message\
  \- The message must include a box with the key/control: \[E] or \[G] or \[CTRL] or what you want to write in the box. For example: "\[E] Open the menu", "Open the menu \[F6]". No matter where you type within the code.
* Color\
  \- <mark style="color:blue;">blue</mark> / <mark style="color:red;">red</mark> / <mark style="color:green;">green</mark> / <mark style="color:yellow;">yellow</mark> / <mark style="color:purple;">purple</mark> / <mark style="color:orange;">orange</mark> / gray | custom can be added in the config.lua
* Thema\
  \- Between 1-4.
* Position\
  \- left / right

## How to use?!

```lua
local shown = false
local inDistance = false

Citizen.CreateThread(function()
    while true do
        inDistance = false
        
        local playerCoords = GetEntityCoords(GetPlayerPed(-1))
		if #(playerCoords- v.coords) < 50.0 then
			DrawMarker(20, v.coords, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.3, 0.2, 0.2, 15, 100, 210, 255, false, true, 2, true, nil, false)

			if #(playerCoords- v.coords) < 2.0 then
				inDistance = true

				if not shown then
					shown = true
					exports['brutal_textui']:Open("[E] Open the Menu", "green", 1, "left")
				end
			end
		end

        if shown and not inDistance then
            exports['brutal_textui']:Close()
            shown = false
        end

        Citizen.Wait(1)
    end
end)
```
