AW ScriptsDocs
AW Notify

Exports and events

#Usage

#Client

Lua
exports['aw_notify']:Notify('Vehicle stored', 'success')
exports['aw_notify']:Notify('You need ~r~$2,500~s~', 'error', 6000, 'Not enough money')

exports['aw_notify']:Notify({
    title = 'Bank Transfer',
    message = '$5,000 sent to **John Smith**',
    type = 'bank',          -- any type or alias
    duration = 6000,        -- ms (seconds also work: 6)
    icon = 'bank',          -- built-in icon or image url ('fas fa-car' style names use the matching built-in icon)
    color = '#38BDF8',      -- optional colour
    image = 'https://...',  -- optional picture instead of the icon
    sound = false,          -- optional, no sound
    progress = false,       -- optional, no time bar
})

-- persistent, update and hide
exports['aw_notify']:Persistent('heist', { type = 'job', title = 'Robbery', message = 'Drill the vault...' })
exports['aw_notify']:Update('heist', { type = 'success', message = 'Vault open!' })
exports['aw_notify']:Hide('heist')

exports['aw_notify']:Clear()            -- remove all
exports['aw_notify']:SetVisible(false)  -- hide all (cutscenes, menus ...), true = show again

TriggerEvent('aw_notify:notify', 'Hello', 'info')

#Server

Lua
exports['aw_notify']:Notify(source, 'Paycheck received: $500', 'bank')
exports['aw_notify']:Notify(source, { title = 'Garage', message = 'Vehicle impounded', type = 'vehicle' })
exports['aw_notify']:NotifyAll({ title = 'Server Restart', message = 'In 10 minutes', type = 'announce' })
exports['aw_notify']:NotifyJob({ 'police', 'sheriff' }, { title = '10-31', message = 'Bank robbery', type = 'police' }, true) -- true = on duty only
exports['aw_notify']:Persistent(source, 'id', data) / Update(source, 'id', data) / Hide(source, 'id') / Clear(source)

TriggerClientEvent('aw_notify:notify', source, 'Hello', 'success')

#Built-in icons

check error warning info bell police medical cash bank message megaphone car briefcase box lock unlock key user clock pin wrench gift star fire gun