Client Exports

ShowNotification

exports.nx-notify:ShowNotification(data)

data: table

  • message: string the notification message

  • align?: string the notification alignment

  • title?: string the notification title

  • type?: string the notification type:

    • info (default)

    • success

    • error

    • warning

  • icon?: string FontAwesome icon or https link

  • timeout?: number how many milliseconds the message shows up

For defaults value choose it in the Config


Success notification with title

RegisterCommand("success", function (source, args, raw)
    exports.nx-notify:ShowNotification({
        message = "This is a success notification",
        type    = "success",
        title   = "Congratulation",
    })
end)

Info notification with title and custom alignment

RegisterCommand("info", function (source, args, raw)
    exports.nx-notify:ShowNotification({
        message = "This is an info notification",
        type    = "info",
        title   = "Info",
        align   = "center"
    })
end)

Last updated