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

# Integration

Show the prompts of ESX, QBCore, Qbox and ox\_lib scripts in the Striga Text UI design.

Striga Scripts use Striga Text UI through striga-core by themselves. Do the step for your framework below, so **every other** script on your server uses the new design too.

{% tabs %}
{% tab title="ESX" %}
**No file to edit.** Striga Text UI takes the place of `esx_textui`, so `ESX.TextUI` and `ESX.HideUI` show here.

In `server.cfg`, **remove** this line:

```
ensure esx_textui
```

{% hint style="warning" %}
Never run `esx_textui` and Striga Text UI at the same time.
{% endhint %}

To turn this off, set `Config.Capture.Esx = false` in `editable/config.lua`.
{% endtab %}

{% tab title="QBCore" %}

1. Open `qb-core/client/drawtext.lua`
2. Add the line below as the **first line** inside each of these four functions:

```lua
-- local function hideText()
if GetResourceState('striga-text-ui') == 'started' then return exports['striga-text-ui']:Hide() end

-- local function drawText(text, position)
if GetResourceState('striga-text-ui') == 'started' then return exports['striga-text-ui']:Show(text, position) end

-- local function changeText(text, position)
if GetResourceState('striga-text-ui') == 'started' then return exports['striga-text-ui']:Update(text, position) end

-- local function keyPressed()
if GetResourceState('striga-text-ui') == 'started' then return exports['striga-text-ui']:KeyPressed() end
```

This covers `exports['qb-core']:DrawText`, `ChangeText`, `HideText` and `KeyPressed`.
{% endtab %}

{% tab title="Qbox / ox\_lib" %}
Qbox shows its prompts with ox\_lib.

1. Open `ox_lib/resource/interface/client/textui.lua`
2. Add the line below as the **first line** inside each of these three functions:

```lua
-- function lib.showTextUI(text, options)
if GetResourceState('striga-text-ui') == 'started' then return exports['striga-text-ui']:Show(text, options) end

-- function lib.hideTextUI()
if GetResourceState('striga-text-ui') == 'started' then return exports['striga-text-ui']:Hide() end

-- function lib.isTextUIOpen()
if GetResourceState('striga-text-ui') == 'started' then return exports['striga-text-ui']:IsOpen() end
```

This covers `lib.showTextUI`, `lib.hideTextUI` and `lib.isTextUIOpen` from every script.

{% hint style="success" %}
Running QBCore or ESX **with** ox\_lib? Do this step too, so scripts that use `lib.showTextUI` show in the new design as well.
{% endhint %}
{% endtab %}
{% endtabs %}

{% hint style="info" %}
These one-line patches are safe. If Striga Text UI is stopped, the original prompts come back by themselves.
{% endhint %}

***

## Names that also work

You do not need to change the names other scripts send:

* Types: `inform`, `primary` (= info), `warn` (= warning), `danger` (= error).
* Positions: `left-center`, `right-center`... (ox\_lib and QBCore names).
* A text that starts with `[E]` shows `E` as the key: `'[E] Open door'`, `'[E] - Open door'` and `'[E]: Open door'` all work.

{% hint style="info" %}
In 3D mode these prompts are pinned in the world too, with no change in the scripts. See [3D Prompts](/docs/striga-text-ui/3d-prompts.md).
{% endhint %}

{% content-ref url="/pages/J7UhcES1kZDSYVTdjdu0" %}
[Exports & Events](/docs/striga-text-ui/exports-and-events.md)
{% endcontent-ref %}


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://striga.gitbook.io/docs/striga-text-ui/integration.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
