Skip to content

Commit

Permalink
fix(bridge/qb/server): SpawnVehicle & CreateVehicle callbacks (#342)
Browse files Browse the repository at this point in the history
  • Loading branch information
D4isDAVID authored Feb 2, 2024
1 parent 93053da commit 12bf4d5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bridge/qb/server/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -87,16 +87,16 @@ end

---@deprecated call server function qbx.spawnVehicle from modules/lib.lua
qbCoreCompat.Functions.CreateCallback('QBCore:Server:SpawnVehicle', function(source, cb, model, coords, warp)
local netId = qbCoreCompat.Functions.SpawnVehicle(source, model, coords, warp)
local vehId = qbCoreCompat.Functions.SpawnVehicle(source, model, coords, warp)

if netId then cb(netId) end
if vehId then cb(NetworkGetNetworkIdFromEntity(vehId)) end
end)

---@deprecated call server function qbx.spawnVehicle from modules/lib.lua
qbCoreCompat.Functions.CreateCallback('QBCore:Server:CreateVehicle', function(source, cb, model, coords, warp)
local netId = qbCoreCompat.Functions.CreateVehicle(source, model, nil, coords, warp)
local vehId = qbCoreCompat.Functions.CreateVehicle(source, model, nil, coords, warp)

if netId then cb(netId) end
if vehId then cb(NetworkGetNetworkIdFromEntity(vehId)) end
end)

local createQbExport = require 'bridge.qb.shared.export-function'
Expand Down

0 comments on commit 12bf4d5

Please sign in to comment.