FiveM notification system using Quasar framework and Material Design Icons.
- Download the last release
- Unzip the folder
- Drag and drop the
swt_notifications
into your resources folder - Don´t forget to add
ensure swt_notifications
in yourserver.cfg
To edit the file you have to:
npm install
Compiles and hot-reloads for development
npm run serve
Compiles and minifies for production
npm run build
Lints and fixes files
caption = string, represents the caption/small title under message
message = string, message you want to show up
position = string, can take the following values: top
top-left
top-right
center
left
right
bottom
bottom-left
bottom-right
color = string, list of colors found -> here
textColor = string | represents the color of the text, list of colors found -> here
timeout = int, 1000 represents 1 second
progress = true/false, specify if it shows the time remaining bar
icon = string, list of icons found -> here
--Client
TriggerEvent("swt_notifications:default",message,position,color,textColor,timeout,progress)
--or
exports['swt_notifications']:Default(message,position,color,textColor,timeout,progress)
--Server
TriggerClientEvent("swt_notifications:default",source,message,position,color,textColor,timeout,progress)
--Client
TriggerEvent("swt_notifications:caption",caption,message,position,timeout,color,textColor,progress)
--or
exports['swt_notifications']:Caption(caption,message,position,timeout,color,textColor,progress)
--Server
TriggerClientEvent("swt_notifications:caption",source,caption,message,position,timeout,color,textColor,progress)
--Client
TriggerEvent("swt_notifications:Info",caption,message,position,timeout,progress)
--or
exports['swt_notifications']:Info(caption,message,position,timeout,progress)
--Server
TriggerClientEvent("swt_notifications:Info",source,caption,message,position,timeout,progress)
--Client
TriggerEvent("swt_notifications:Success",caption,message,position,timeout,progress)
--or
exports['swt_notifications']:Success(caption,message,position,timeout,progress)
--Server
TriggerClientEvent("swt_notifications:Success",source,caption,message,position,timeout,progress)
--Client
TriggerEvent("swt_notifications:Warning",caption,message,position,timeout,progress)
--or
exports['swt_notifications']:Warning(caption,message,position,timeout,progress)
--Server
TriggerClientEvent("swt_notifications:Warning",source,caption,message,position,timeout,progress)
--Client
TriggerEvent("swt_notifications:Negative",caption,message,position,timeout,progress)
--or
exports['swt_notifications']:Negative(caption,message,position,timeout,progress)
--Server
TriggerClientEvent("swt_notifications:Negative",caption,message,position,timeout,progress)
--Client
TriggerEvent("swt_notifications:Icon",message,position,timeout,color,textColor,progress,icon)
--or
exports['swt_notifications']:Icon(message,position,timeout,color,textColor,progress,icon)
--Server
TriggerClientEvent("swt_notifications:Icon",source,message,position,timeout,color,textColor,progress,icon)
--Client
TriggerEvent("swt_notifications:captionIcon",caption,message,position,timeout,color,textColor,progress,icon)
--or
exports['swt_notifications']:CaptionIcon(caption,message,position,timeout,color,textColor,progress,icon)
--Server
TriggerClientEvent("swt_notifications:captionIcon",caption,message,position,timeout,color,textColor,progress,icon)
TriggerEvent("swt_notifications:Icon","Hey, this is an example","top",2500,"blue-10","white",true,"mdi-earth")
--or
exports['swt_notifications']:Icon("Hey, this is an example","top",2500,"blue-10","white",true,"mdi-earth")
--Server
TriggerClientEvent("swt_notifications:Icon",source,"Hey, this is an example","top",2500,"blue-10","white",true,"mdi-earth")
Big thanks to Big D Shinigami
Thanks Hugo for updated docs and exports!
Pull requests are welcome.