From 985b71442ccb22bcde165c47470e09c61430d1fd Mon Sep 17 00:00:00 2001 From: cityparadise <108126483+cityparadise@users.noreply.github.com> Date: Mon, 14 Apr 2025 12:18:44 +0100 Subject: [PATCH 1/3] Remove Client Based Debug - Removed Client Based Debug Option (using shared in settings folder.) --- modules/target/ox_target/client.lua | 2 +- modules/target/qb-target/client.lua | 2 +- modules/target/sleepless_interact/client.lua | 2 +- settings/clientConfig.lua | 1 - 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/modules/target/ox_target/client.lua b/modules/target/ox_target/client.lua index 10b7026..fb06fd0 100644 --- a/modules/target/ox_target/client.lua +++ b/modules/target/ox_target/client.lua @@ -5,7 +5,7 @@ if (configValue == "auto" and GetResourceState(resourceName) ~= "started") or (c local targetDebug = false local function detectDebugEnabled() - if BridgeClientConfig.DebugLevel == 2 then + if BridgeSharedConfig.DebugLevel == 2 then targetDebug = true end end diff --git a/modules/target/qb-target/client.lua b/modules/target/qb-target/client.lua index 00cc6ee..dccdb64 100644 --- a/modules/target/qb-target/client.lua +++ b/modules/target/qb-target/client.lua @@ -5,7 +5,7 @@ if GetResourceState('ox_target') == 'started' then return end -- this is for old local targetDebug = false local function detectDebugEnabled() - if BridgeClientConfig.DebugLevel == 2 then + if BridgeSharedConfig.DebugLevel == 2 then targetDebug = true end end diff --git a/modules/target/sleepless_interact/client.lua b/modules/target/sleepless_interact/client.lua index 9ae72a3..c3cc9f0 100644 --- a/modules/target/sleepless_interact/client.lua +++ b/modules/target/sleepless_interact/client.lua @@ -5,7 +5,7 @@ if (configValue == "auto" and GetResourceState(resourceName) ~= "started") or (c local targetDebug = false local function detectDebugEnabled() - if BridgeClientConfig.DebugLevel == 2 then + if BridgeSharedConfig.DebugLevel == 2 then targetDebug = true end end diff --git a/settings/clientConfig.lua b/settings/clientConfig.lua index f89f5a4..7ae1746 100644 --- a/settings/clientConfig.lua +++ b/settings/clientConfig.lua @@ -1,5 +1,4 @@ BridgeClientConfig = {} -BridgeClientConfig.DebugLevel = 0 -- 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.ShowHelpText = "ox" -- [ ox | qb | jg | okok | cd | lab | custom ] BridgeClientConfig.InputSystem = "auto" -- [ auto | ox | qb ] From 28c220082c2a8500cc4db785fbcb152fdacc2d74 Mon Sep 17 00:00:00 2001 From: Sky <108126483+cityparadise@users.noreply.github.com> Date: Sun, 20 Apr 2025 10:40:14 +0100 Subject: [PATCH 2/3] Update _qb-input.lua Fixed issue with default option not working correctly when creating qb-input menu --- modules/input/_qb-input.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/input/_qb-input.lua b/modules/input/_qb-input.lua index 4371b81..b08b0f1 100644 --- a/modules/input/_qb-input.lua +++ b/modules/input/_qb-input.lua @@ -36,7 +36,7 @@ function OxToQBInput(data) name = i, type = OxTypeToQBType(v.type), isRequired = v.required, - placeholder = v.default, + default = v.default or "", } if v.type == "select" then input.text = "" @@ -85,4 +85,4 @@ function OpenInput(title, data, isQBFormat, submitText) convertedData[tonumber(i)] = v end return convertedData -end \ No newline at end of file +end From 630bdd69566704992cbad3bf4880697d1fbb2204 Mon Sep 17 00:00:00 2001 From: Sky <108126483+cityparadise@users.noreply.github.com> Date: Sun, 20 Apr 2025 11:20:34 +0100 Subject: [PATCH 3/3] Update _qb-input.lua (again :P ) - Added single checkpoint usability - Added check for options table variable - Added checked option to be passed for toggling box as true/ false --- modules/input/_qb-input.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/input/_qb-input.lua b/modules/input/_qb-input.lua index b08b0f1..375c052 100644 --- a/modules/input/_qb-input.lua +++ b/modules/input/_qb-input.lua @@ -47,8 +47,12 @@ function OxToQBInput(data) elseif v.type == "checkbox" then input.text = "" input.options = {} - for k, j in pairs(v.options) do - table.insert(input.options, {value = j.value, text = j.label}) + if v.options then -- Checks if options varible is valid so checkboxes are bundled together (not used by ox for each checkpoint) + for k, j in pairs(v.options) do + table.insert(input.options, {value = j.value, text = j.label, checked = j.checked}) -- added checked option (used to show box as ticked or not) + end + else -- If options is not valid or people pass a single checkbox then it will be a single checkbox per entry + table.insert(input.options, {value = v.value, text = v.label, checked = v.checked}) -- Kept value just incase it's used for other stuffs end end table.insert(returnData, input)