Skip to main content

The UD-notify resource provides a collection of exports that can be used on both the client and server sides to display notifications directly from any fivem resource.

Each export supports customizable colors, titles, durations, and optional sounds (if enabled in the config).

Basic Exports

Notify

exports['UD-notify']:Notify('Message', 'color', time)
Displays a simple message without a title.
ParameterTypeDescription
MessagestringThe main content of the notification
colorstringThe color of the notification (e.g. "green", "red", "blue")
timenumberDuration in milliseconds (e.g. 5000 = 5 seconds)

NotifyTitle

exports['UD-notify']:NotifyTitle('Title', 'Message', 'color', time)
Displays a notification that includes both a title and a message.
ParameterTypeDescription
TitlestringThe notification title
MessagestringThe main content of the notification
colorstringThe color of the notification
timenumberDuration in milliseconds

NotifyOnlyTitle

exports['UD-notify']:NotifyOnlyTitle('Title', 'color', time)
Displays a notification containing only the title — perfect for brief alerts.
ParameterTypeDescription
TitlestringThe notification title
colorstringThe color of the notification
timenumberDuration in milliseconds

NotifyCustom

exports['UD-notify']:NotifyCustom('Title', 'Message', 'color', time)
Displays a fully customized notification that allows for manual control of all parameters.
ParameterTypeDescription
TitlestringThe notification title
MessagestringThe notification text
colorstringThe color of the notification
timenumberDuration in milliseconds

Predefined Shortcut Exports

These exports are quick and convenient wrappers for commonly used notification types.
exports['UD-notify']:NotifySuccess('Action completed successfully!', 5000)
exports['UD-notify']:NotifyError('An error occurred while processing.', 5000)
exports['UD-notify']:NotifyWarning('Please double-check your input.', 5000)
exports['UD-notify']:NotifyInfo('Server restart scheduled in 10 minutes.', 5000)
ExportDefault ColorDescription
NotifySuccessgreenDisplays a success message
NotifyErrorredDisplays an error or failure message
NotifyWarningyellowDisplays a warning or caution message
NotifyInfoblueDisplays an informational message

Summary

  • All exports are available on both client and server sides and can be used in any script.
  • Colors and durations can be customized in config.lua.