mirror of
https://github.com/jimathy/jim_bridge.git
synced 2026-08-19 06:46:04 +01:00
Change how bridge decides what get/setvehicleproperties to use
This commit is contained in:
12
wrapper.lua
12
wrapper.lua
@@ -923,10 +923,10 @@ end
|
|||||||
function getVehicleProperties(vehicle)
|
function getVehicleProperties(vehicle)
|
||||||
local properties = {}
|
local properties = {}
|
||||||
if vehicle == nil then return nil end
|
if vehicle == nil then return nil end
|
||||||
if GetResourceState(OXLibExport):find("start") then
|
if GetResourceState(QBExport):find("start") and not GetResourceState(QBXExport):find("start") then
|
||||||
properties = lib.getVehicleProperties(vehicle)
|
|
||||||
elseif GetResourceState(QBExport):find("start") then
|
|
||||||
properties = Core.Functions.GetVehicleProperties(vehicle)
|
properties = Core.Functions.GetVehicleProperties(vehicle)
|
||||||
|
elseif GetResourceState(OXLibExport):find("start") then
|
||||||
|
properties = lib.getVehicleProperties(vehicle)
|
||||||
end
|
end
|
||||||
return properties
|
return properties
|
||||||
end
|
end
|
||||||
@@ -936,11 +936,11 @@ function setVehicleProperties(vehicle, props)
|
|||||||
print(("Unable to set vehicle properties for '%s' (entity does not exist)"):
|
print(("Unable to set vehicle properties for '%s' (entity does not exist)"):
|
||||||
format(vehicle))
|
format(vehicle))
|
||||||
end
|
end
|
||||||
if GetResourceState(OXLibExport):find("start") then
|
if GetResourceState(QBExport):find("start") and not GetResourceState(QBXExport):find("start") then
|
||||||
TriggerServerEvent(GetCurrentResourceName()..":ox:setVehicleProperties", VehToNet(vehicle), props)
|
|
||||||
elseif GetResourceState(QBExport):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
|
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)
|
Core.Functions.SetVehicleProperties(vehicle, props)
|
||||||
|
else
|
||||||
|
TriggerServerEvent(GetCurrentResourceName()..":ox:setVehicleProperties", VehToNet(vehicle), props)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user