> For the complete documentation index, see [llms.txt](https://hrscripts.gitbook.io/hrscripts-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hrscripts.gitbook.io/hrscripts-documentation/resources/hrlib/modules/interface/client.md).

# 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>
