fix(es_extended/client/functions): add optional return type

This commit is contained in:
Kenshin13
2024-12-14 21:38:24 +01:00
parent 627d48a0e3
commit 792543ba39
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -532,7 +532,7 @@ end
---@param heading number The heading of the vehicle
---@param cb? function The callback function
---@param networked? boolean Whether the vehicle should be networked
---@return nil
---@return number? vehicle
function ESX.Game.SpawnVehicle(vehicleModel, coords, heading, cb, networked)
local model = type(vehicleModel) == "number" and vehicleModel or joaat(vehicleModel)
local vector = type(coords) == "vector3" and coords or vec(coords.x, coords.y, coords.z)
@@ -83,7 +83,7 @@ end
---@param heading number
---@param properties table
---@param cb? fun(netId: number)
---@return number|nil netId
---@return number? netId
function ESX.OneSync.SpawnVehicle(model, coords, heading, properties, cb)
if cb and not ESX.IsFunctionReference(cb) then
error("Invalid callback function")