Skip to content

Commit

Permalink
fix(bridge/qb/server/functions): spawn vehicle returns entityId inste…
Browse files Browse the repository at this point in the history
…ad of netId
  • Loading branch information
Manason authored Oct 30, 2023
1 parent c0a8da4 commit d5a87d3
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions bridge/qb/server/functions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,16 @@ functions.GetIdentifier = GetPlayerIdentifierByType
---@deprecated use the native GetPlayers instead
functions.GetPlayers = GetPlayers

---@deprecated Use functions.CreateVehicle instead.
---@deprecated use SpawnVehicle from imports/utils.lua
---@return number?
function functions.SpawnVehicle(source, model, coords, warp)
return SpawnVehicle(source, model, coords, warp)
local netId = SpawnVehicle(source, model, coords, warp)
if not netId then return end
return NetworkGetEntityFromNetworkId(netId)
end

---@deprecated use SpawnVehicle from imports/utils.lua
functions.CreateVehicle = SpawnVehicle
functions.CreateVehicle = functions.SpawnVehicle

---@deprecated No replacement. See https://overextended.dev/ox_inventory/Functions/Client#useitem
---@param source Source
Expand Down

0 comments on commit d5a87d3

Please sign in to comment.