Exports & API
Core Notify provides client-side exports for showing notifications locally, and server-side exports for sending notifications to specific players or broadcasting to everyone.
Client Exports
client
exports['core_notify']:ShowInfo(text, flash, duration)Show an info notification on the local client.
| Parameter | Type | Description |
|---|---|---|
text | | Notification message |
flash | | Flash the panel briefly (default: true) |
duration | | Display duration in ms (nil = default) |
Returns:
nilExample
lua
exports['core_notify']:ShowInfo("Press M to toggle the notification panel", true, nil)client
exports['core_notify']:ShowSuccess(text, flash, duration)Show a success notification with green gradient.
| Parameter | Type | Description |
|---|---|---|
text | | Notification message |
flash | | Flash the panel briefly (default: true) |
duration | | Display duration in ms |
Returns:
nilExample
lua
exports['core_notify']:ShowSuccess("Item purchased!", true, nil)client
exports['core_notify']:ShowError(text, flash, duration)Show an error notification with red gradient.
| Parameter | Type | Description |
|---|---|---|
text | | Notification message |
flash | | Flash the panel briefly (default: true) |
duration | | Display duration in ms |
Returns:
nilExample
lua
exports['core_notify']:ShowError("Not enough money!", true, nil)client
exports['core_notify']:ShowWarning(text, flash, duration)Show a warning notification with orange gradient.
| Parameter | Type | Description |
|---|---|---|
text | | Notification message |
flash | | Flash the panel briefly (default: true) |
duration | | Display duration in ms |
Returns:
nilExample
lua
exports['core_notify']:ShowWarning("Inventory almost full!", true, nil)client
exports['core_notify']:ShowCooldown(text, cooldownDuration, flashOnStart)Show a cooldown notification with a real-time countdown timer and progress bar. Displays 'DONE' when complete.
| Parameter | Type | Description |
|---|---|---|
text | | Cooldown label |
cooldownDuration | | Duration in seconds (default: 60) |
flashOnStart | | Flash the panel when cooldown starts (default: true) |
Returns:
nilExample
lua
exports['core_notify']:ShowCooldown("Ability Cooldown", 30, true)client
exports['core_notify']:ShowNotification(notificationData)Show a custom notification with full control over all properties.
| Parameter | Type | Description |
|---|---|---|
notificationData | | Table with text, type, flash, duration, and isPreCompleted fields |
Returns:
nilExample
lua
exports['core_notify']:ShowNotification({
text = "Custom notification",
type = 'warning', -- 'info', 'success', 'error', 'warning', 'cooldown', 'notification'
flash = true,
duration = 3000, -- ms (nil for default)
})Server Exports
Single Player
server
exports['core_notify']:TriggerClientInfo(source, text, flash, duration)Send an info notification to a specific player.
| Parameter | Type | Description |
|---|---|---|
source | | Player server ID |
text | | Notification message |
flash | | Flash the panel (default: true) |
duration | | Display duration in ms |
Returns:
nilExample
lua
exports['core_notify']:TriggerClientInfo(source, "Welcome to the server!", true, nil)server
exports['core_notify']:TriggerClientSuccess(source, text, flash, duration)Send a success notification to a specific player.
| Parameter | Type | Description |
|---|---|---|
source | | Player server ID |
text | | Notification message |
flash | | Flash the panel (default: true) |
duration | | Display duration in ms |
Returns:
nilExample
lua
exports['core_notify']:TriggerClientSuccess(source, "Transaction complete!", true, nil)server
exports['core_notify']:TriggerClientError(source, text, flash, duration)Send an error notification to a specific player.
| Parameter | Type | Description |
|---|---|---|
source | | Player server ID |
text | | Notification message |
flash | | Flash the panel (default: true) |
duration | | Display duration in ms |
Returns:
nilExample
lua
exports['core_notify']:TriggerClientError(source, "Access denied!", true, nil)server
exports['core_notify']:TriggerClientWarning(source, text, flash, duration)Send a warning notification to a specific player.
| Parameter | Type | Description |
|---|---|---|
source | | Player server ID |
text | | Notification message |
flash | | Flash the panel (default: true) |
duration | | Display duration in ms |
Returns:
nilExample
lua
exports['core_notify']:TriggerClientWarning(source, "Low health!", true, nil)server
exports['core_notify']:TriggerClientCooldown(source, text, cooldownDuration, flashOnStart)Send a cooldown notification with countdown timer to a specific player.
| Parameter | Type | Description |
|---|---|---|
source | | Player server ID |
text | | Cooldown label |
cooldownDuration | | Duration in seconds (default: 60) |
flashOnStart | | Flash on start (default: true) |
Returns:
nilExample
lua
exports['core_notify']:TriggerClientCooldown(source, "Respawn", 120, true)server
exports['core_notify']:TriggerClientNotification(source, notificationData)Send a fully custom notification to a specific player.
| Parameter | Type | Description |
|---|---|---|
source | | Player server ID |
notificationData | | Table with text, type, flash, duration fields |
Returns:
nilExample
lua
exports['core_notify']:TriggerClientNotification(source, {
text = "Custom server notification",
type = 'success',
flash = true,
duration = 5000,
})Broadcast (All Players)
server
exports['core_notify']:TriggerAllInfo(text, flash, duration)Broadcast an info notification to all connected players.
| Parameter | Type | Description |
|---|---|---|
text | | Notification message |
flash | | Flash the panel (default: true) |
duration | | Display duration in ms |
Returns:
nilExample
lua
exports['core_notify']:TriggerAllInfo("Server announcement: Double XP weekend!", true, nil)server
exports['core_notify']:TriggerAllSuccess(text, flash, duration)Broadcast a success notification to all connected players.
| Parameter | Type | Description |
|---|---|---|
text | | Notification message |
flash | | Flash the panel (default: true) |
duration | | Display duration in ms |
Returns:
nilExample
lua
exports['core_notify']:TriggerAllSuccess("Event started!", true, nil)server
exports['core_notify']:TriggerAllError(text, flash, duration)Broadcast an error notification to all connected players.
| Parameter | Type | Description |
|---|---|---|
text | | Notification message |
flash | | Flash the panel (default: true) |
duration | | Display duration in ms |
Returns:
nilExample
lua
exports['core_notify']:TriggerAllError("Server maintenance in 5 minutes!", true, nil)server
exports['core_notify']:TriggerAllWarning(text, flash, duration)Broadcast a warning notification to all connected players.
| Parameter | Type | Description |
|---|---|---|
text | | Notification message |
flash | | Flash the panel (default: true) |
duration | | Display duration in ms |
Returns:
nilExample
lua
exports['core_notify']:TriggerAllWarning("High server load — expect lag!", true, nil)server
exports['core_notify']:TriggerAllCooldown(text, cooldownDuration, flashOnStart)Broadcast a cooldown notification with countdown timer to all players. Great for server restart timers.
| Parameter | Type | Description |
|---|---|---|
text | | Cooldown label |
cooldownDuration | | Duration in seconds (default: 60) |
flashOnStart | | Flash on start (default: true) |
Returns:
nilExample
lua
exports['core_notify']:TriggerAllCooldown("Server Restart", 120, true)server
exports['core_notify']:TriggerAllClientsNotification(notificationData)Broadcast a fully custom notification to all connected players.
| Parameter | Type | Description |
|---|---|---|
notificationData | | Table with text, type, flash, duration fields |
Returns:
nilExample
lua
exports['core_notify']:TriggerAllClientsNotification({
text = "Server-wide announcement",
type = 'info',
flash = true,
})