Mb_notify [React Js][Notification]

mb_notify

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)

Download Here

How to use
Client side

exports['mb_notify']:sendNotification(yourMessage, options)

Server side

TriggerClientEvent('mb_notify:sendNotification', source, yourMessage, options)
Examples
    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

Options

  1. Duration (default 5000 ms)
  2. Types (default success, warning, info, and error)
  3. Positions (default bottom center)
  4. Notification variant (default standard, filled, and outlined)

Preview

You can also use this as a reference on how to create react-fivem script, source code under notify folder.
Any suggestions are accepted!

9 Likes

pretty neat nice work!

1 Like

Nice work ! But i cant find the source code of react in repository

1 Like

My bad didn’t notice it was not uploaded. Fixed it!

1 Like

Great Work

1 Like

Great work buddy, but you put 2 different designs in there… Would be cool just to follow the inform notification design

Thanks! Not sure by what you mean inform design, but in Material UI documentation there are three variants of designs if that is what you meant. Standard, Filled, and Outlined, these are all different

If you use filled style just do all of them filled

Ahh, its just for the preview and also i made it available for devs to choose between the styles. But if they chose not to, they can always just leave it blank and the style will be standard by default.

@Pigrobot ooooh cool then

1 Like

Nice to see some more React stuff on the forums. Function components > class components tho! <3

1 Like

doesn’t work for me, 0 errors in console

Simple. Nice. Beautiful :+1:

1 Like

could you share your code? have you made sure the resource name is mb_notify?

hey,bro.what’s my problem

Could you share how did you trigger the notification in the export or triggerclientevent?

like this

sry.it’s my fault。now is working

1 Like

also for me … :frowning:

i tried both, but also the simple one doesnt work :frowning:

are there any errors in f8? have you made sure that the resource started properly in server console?

no errors, thats the point. Ressource is started, i tried also with an ensure.