no idea if it works but ascii art is awesome!

This commit is contained in:
gononono64 committed 2025-02-06 02:26:56 -06:00
1 parent b829edb835
commit d6adeebfa5
13 files changed
+144 -78

No files matched your search

+43
View File
@@ -0,0 +1,43 @@
if GetResourceState('ox_lib') ~= 'started' then return end
Notify = Notify or {}
local isNotifySystem = (not BridgeClientConfig.NotifySystem) or BridgeClientConfig.NotifySystem == 'auto' or BridgeClientConfig.NotifySystem == 'ox'
local isHelpTextSystem = (not BridgeClientConfig.HelpTextSystem) or BridgeClientConfig.HelpTextSystem == 'auto' or BridgeClientConfig.HelpTextSystem == 'ox'
-- █▄ █ ▄▀▄ ▀█▀ █ █▀ ▀▄▀ ▄▀▀ ▀▄▀ ▄▀▀ ▀█▀ ██▀ █▄ ▄█
-- █ ▀█ ▀▄▀ █ █ █▀ █ ▄█▀ █ ▄█▀ █ █▄▄ █ ▀ █
if isHelpTextSystem and not isNotifySystem then goto HELP_TEXT_SYSTEM end
Notify.SendNotify = function(message, type, time)
return exports.ox_lib:notify({ description = message, type = type, position = 'center-left' })
end
-- █▄█ ██▀ █ █▀▄ ▀█▀ ██▀ ▀▄▀ ▀█▀ ▄▀▀ ▀▄▀ ▄▀▀ ▀█▀ ██▀ █▄ ▄█
-- █ █ █▄▄ █▄▄ █▀ █ █▄▄ █ █ █ ▄█▀ █ ▄█▀ █ █▄▄ █ ▀ █
if not isHelpTextSystem then return end
::HELP_TEXT_SYSTEM::
Notify.ShowHelpText = function(message, _position)
if _position == nil then _position = 'left-center' end
return exports.ox_lib:showTextUI(message, { position = _position })
end
Notify.HideHelpText = function()
return exports.ox_lib:hideTextUI()
end
-- .--------.
-- | taktak |
-- |/-------'
-- .-. ,-.
-- ;oo oo;
-- / \| |/ \
-- |. `. .' .|
-- `;.;' `;.;'
-- .-^-. .-^-.
-- | | | | | |
+27
View File
@@ -0,0 +1,27 @@
Notify = Notify or {}
Notify.SendNotify = function(message, type, time)
Utility.NotifyText(message)
end
Notify.ShowHelpText = function(message, _position)
Utility.HelpText(message, 7000)
end
Notify.HideHelpText = function()
end
RegisterNetEvent('community_bridge:Client:Notify', function(message, _type, time)
Notify.SendNotify(message, _type, time)
end)
RegisterNetEvent('community_bridge:Client:ShowHelpText', function(message, position)
Notify.ShowHelpText(message, position)
end)
RegisterNetEvent('community_bridge:Client:HideHelpText', function()
Notify.HideHelpText()
end)
File renamed without changes.
+8
View File
@@ -0,0 +1,8 @@
if GetResourceState('esx') ~= 'started' then return end
if BridgeClientConfig.NotifySystem and (BridgeClientConfig.NotifySystem ~= 'auto' and BridgeClientConfig.NotifySystem ~= 'esx') then return end
Notify = Notify or {}
Notify.SendNotify = function(message, type, time)
return ESX.ShowNotification(message, type, time)
end
+8
View File
@@ -0,0 +1,8 @@
if GetResourceState('qb-core') ~= 'started' then return end
if BridgeClientConfig.NotifySystem and (BridgeClientConfig.NotifySystem ~= 'auto' and BridgeClientConfig.NotifySystem ~= 'qb') then return end
Notify = Notify or {}
Notify.SendNotify = function(message, type, time)
return TriggerEvent('QBCore:Notify', message, 'primary', time)
end
-78
View File
@@ -1,78 +0,0 @@
Notify = Notify or {}
Notify.SendNotify = function(message, type, time)
if BridgeClientConfig == nil or BridgeClientConfig.NotifySystem == nil then return Prints.error("You have not configured a compatable notify in community_bridge") end
local notifyType = BridgeClientConfig.NotifySystem
time = time or 3000
if notifyType == 'qb' then
return TriggerEvent('QBCore:Notify', message, 'primary', time)
elseif notifyType == 'mythic' then
return exports['mythic_notify']:SendAlert('inform', message, time)
elseif notifyType == 'pNotify' then
return exports['pNotify']:SendNotification({ text = message, type = type, timeout = time, layout = 'centerRight' })
elseif notifyType == 'esx' then
return ESX.ShowNotification(message, type, time)
elseif notifyType == 'ox' then
return exports.ox_lib:notify({ description = message, type = type, position = 'center-left' })
elseif notifyType == 't-notify' then
return exports['t-notify']:Alert({ style = 'info', message = message, duration = time, })
elseif notifyType == 'wasabi' then
return exports.wasabi_notify:notify(type, message, time, type)
elseif notifyType == 'lab' then
return exports['swe-notify']:SendNotification(message, time, type)
elseif notifyType == 'custom' then
return Prints.Error("You have not set up a custom notify in community_bridge")
else
return Prints.Error("You have not configured a notify in community_bridge")
end
end
Notify.ShowHelpText = function(message, _position)
if BridgeClientConfig == nil or BridgeClientConfig.ShowHelpText == nil then return Prints.error("You have not configured a compatable helptext in community_bridge") end
local helptextType = BridgeClientConfig.ShowHelpText
if helptextType == 'ox' then
if _position == nil then _position = 'left-center' end
return exports.ox_lib:showTextUI(message, { position = _position })
elseif helptextType == 'jg' then
return exports['jg-textui']:DrawText(message)
elseif helptextType == 'qb' then
if _position == nil then _position = 'left' end
return exports['qb-core']:DrawText(message, 'left')
elseif helptextType == 'lab' then
return exports['lab-HintUI']:Show(message, "Hint Text")
elseif helptextType == 'custom' then
return Prints.Error("You have not set up a custom ShowHelpText in community_bridge")
else
return Prints.Error("You have not configured a ShowHelpText in community_bridge")
end
end
Notify.HideHelpText = function()
if BridgeClientConfig == nil or BridgeClientConfig.ShowHelpText == nil then return Prints.error("You have not configured a compatable helptext in community_bridge") end
local helptextType = BridgeClientConfig.ShowHelpText
if helptextType == 'ox' then
return exports.ox_lib:hideTextUI()
elseif helptextType == 'jg' then
return exports['jg-textui']:HideText()
elseif helptextType == 'qb' then
return exports['qb-core']:HideText()
elseif helptextType == 'lab' then
return exports['lab-HintUI']:Hide()
elseif helptextType == 'custom' then
return Prints.Error("You have not set up a custom HideHelpText in community_bridge")
else
return Prints.Error("You have not configured a HideHelpText in community_bridge")
end
end
RegisterNetEvent('community_bridge:Client:Notify', function(message, _type, time)
Notify.SendNotify(message, _type, time)
end)
RegisterNetEvent('community_bridge:Client:ShowHelpText', function(message, position)
Notify.ShowHelpText(message, position)
end)
RegisterNetEvent('community_bridge:Client:HideHelpText', function()
Notify.HideHelpText()
end)
+11
View File
@@ -0,0 +1,11 @@
if GetResourceState('jg-textui') ~= 'started' then return end
if BridgeClientConfig.HelpTextSystem and (BridgeClientConfig.HelpTextSystem ~= 'auto' and BridgeClientConfig.HelpTextSystem ~= 'jg') then return end
Notify = Notify or {}
Notify.ShowHelpText = function(message, _position)
return exports['jg-textui']:DrawText(message)
end
Notify.HideHelpText = function()
return exports['jg-textui']:HideText()
end
+12
View File
@@ -0,0 +1,12 @@
if GetResourceState('lab-HintUI') ~= 'started' then return end
if BridgeClientConfig.HelpTextSystem and (BridgeClientConfig.HelpTextSystem ~= 'auto' and BridgeClientConfig.HelpTextSystem ~= 'lab') then return end
Notify = Notify or {}
Notify.ShowHelpText = function(message, _position)
return exports['lab-HintUI']:Show(message, "Hint Text")
end
Notify.HideHelpText = function()
return exports['lab-HintUI']:Hide()
end
+8
View File
@@ -0,0 +1,8 @@
if GetResourceState('mythic_notify') ~= 'started' then return end
if BridgeClientConfig.NotifySystem and (BridgeClientConfig.NotifySystem ~= 'auto' and BridgeClientConfig.NotifySystem ~= 'mythic') then return end
Notify = Notify or {}
Notify.SendNotify = function(message, type, time)
return exports['mythic_notify']:SendAlert('inform', message, time)
end
+9
View File
@@ -0,0 +1,9 @@
if GetResourceState('pNotify') ~= 'started' then return end
if BridgeClientConfig.NotifySystem and (BridgeClientConfig.NotifySystem ~= 'auto' and BridgeClientConfig.NotifySystem ~= 'pNotify') then return end
Notify = Notify or {}
Notify.SendNotify = function(message, type, time)
return exports['pNotify']:SendNotification({ text = message, type = type, timeout = time, layout = 'centerRight' })
end
+8
View File
@@ -0,0 +1,8 @@
if GetResourceState('t-notify') ~= 'started' then return end
if BridgeClientConfig.NotifySystem and (BridgeClientConfig.NotifySystem ~= 'auto' and BridgeClientConfig.NotifySystem ~= 't-notify') then return end
Notify = Notify or {}
Notify.SendNotify = function(message, type, time)
return exports['t-SendNotify']:Alert({ style = 'info', message = message, duration = time })
end
+9
View File
@@ -0,0 +1,9 @@
if GetResourceState('wasabi_notify') ~= 'started' then return end
if BridgeClientConfig.NotifySystem and (BridgeClientConfig.NotifySystem ~= 'auto' and BridgeClientConfig.NotifySystem ~= 'wasabi') then return end
Notify = Notify or {}
Notify.SendNotify = function(message, type, time)
return exports.wasabi_notify:notify(type, message, time, type)
end
+1
View File
@@ -1,6 +1,7 @@
BridgeClientConfig = {}
BridgeClientConfig.DebugLevel = 2 -- Debug level, 0 for none, 1 for some, 2 for all data
BridgeClientConfig.NotifySystem = "ox" -- [ ox | qb | esx | mythic | pNotify | t-notify | wasabi | lab | custom ]
BridgeClientConfig.HelpTextSystem = "auto"
BridgeClientConfig.ShowHelpText = "ox" -- [ox | jg | qb | lab | custom ]
BridgeClientConfig.InputSystem = "auto" -- [ auto | ox | qb ]
BridgeClientConfig.MenuSystem = "auto" -- [ auto | ox | qb ]