notify
Sends a notification to a specific player from the server.
Parameters:
source
(number): The player's server ID to send the notification totext
(string): The notification message to displaytype
(string, optional): The notification type. Defaults to'info'
Common types:
'info'
,'success'
,'error'
,'warning'
,'primary'
time
(number, optional): Duration in milliseconds. Defaults to5000
Returns:
None
Example:
-- Basic notification to a player
ps.notify(source, "Welcome to the server!")
-- Success notification with custom duration
ps.notify(source, "Item purchased successfully!", "success", 3000)
-- Error notification
ps.notify(source, "Insufficient funds!", "error")
-- Warning with longer duration
ps.notify(source, "Vehicle will be impounded in 30 seconds!", "warning", 8000)
Last updated