Docs

kyoNotify

Usage

Notification data

FieldTypeDefaultDescription
typestring'info''success', 'error', 'warning' or 'info'
titlestring'SISTEMA'Title
messagestring'...'Text. text is accepted too
iconstring'fa-solid fa-bell'Font Awesome class
durationnumber5000Milliseconds. time is accepted too

Client

SendNotify

exports.kyoNotify:SendNotify({
    type = 'success',
    title = 'SHOP',
    message = 'Payment completed.',
    icon = 'fa-solid fa-circle-check',
    duration = 5000,
})

HelpText

Shows or hides a persistent help text.

-- show
exports.kyoNotify:HelpText('shop', 'E', 'OPEN SHOP', true)

-- hide
exports.kyoNotify:HelpText('shop', nil, nil, false)
ParameterTypeDescription
idstringUnique id of the help text, used to hide it
keystringKey shown (default E)
messagestringText
showbooleantrue to show, false to hide

Server

SendNotify

exports.kyoNotify:SendNotify(source, {
    type = 'error',
    title = 'ALERT',
    message = 'Restricted area.',
})

Use -1 as source for every player.

SendNotifyAll

exports.kyoNotify:SendNotifyAll({
    type = 'info',
    title = 'SERVER',
    message = 'Restart in 10 minutes.',
})

Events

EventSideArguments
kyoNotify:displayClient (net event)data
kyoNotify:helpClient (net event)id, key, message, show
kyoNotify:sendServer (local event only)target, data
-- from the server
TriggerClientEvent('kyoNotify:display', source, { type = 'info', title = 'INFO', message = 'Hello' })

kyoNotify:send is deliberately not a network event, so clients cannot send notifications to other players.

Test commands

CommandWhat it does
/kyonotifyShows the four notification types
/kyohelpShows a help text for 5 seconds