# Client

## showTextUI

Function to show HRLib's textUI

```lua
function HRLib.showTextUI(description: string)
```

Parameters description

* `description` - the textUI content

Preview

<figure><img src="/files/Ts7nIFtlpNjsuPKVFbtv" alt=""><figcaption></figcaption></figure>

## isTextUIOpen

Function to get the status of the textUI with option to get the latest description

```lua
function HRLib.isTextUIOpen(returnLastDescription: boolean?):
boolean status,
string? textUIContent
```

Parameters description

* `returnLastDescription` - sets whether or not the last description should be returned

Return description

* `status` - contains the status of the textUI as boolean, for is it open or is it closed
* `textUIContent` - the last content of the textUI (only available when returnLastDescription is true)

## hideTextUI

Function to hide the textUI

```lua
function HRLib.hideTextUI()
```

## progressBar

Function to set the progress bar with multiple options and three variants of progressBar

```lua
function HRLib.progressBar(
    type: 'circle'|'horizontal'|'vertical',
    options: {
        duration: number,
        description: string?,
        position: 'center-left'|'center'|'center-right'|'bottom-left'|
        'bottom-center'|'bottom-right'
    },
    await: boolean?,
    freezePlayer: boolean?,
    animation: {
        duration: number?,
        animName: string,
        animDict: string
    }
)
```

Parameters description

* `type` - the progress bar type
* `options` - the progress bar options
* `await` - sets whether or not the code should wait the progressBar to finish
* `freezePlayer` - sets whether or not the player is freezed during the progress bar
* `animation` - sets whether or not the player should play an animation during the progress bar\
  (if nil it won't start any animation)
  * Fields:\
    `duration` - the animation duration (in msec, if nil, it will be -1)\
    `animName` - the animation name\
    `animDict` - the animation dictionary\
    `animFlag` - the animation flag, see [TaskPlayAnim](https://docs.fivem.net/natives/?_0x5AB552C6) for eScriptedAnimFlags (list of flags)

Preview

<figure><img src="/files/h619dwH49LgGXjqdFezV" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/WgTd2sJd5ZKfAHoaNUqj" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/rtGKGITF0fxAU4uP6vQr" alt=""><figcaption></figcaption></figure>

## createAlertDialogue

Function to create an alert dialogue

```lua
function HRLib.createAlertDialogue(
    options: {
        title: string,
        description: string?,
        onAgree: function?,
        onCancel: function?
    }
)
```

Parameters description

* `options` - the dialogue's options

Preview

<figure><img src="/files/NgJj5u2Bny4JzID8N1tZ" alt=""><figcaption></figcaption></figure>

## createInputDialogue

Function to create input dialogue

```lua
function HRLib.createInputDialogue(
    options: {
        title: string,
        questions: {
            type: 'text',
            options: HRLibInputDialogueTextOptions
        }[],
        onCancel: function?
    }
): string[]? result
```

Parameters description

* `options` - the dialogue's options

Return description

* `result` - contains the values from the inputed values

Preview

<figure><img src="/files/8Ry4jZdOi8qKMeRVvv3b" alt=""><figcaption></figcaption></figure>

## Notify

Function to send notification to a player with HRLib's notification system

```lua
function HRLib.Notify(-
    description: string,
    type: 'success'|'error'|'info'|'warning',
    duration: number?,
    pos: 'top-right'|'center-right'|'bottom-right'|'frombelow-right'|
    'top-left'|'left-center'|'frombelow-left'?,
    sound: boolean?
)
```

Parameters description

* description - the notification's content
* type - the notification type (default is 'info')
* duration - the notification duration (default is 2500, in msec)
* pos - the notification position on the screen (default is found in HRLib's config)
* sound - sets whether or not the notification sound should be played (default is true)

Preview

<figure><img src="/files/sgXQSf4RAC5mExvguwaB" alt=""><figcaption></figcaption></figure>


---

# 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://hrscripts.gitbook.io/hrscripts-documentation/resources/hrlib/modules/interface/client.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.
