From 24431d1bf440afd9d41ea69bef0e48bcd79fcad8 Mon Sep 17 00:00:00 2001 From: MrNewb <47620135+MrNewb@users.noreply.github.com> Date: Wed, 8 Jan 2025 13:01:47 -0500 Subject: [PATCH] Fix notify, add var in progbar --- modules/notify/client.lua | 6 ++++-- modules/notify/server.lua | 6 +++--- modules/progressbars/qb_progressbar/client.lua | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/modules/notify/client.lua b/modules/notify/client.lua index 436b896..5a7f2a9 100644 --- a/modules/notify/client.lua +++ b/modules/notify/client.lua @@ -27,14 +27,16 @@ Notify.SendNotify = function(message, type, time) end end -Notify.ShowHelpText = function(message, position) +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 - return exports.ox_lib:showTextUI(message, { position = 'left-center' }) + 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") diff --git a/modules/notify/server.lua b/modules/notify/server.lua index 8c3dc9f..ebf5fbc 100644 --- a/modules/notify/server.lua +++ b/modules/notify/server.lua @@ -1,5 +1,5 @@ -Notify = {} +Notify = Notify or {} -Notify.SendNotify = function(src, message, type, time) - TriggerClientEvent('community_bridge:Client:Notify', src, message, type, time) +Notify.SendNotify = function(src, message, _type, time) + TriggerClientEvent('community_bridge:Client:Notify', src, message, _type, time) end \ No newline at end of file diff --git a/modules/progressbars/qb_progressbar/client.lua b/modules/progressbars/qb_progressbar/client.lua index 6c4116a..ae2ba32 100644 --- a/modules/progressbars/qb_progressbar/client.lua +++ b/modules/progressbars/qb_progressbar/client.lua @@ -37,7 +37,7 @@ ProgressBar.StartProgressBar = function(time, label, whiledead, cancancel, disab local canceled = canceledAction or function() print("Cancelled") end local repackedTable = convertOxToQB(disable, animTable) exports['progressbar']:Progress({ - name = "random_task", + name = textLabel, duration = runTime, label = textLabel, useWhileDead = deadBool,