Skip to content

Commit

Permalink
fix(bridge/qb/server): SpawnVehicle & CreateVehicle callbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
D4isDAVID committed Feb 2, 2024
1 parent 93053da commit 612f64e
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 612f64e

Please sign in to comment.