From 064d3b7ccdc421166eb8282134a37200a5fa28e8 Mon Sep 17 00:00:00 2001 From: MrNewb <47620135+MrNewb@users.noreply.github.com> Date: Tue, 4 Mar 2025 22:28:34 -0500 Subject: [PATCH] target to new format --- modules/target/ox_target/client.lua | 5 ++++- modules/target/qb-target/client.lua | 4 +++- modules/target/sleepless_interact/client.lua | 4 +++- settings/clientConfig.lua | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/modules/target/ox_target/client.lua b/modules/target/ox_target/client.lua index cf694ed..422a64e 100644 --- a/modules/target/ox_target/client.lua +++ b/modules/target/ox_target/client.lua @@ -1,4 +1,7 @@ -if GetResourceState('ox_target') ~= 'started' or (BridgeClientConfig.TargetSystem ~= "ox" and BridgeClientConfig.TargetSystem ~= "auto") then return end +local resourceName = "ox_target" +local configValue = BridgeClientConfig.TargetSystem +if (configValue == "auto" and GetResourceState(resourceName) ~= "started") or (configValue ~= "auto" and configValue ~= resourceName) then return end + local targetDebug = false local function detectDebugEnabled() diff --git a/modules/target/qb-target/client.lua b/modules/target/qb-target/client.lua index c113208..bf627bb 100644 --- a/modules/target/qb-target/client.lua +++ b/modules/target/qb-target/client.lua @@ -1,4 +1,6 @@ -if GetResourceState('qb-target') ~= 'started' or (BridgeClientConfig.TargetSystem ~= "qb" and BridgeClientConfig.TargetSystem ~= "auto") then return end +local resourceName = "qb-target" +local configValue = BridgeClientConfig.TargetSystem +if (configValue == "auto" and GetResourceState(resourceName) ~= "started") or (configValue ~= "auto" and configValue ~= resourceName) then return end if GetResourceState('ox_target') == 'started' then return end -- this is for older versions of ox that supported the backwards compatability. As its depricated we dont want to touch that. local targetDebug = false diff --git a/modules/target/sleepless_interact/client.lua b/modules/target/sleepless_interact/client.lua index 9ee93eb..01315b0 100644 --- a/modules/target/sleepless_interact/client.lua +++ b/modules/target/sleepless_interact/client.lua @@ -1,4 +1,6 @@ -if GetResourceState('sleepless_interact') ~= 'started' or (BridgeClientConfig.TargetSystem ~= "sleepless" and BridgeClientConfig.TargetSystem ~= "auto") then return end +local resourceName = "sleepless_interact" +local configValue = BridgeClientConfig.TargetSystem +if (configValue == "auto" and GetResourceState(resourceName) ~= "started") or (configValue ~= "auto" and configValue ~= resourceName) then return end --if GetResourceState('sleepless_interact') ~= 'started' then return end -- This is only partially supported diff --git a/settings/clientConfig.lua b/settings/clientConfig.lua index af0d021..79ee5e4 100644 --- a/settings/clientConfig.lua +++ b/settings/clientConfig.lua @@ -8,6 +8,6 @@ BridgeClientConfig.ProgressBarSystem = "auto" -- [ auto | ox | qb ] BridgeClientConfig.ZoneSystem = "ox" -- [ ox | poly ] BridgeClientConfig.VehicleKey = "auto" -- [ auto | qb-vehiclekeys | MrNewbVehicleKeys | jaksams_VehiclesKeys | wasabi_carlock | mk_vehiclekeys | qbx_vehiclekeys | qs-vehiclekeys | t1ger_keys | Renewed-Vehiclekeys | mono_carkeys| cd_garage | okokGarage | F_RealCarKeysSystem BridgeClientConfig.Fuel = "auto" -- [ LegacyFuel | ox_fuel | ps-fuel | qs-fuelstations | Renewed-Fuel | ti_fuel | lc_fuel | x-fuel | cdn-fuel | esx-sna-fuel | BigDaddy-Fuel | okokGasStation ] -BridgeClientConfig.TargetSystem = "ox" -- [ ox | qb | sleepless | auto ] -- sleepless is only partially supported and would need another system in place +BridgeClientConfig.TargetSystem = "auto" -- [ auto | ox_target | qb-target | sleepless_interact ] -- sleepless is only partially supported and would need another system in place return BridgeClientConfig \ No newline at end of file