Using ESX and its updating the spawn location to where I last logged out. I want to disable that and make it so you log back into the same spawn location everytime
schwim
2
Forum owners ask that you post questions relating to supported resource in their topics. The ESX support topic:
Not sure its ESX though that’s causing this. I’m asking in general.
Edit: I replied to that thread as well just in case
Fivem is all about reading …
1 Like
Great, thanks. I’m sure you’re aware you miss information at times so no need to be rude.
Hey , did you find how to disable the last position spawn?
did you find out how to disable it im looking to do the same
1 Like
/es_extended/client/main.lua
AddEventHandler('playerSpawned', function()
while not ESX.PlayerLoaded do
Citizen.Wait(1)
end
local playerPed = PlayerPedId()
-- Restore position
if ESX.PlayerData.lastPosition then
SetEntityCoords(playerPed, ESX.PlayerData.lastPosition.x, ESX.PlayerData.lastPosition.y, ESX.PlayerData.lastPosition.z)
end
TriggerEvent('esx:restoreLoadout') -- restore loadout
isLoadoutLoaded = true
isPlayerSpawned = true
isDead = false
end)
You can edit this and make it work how ever you want.
*For me its start at line 30
couldnt find that line its probably an older version of es_extended
Thanks for the help but i ran into another problem. I put in the right coords but i keep getting spawned in the ocean.