Server Usage
From the server side, use TriggerClientEvent to send notifications to specific players.
Syntax
TriggerClientEvent('v_notify:notify', targetPlayerId, type, message, duration, title)
| Parameter | Type | Description |
|---|---|---|
targetPlayerId | number | The server ID of the target player |
type | string | Notification type: success, error, warning, info |
message | string | The notification message body |
duration | number | How long the notification stays visible in milliseconds |
title | string | Optional custom title |
Examples
Info Notification
TriggerClientEvent('v_notify:notify', targetPlayerId,
"info",
"Welcome to the server!",
4000,
"Information"
)
Access Denied
TriggerClientEvent('v_notify:notify', targetPlayerId,
"error",
"You lack permissions!",
4500,
"Access Denied"
)
Broadcast to All Players
TriggerClientEvent('v_notify:notify', -1,
"success",
"Server restart in 10 minutes.",
6000,
"Announcement"
)
tip
Use -1 as the targetPlayerId to send the notification to all connected players.
tip
Still need help? Join our Discord and our team will assist you.