⚙️Integration

To be able to include the notifications now, here is how you trigger the notifications in other scripts

Notifications

Client Side

exports['mxo-notify']:Alert('Title', 'Message', Time, 'type')

Server Side

TriggerClientEvent('mxo-notify:Alert', source, 'Title', 'Message', Time, 'type')

Announcements

Client Side

exports['mxo-notify']:Announce('Title', 'Message', Time, 'type')

Server Side

TriggerClientEvent('mxo-notify:Announce', source, 'Title', 'Message', Time, 'type')

Configuration

Available types

These types are configured by default. Feel free to add more types by your own.

  • success (green)

  • info (blue)

  • error (red)

  • warning (yellow)

Add more types

You can add your own types by simply adding them to config.lua. Once you have added them there, you can integrate the new types into other scripts. See more at the config.lua

Ad

Changing Sound

To change the sound of the notification, you need to replace the sound.mp3 file.

The file is located at mxo-notify/html/sound.mp3

Common Errors

Help, the icons are not displayed

If the items are not displayed, you have probably selected a premium icon from FontAwesome. Make sure that the icon is a Free icon.

The message is displayed only for a short time

This happens when you specify the Time as seconds. The time must be specified in milliseconds. 1 Second = 1000 milliseconds

Last updated