Lilibeth
Gold Elite
- Joined
- Jul 4, 2021
- Messages
- 186
- Reaction score
- 57,276
- Points
- 316
A simple notification script with multiple options
Features
Displays notifications one by one (queue) so they can be spammed
Simple and Beautiful UI (Credits to Material UI library for react)
How to use
Client side
Code:
exports['mb_notify']:sendNotification(yourMessage, options)
Server side
Code:
TriggerClientEvent('mb_notify:sendNotification', source, yourMessage, options)
Examples
Code:
exports['mb_notify']:sendNotification('this is default bottom center')
exports['mb_notify']:sendNotification('this is error type top center', {type="error", vertical="top"})
exports['mb_notify']:sendNotification('this is info type and filled variant top right', {type="info", vertical="top", horizontal="right", variant="filled"})
exports['mb_notify']:sendNotification('this is warning type and outlined variant bottom right', {type="warning", horizontal="right", variant='outlined'})
exports['mb_notify']:sendNotification('this is default top left with duration 1 second', {vertical='top', horizontal='left', duration=1000})
exports['mb_notify']:sendNotification('this is default bottom left', {horizontal='left'})
Options
- Duration (default 5000 ms)
- Types (default success, warning, info, and error)
- Positions (default bottom center)
- Notification variant (default standard, filled, and outlined)
GOOD FORUMS