EXPORTS

Export / Function

exports["rat-notify"]:Add(args)

Arguments

ArgumentTypeOptionsDetailsRequired

id

string

unique id to remove duplicates

N

title

string

Title text

Y

text

string

Text / Message text

Y

style

string

check config

Style in config

Y

progress

string

default, circle

Progress Type

N

shape

string

square, circle, diamond

Logo outer shape

N

icon

string

font awesome icon

N

duration

int

Duration in ms

N

pos

string

left, right, top, bottom, top-left, top-right, bottom-left, bottom-right

N

sound

string

sound file name

N

Examples

Message using pre-defined style inside of the config.

exports["rat-notify"]:Add({
    title = "Admin Message",
    text = "You've been requested to join the waiting room in the discord",
    progress = "circle",
    style = "default",
    duration = 5000,
    pos = "top-right"
})

Message using style but also overriding the style logo and shape

exports["rat-notify"]:Add({
    title = "Admin Message",
    text = "You've been requested to join the waiting room in the discord",
    progress = "circle",
    style = "default",
    duration = 5000,
    pos = "top-right",
    
    -- override style defaults
    icon = "fa-solid fa-flask", -- https://fontawesome.com/icons/flask?f=classic&s=solid
    shape = "diamond"
})

Server Side

You can call the same export from the server by simply adding the source of the player you wish to target before the arguments, for example using the above notification.

exports["rat-notify"]:Add(source, {
    title = "Admin Message",
    text = "You've been requested to join the waiting room in the discord",
    progress = "circle",
    style = "default",
    duration = 5000,
    pos = "top-right"
})

Last updated