From 7d0736bfc2c70d6c96039ef57529aaca8e811a48 Mon Sep 17 00:00:00 2001 From: Jim Shield Date: Fri, 19 Jan 2024 22:33:35 +0000 Subject: [PATCH] Change how bridge decides what get/setvehicleproperties to use --- wrapper.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/wrapper.lua b/wrapper.lua index ca68ffa..f32c36a 100644 --- a/wrapper.lua +++ b/wrapper.lua @@ -923,10 +923,10 @@ end function getVehicleProperties(vehicle) local properties = {} if vehicle == nil then return nil end - if GetResourceState(OXLibExport):find("start") then - properties = lib.getVehicleProperties(vehicle) - elseif GetResourceState(QBExport):find("start") then + if GetResourceState(QBExport):find("start") and not GetResourceState(QBXExport):find("start") then properties = Core.Functions.GetVehicleProperties(vehicle) + elseif GetResourceState(OXLibExport):find("start") then + properties = lib.getVehicleProperties(vehicle) end return properties end @@ -936,11 +936,11 @@ function setVehicleProperties(vehicle, props) print(("Unable to set vehicle properties for '%s' (entity does not exist)"): format(vehicle)) end - if GetResourceState(OXLibExport):find("start") then - TriggerServerEvent(GetCurrentResourceName()..":ox:setVehicleProperties", VehToNet(vehicle), props) - elseif GetResourceState(QBExport):find("start") then + if GetResourceState(QBExport):find("start") and not GetResourceState(QBXExport):find("start") then if Config.System.Debug then print("^6Bridge^7: ^2Setting Vehicle Properties ^7[^6"..QBExport.."^7] - [^3"..vehicle.."^7] - [^3"..GetEntityModel(vehicle).."^7] - [^3"..props.plate.."^7]") end Core.Functions.SetVehicleProperties(vehicle, props) + else + TriggerServerEvent(GetCurrentResourceName()..":ox:setVehicleProperties", VehToNet(vehicle), props) end end