> For the complete documentation index, see [llms.txt](https://fivem.lvsoft.com.ar/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fivem.lvsoft.com.ar/qb-esx/lvs-lib/notifications.md).

# notifications

## Notifications

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

***

### How to use:

Event:

```lua
message = 'Message content'
type = 'info'                -- info | warning | error
options = {
    time = 6000,             -- duration time
    position = 'top-left'    -- top-left | top-right | bottom-left | bottom-right
    caption = 'Optional Title'
}

-- from client
TriggerEvent('lvs_lib:client:notify', message, type, options)

-- from server
TriggerClientEvent('lvs_lib:client:notify', source, message, type, options)
```

Export:

```lua
message = 'Message content'
type = 'info'                -- info | warning | error
options = {
    time = 6000,             -- duration time
    position = 'top-left'    -- top-left | top-right | bottom-left | bottom-right
    caption = 'Optional Title'
}

exports.lvs_lib:notify(message, type, options)
```

***

### QBCore Integration:

Edit `qb-core/client/functions.lua`, replace the function <mark style="background-color:green;">QBCore.Functions.Notify</mark>(line 83) with:

```lua
function QBCore.Functions.Notify(text, texttype, length)
    local message
    local caption
    if type(text) == 'table' then
        message = text.text
        caption = text.caption
    else
        message = text
    end
    if texttype == 'police' or  texttype == 'ambulance' then
        texttype = 'warning'
    end
    TriggerEvent('lvs_lib:client:notify', message, texttype, {caption = caption, time = length})
end
```


---

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://fivem.lvsoft.com.ar/qb-esx/lvs-lib/notifications.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
