For the complete documentation index, see llms.txt. This page is also available as Markdown.

Usage & API

Madonne Notify exposes a simple API usable from any resource via exports (client-side or server-side).


πŸ–₯️ Client-side Export

Trigger a notification directly from a client-side script:

exports['MS_Madonne_Notify']:Notify(type, title, message, duration, sound)

Parameters

Parameter
Type
Description

type

string

Notification type (see types below)

title

string

Title displayed in bold. Pass "" to hide.

message

string

Subtitle message. Pass "" to hide.

duration

number

Display duration in milliseconds (e.g. 5000 for 5 seconds)

sound

boolean

true to play a UI sound when the notification appears

Example

exports['MS_Madonne_Notify']:Notify("success", "Seatbelt", "Seatbelt fastened!", 4000, true)
exports['MS_Madonne_Notify']:Notify("error", "Alert", "You are not allowed to do this.", 5000, false)
exports['MS_Madonne_Notify']:Notify("info", "", "Server restart in 10 minutes.", 6000, true)

🌐 Server-side Export

Trigger a notification from a server-side script, targeting a specific player by their server ID:

Parameters

Parameter
Type
Description

target

number

Player server ID (-1 to broadcast to all players)

type

string

Notification type (see types below)

title

string

Title displayed in bold. Pass "" to hide.

message

string

Subtitle message. Pass "" to hide.

duration

number

Display duration in milliseconds

sound

boolean

true to play a UI sound

Example


πŸ“‘ NetEvent (Client-side)

Notifications can also be triggered via a NetEvent, useful for more dynamic or event-driven systems:

Or from the server:


🎨 Notification Types

Each type comes with a dedicated color and icon:

Type
Color
Icon
Use case

info

Purple

ℹ️ Information

General information

announce

Purple

πŸ“’ Megaphone

Server announcements

progress

Purple

⏳ Hourglass

Ongoing actions

success

Green

βœ… Check

Successful actions

achievement

Green

πŸ† Trophy

Unlocked achievements

error

Dark Red

⚠️ Warning

Errors or blocked actions

warning

Orange

πŸ”” Alert

Warnings

msg

White

πŸ’¬ Message

Chat or messages

radio

White

πŸ“» Broadcast

Radio communications

system

White

βš™οΈ Settings

System events

vehicle

White

πŸš— Car

Vehicle-related events


πŸ’‘ Tip: You can omit the title or message by passing an empty string "". The notification will adapt its layout accordingly and only show the content you provide.

Last updated