Git Product home page Git Product logo

swt_notifications's Introduction

swt_notifications

FiveM notification system using Quasar framework and Material Design Icons.

Screenshots are here

Installation

  • 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 your server.cfg

Edit

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


Documentation

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


Default

--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)

With Caption

--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)

Informative notification

Info

--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)

Success

Sucess

--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)

Warning

Warning

--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)

Negative

Negative

--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)

With Icon

Icon

--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)

With Icon and Caption

CaptionIcon

--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)

Example to use

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")

Credits

Big thanks to Big D Shinigami

Thanks Hugo for updated docs and exports!

Contributing

Pull requests are welcome.

License

MIT

My tebex

https://switty.tebex.io/category/1779708

swt_notifications's People

Contributors

hugods21 avatar switty6 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.