mirror of
https://github.com/citizenfx/cfx-server-data.git
synced 2025-12-12 06:14:09 +01:00
spawnmanager: wait for collision
This commit is contained in:
@@ -270,6 +270,10 @@ function spawnPlayer(spawnIdx, cb)
|
|||||||
--loadScene(spawn.x, spawn.y, spawn.z)
|
--loadScene(spawn.x, spawn.y, spawn.z)
|
||||||
--ForceLoadingScreen(false)
|
--ForceLoadingScreen(false)
|
||||||
|
|
||||||
|
while not HasCollisionLoadedAroundEntity(ped) do
|
||||||
|
Citizen.Wait(0)
|
||||||
|
end
|
||||||
|
|
||||||
ShutdownLoadingScreen()
|
ShutdownLoadingScreen()
|
||||||
|
|
||||||
DoScreenFadeIn(500)
|
DoScreenFadeIn(500)
|
||||||
@@ -334,17 +338,4 @@ end)
|
|||||||
function forceRespawn()
|
function forceRespawn()
|
||||||
spawnLock = false
|
spawnLock = false
|
||||||
respawnForced = true
|
respawnForced = true
|
||||||
end
|
end
|
||||||
|
|
||||||
--[[AddEventHandler('playerInfoCreated', function()
|
|
||||||
loadSpawns(json.encode({
|
|
||||||
spawns = {
|
|
||||||
{ x = -238.511, y = 954.025, z = 11.0803, heading = 90.0, model = 'ig_brucie' },
|
|
||||||
{ x = -310.001, y = 945.603, z = 14.3728, heading = 90.0, model = 'ig_bulgarin' },
|
|
||||||
}
|
|
||||||
}))
|
|
||||||
end)
|
|
||||||
|
|
||||||
AddEventHandler('playerActivated', function()
|
|
||||||
respawnForced = true
|
|
||||||
end)]]
|
|
||||||
Reference in New Issue
Block a user