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