Skip to content

This Banner Notification is composed with 3 Elements! Those elements are the Header, Description, and the Icon

License

Notifications You must be signed in to change notification settings

YadBro/banner-notify

Repository files navigation

◉ Banner Notify | Best Way to Notify!
(roblox-ts and [rojo and wally] version)

📃 Credits

Introduction

Banner Notifications is intuitive and customizable. You can easily notify a player for what they have done or whatnot.

📦 Installation

This package is available for Roblox TypeScript and Wally.

npm install @rbxts/banner-notify

 

⚙ Usage

  1. You need to initialize client and server. Remember this initialization only run once!. Recommended place this code in /StarterPlayer/StarterPlayerScripts for client and /ServerScriptService for server

Client:

/*
    (roblox-ts) /client/main.client.ts
*/
    import BannerNotify from "@rbxts/banner-notify";

    BannerNotify.InitClient();
[[--
    (rojo and wally) /client/init.client.luau
]]

    local ReplicatedStorage = game:GetService("ReplicatedStorage")
    local BannerNotify = require(ReplicatedStorage.Packages["banner-notify"])

    BannerNotify:InitClient()

Server:

/*
    (roblox-ts) /server/main.server.ts
*/
    import BannerNotify from "@rbxts/banner-notify";

    BannerNotify.InitServer();
[[--
    (rojo and wally) /server/init.server.luau
]]

    local ReplicatedStorage = game:GetService("ReplicatedStorage")
    local BannerNotify = require(ReplicatedStorage.Packages["banner-notify"])

    BannerNotify:InitServer()
  1. Now you can use Banner Notify in client and server with following props.
/*
    (roblox-ts) /server/main.server.ts
*/
    import BannerNotify from "@rbxts/banner-notify";

    BannerNotify.Notify({
        duration: 3,
        header: "Example In Server",
        icon: "rbxassetid://11326670020",
        message: "Example Banner Notify In Server",
        player,
    });
[[--
    (rojo and wally) /server/init.server.luau
]]

    local ReplicatedStorage = game:GetService("ReplicatedStorage")
    local BannerNotify = require(ReplicatedStorage.Packages["banner-notify"])

    BannerNotify:Notify({
        duration= 1,
        header= "Example",
        icon= "rbxassetid://11326670020",
        message= "Example Banner Notify",
    });

🔍 Examples

roblox-ts = banner-notify-test-rbxts

rojo and wally = banner-notify-test-rojo

📝 Notes

The original version 2.0 included a NumberOfActiveNotifications method. Unfortunately, the NumberOfActiveNotifications method is not included in this repository due to an error. I plan to help fix it soon, although I won't have time this month.

About

This Banner Notification is composed with 3 Elements! Those elements are the Header, Description, and the Icon

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages