Skip to content

Commit

Permalink
refactor(es_extended/client/main.lua): move the event
Browse files Browse the repository at this point in the history
  • Loading branch information
Arctos2win authored Feb 14, 2024
1 parent d40ff2f commit 9d3ce9b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions [core]/es_extended/client/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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

Expand Down

0 comments on commit 9d3ce9b

Please sign in to comment.