refactor(es_extended/client/main.lua): move the event

This commit is contained in:
Arctos2win
2024-02-14 14:42:55 +01:00
committed by GitHub
parent d40ff2f70e
commit 9d3ce9b8dd
+2 -2
View File
@@ -24,8 +24,7 @@ function ESX.SpawnPlayer(skin, coords, cb)
p:resolve()
end)
Citizen.Await(p)
TriggerEvent('playerSpawned', coords)
local playerPed = PlayerPedId()
FreezeEntityPosition(playerPed, true)
SetEntityCoordsNoOffset(playerPed, coords.x, coords.y, coords.z, false, false, false, true)
@@ -35,6 +34,7 @@ function ESX.SpawnPlayer(skin, coords, cb)
end
FreezeEntityPosition(playerPed, false)
NetworkResurrectLocalPlayer(coords.x, coords.y, coords.z, coords.heading, true, true, false)
TriggerEvent('playerSpawned', coords)
cb()
end