mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-09-04 16:23:21 +00:00
fix(es_extended/server/onesync.lua): ESX.OneSync.SpawnPed
This commit is contained in:
@@ -109,7 +109,7 @@ function ESX.OneSync.SpawnPed(model, coords, heading, cb)
|
|||||||
CreateThread(function()
|
CreateThread(function()
|
||||||
local entity = CreatePed(0, model, coords.x, coords.y, coords.z, heading, true, true)
|
local entity = CreatePed(0, model, coords.x, coords.y, coords.z, heading, true, true)
|
||||||
while not DoesEntityExist(entity) do Wait(50) end
|
while not DoesEntityExist(entity) do Wait(50) end
|
||||||
return entity
|
cb(NetworkGetNetworkIdFromEntity(entity))
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -163,7 +163,7 @@ end
|
|||||||
---@param maxDistance number
|
---@param maxDistance number
|
||||||
---@param modelFilter table models to ignore, where the key is the model hash and the value is true
|
---@param modelFilter table models to ignore, where the key is the model hash and the value is true
|
||||||
---@return table
|
---@return table
|
||||||
function ESX.OneSync.GetVehiclesInArea(coords, maxDistance, modelFilter, cb)
|
function ESX.OneSync.GetVehiclesInArea(coords, maxDistance, modelFilter)
|
||||||
return getNearbyEntities(GetAllVehicles(), coords, modelFilter, maxDistance)
|
return getNearbyEntities(GetAllVehicles(), coords, modelFilter, maxDistance)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user