mirror of
https://github.com/jimathy/jim_bridge.git
synced 2026-08-17 05:56:02 +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)
|
||||
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user