API
VISIBILITY
To show / hide notifications (for example, some cinematic mode etc) you can use export
exports['vzn-notify']:setVisible(visible)
- visible:
boolean
- setting will change the visibility of notifications nui
ADD NOTIFICATION
To add new notification you have to use export
---@class NotifyData
---@field notifType? "error" | "success" | "primary" | "warning" | "money"
---@field designType? 1 | 2 | 3 | 4
---@field duration? number in miliseconds
---@field title? string
---@field message string
---@type NotifyData
local data = {
notifType = "warning",
title = "Caution",
duration = 3000,
message = "Remember to join our discord and subscribe VZN Scripts on youtube",
}
exports['vzn-notify']:addNotification(data)
- data:
NotifyData
- notifType:
error
|success
|primary
|warning
|money
- the color of the notification
- if not setted -> primary
- designType?:
1
|2
|3
|4
- the design of the notification Preview
- if not setted -> default from Config
- duration?:
number
- time during which the notification will be visible (in miliseconds)
- if not setted -> default from Config
- title?:
string
- the title of the notification
- if not setted -> default from Config
- message:
string
- message of the notification
- if not setted -> notification will not appear
- notifType: