LGF Utility
Ui Class
Notification

Notifications

Manage notifications using either client-side or server-side methods in your application. This documentation outlines how to handle notifications effectively.


Image

TriggerEvent

Use a TriggerEvent to trigger a client-side notification:

TriggerEvent('LGF_Utility:SendNotification', notificationData)

Exports

Use exports to directly call utility functions for notifications:

exports['LGF_Utility']:SendNotification(notificationData)
  • The notificationData table for both client-side and server-side notifications should contain the following fields:

    • id: (string) Unique ID for the notification.
    • title: (string) Title of the notification.
    • message: (string) Message of the notification.
    • icon: (string) Icon type available (success, error, progress, line).
    • duration: (number) Duration of the notification in milliseconds.
    • position: (string) Position of the notification (top-left, top-right, bottom-left, bottom-right).