Notify and HelpText split into seperate modules

Notify and HelpText split into separate modules, settings moved into shared.
This commit is contained in:
MrNewb committed 2025-04-28 10:21:03 -04:00
1 parent 2fd01dd2ae
commit 6e418f406c
20 files changed
+325 -86

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
Notify = Notify or {}
local resourceName = "ox_lib"
local configValue = BridgeSharedConfig.Notify
if (configValue == "auto" and GetResourceState(resourceName) ~= "started") or (configValue ~= "auto" and configValue ~= resourceName) then return end
---@diagnostic disable-next-line: duplicate-set-field
Notify.GetResourceName = function()
return resourceName
end
---This will send a notify message of the type and time passed
---@param message string
---@param _type string
---@param time number
---@return nil
---@diagnostic disable-next-line: duplicate-set-field
Notify.SendNotify = function(message, _type, time)
time = time or 3000
return exports.ox_lib:notify({ description = message, type = _type, position = 'center-left' })
end