alert

Alert


How to use:

Client-side using exports

Example:

-- show up the alert
exports.lvs_lib:showAlert({
    title = 'Box Title',
    message = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. \n Aenean vitae.'
    --time = 10000 -- [optional] The time in milliseconds you want the alert to disappear
})

-- update the title and mesagge on the visible alert
exports.lvs_lib:updateAlert({
    title = 'New Title',
    message = 'Message updated'
})

-- hide the alert
exports.lvs_lib:hideAlert()

Server-side using events

Example:

-- show up the alert
TriggerClientEvent('lvs_lib:client:showAlert', source, {
    title = 'Box Title',
    message = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. \n Aenean vitae.'
    --time = 10000 -- [optional] The time in milliseconds you want the alert to disappear
})

-- hide the alert
TriggerClientEvent('lvs_lib:client:hideAlert', source)

Last updated