2025-06-08 19:52:24 -04:00
|
|
|
---@diagnostic disable: duplicate-set-field
|
2025-01-08 13:01:47 -05:00
|
|
|
Notify = Notify or {}
|
2025-01-08 06:33:31 -05:00
|
|
|
|
2025-12-14 16:22:35 -05:00
|
|
|
Notify.GetResourceName = function()
|
|
|
|
|
return "default"
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
---DEPRICATED: PLEASE SWITCH TO Notify.SendNotification
|
|
|
|
|
---12/13/25
|
2025-03-03 01:37:29 -05:00
|
|
|
---@param src number
|
|
|
|
|
---@param message string
|
|
|
|
|
---@param _type string
|
|
|
|
|
---@param time number
|
2025-12-14 16:22:35 -05:00
|
|
|
---@return nil
|
2025-01-08 13:01:47 -05:00
|
|
|
Notify.SendNotify = function(src, message, _type, time)
|
2025-12-14 16:22:35 -05:00
|
|
|
Notify.SendNotification(src, nil, message, _type, time)
|
2025-01-23 23:34:21 -05:00
|
|
|
end
|
|
|
|
|
|
2025-12-14 16:22:35 -05:00
|
|
|
---This will send a notify message of the type and time passed
|
|
|
|
|
---@param src number
|
|
|
|
|
---@param title string
|
|
|
|
|
---@param message string
|
|
|
|
|
---@param _type string
|
|
|
|
|
---@param time number
|
|
|
|
|
---@props table optional
|
|
|
|
|
---@return nil
|
|
|
|
|
Notify.SendNotification = function(src, title, message, _type, time, props)
|
|
|
|
|
time = time or 3000
|
|
|
|
|
if not title then
|
2026-08-18 00:02:04 -07:00
|
|
|
title = lib.locale("Notifications.PlaceholderTitle")
|
2025-12-14 16:22:35 -05:00
|
|
|
end
|
|
|
|
|
TriggerClientEvent('community_bridge:Client:Notify', src, title, message, _type, time, props)
|
2025-09-10 12:27:12 -04:00
|
|
|
end
|
|
|
|
|
|
2025-04-28 10:21:03 -04:00
|
|
|
---------[[Depricated Stuff Below, please adjust to the HelpText module instead]]--------
|
|
|
|
|
---Depricated -- This will show a help text message to the specified player at the screen position passed
|
2025-03-03 01:37:29 -05:00
|
|
|
---@param src number
|
|
|
|
|
---@param message string
|
|
|
|
|
---@param position string
|
2025-01-23 23:34:21 -05:00
|
|
|
Notify.ShowHelpText = function(src, message, position)
|
2025-04-28 10:21:03 -04:00
|
|
|
return HelpText.ShowHelpText(src, message, position)
|
2025-01-23 23:34:21 -05:00
|
|
|
end
|
|
|
|
|
|
2025-04-28 10:21:03 -04:00
|
|
|
---Depricated -- This will hide the help text message on the screen for the specified player
|
2025-04-02 07:27:13 -04:00
|
|
|
---@param src number
|
2025-01-23 23:34:21 -05:00
|
|
|
Notify.HideHelpText = function(src)
|
2025-04-28 10:21:03 -04:00
|
|
|
return HelpText.HideHelpText(src)
|
2025-05-10 00:01:56 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
return Notify
|