fix(es_extended/server/onesync.lua): ESX.OneSync.SpawnPed

This commit is contained in:
Csoki
2023-02-07 16:22:41 +01:00
parent 3919780750
commit debec53d05
+2 -2
View File
@@ -109,7 +109,7 @@ function ESX.OneSync.SpawnPed(model, coords, heading, cb)
CreateThread(function()
local entity = CreatePed(0, model, coords.x, coords.y, coords.z, heading, true, true)
while not DoesEntityExist(entity) do Wait(50) end
return entity
cb(NetworkGetNetworkIdFromEntity(entity))
end)
end
@@ -163,7 +163,7 @@ end
---@param maxDistance number
---@param modelFilter table models to ignore, where the key is the model hash and the value is true
---@return table
function ESX.OneSync.GetVehiclesInArea(coords, maxDistance, modelFilter, cb)
function ESX.OneSync.GetVehiclesInArea(coords, maxDistance, modelFilter)
return getNearbyEntities(GetAllVehicles(), coords, modelFilter, maxDistance)
end