@rbxts/banner-notify
v1.0.1
Published
Banner Notifications is intuitive and customizable. You can easily notify a player for what they have done or whatnot.
Downloads
18
Readme
📦 Installation
This package is available for Roblox TypeScript and Wally.
npm install @rbxts/banner-notify
⚙ Usage
- 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()
- 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.