mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 17:28:53 +00:00
Fix position with new system
This commit is contained in:
@@ -546,5 +546,25 @@ Citizen.CreateThread(function()
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
end)
|
||||
|
||||
-- Last position
|
||||
Citizen.CreateThread(function()
|
||||
while true do
|
||||
|
||||
Citizen.Wait(1000)
|
||||
|
||||
if ESX ~= nil and ESX.PlayerLoaded then
|
||||
|
||||
local playerPed = GetPlayerPed(-1)
|
||||
local coords = GetEntityCoords(playerPed)
|
||||
|
||||
if not IsEntityDead(playerPed) then
|
||||
ESX.PlayerData.lastPosition = {x = coords.x, y = coords.y, z = coords.z}
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
end)
|
||||
Reference in New Issue
Block a user