# alert dialog

## Alert Dialog

<figure><img src="https://share.lvsoft.com.ar/images/JNC3C.png" alt=""><figcaption></figcaption></figure>

***

### How to use:

Client-side using exports

**Example:**

```lua
local alert = exports.lvs_lib:alertDialog({
    header = 'LVS Scripts',
    content = '# Hello there \n **Markdown** `support`!',
    cancel = true
})
-- returns 'confirm' if the player pressed the confirm button, 
-- otherwise if the player pressed the cancel button return will be 'cancel'
print(alert)


-- close de alert
-- force closes the active alert dialog and sets its return data as nil
exports.lvs_lib:closeAlertDialog()
```

***


---

# 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://fivem.lvsoft.com.ar/qb-esx/lvs-lib/alert-dialog.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.
