ESX save last position does not work

Howdy, I’m running a fresh install of ESX, but for some reason it does not save position when you log out?

Is there something I might’ve done wrong?

If you need any files/logs let me know.

server. cfg would help!

you probably don’t want to change these!

only change them if you’re using a server with multiple network interfaces

endpoint_add_tcp “0.0.0.0:30120”
endpoint_add_udp “0.0.0.0:30120”
set es_enableCustomData 1
set mysql_connection_string “server=localhost;uid=root;password=;database=essentialmode”
#set playernames_svTemplate “[{{id}}] {{firstname}} {{name}}”
#set playernames_template “{{serverName}}”
exec permissions.cfg

FIVEM DEFAULT

start mapmanager
start NativeUI
start eup-stream
start eup-ui
start chat
start spawnmanager
start sessionmanager
restart sessionmanager
start fivem
start hardcap
start ■■■■■■■
#start scoreboard
start baseevents
start connectqueue

MYSQL ASYNC

start mysql-async

ESSENTIAL MODS

start essentialmode
start esplugin_mysql
start es_admin2
start es_extended

ESX REQUIRED MODS

start instance
start cron
start skinchanger
start esx_skin
start esx_menu_default
start esx_menu_list
start esx_menu_dialog
start esx_phone
start esx_addonaccount
start esx_addoninventory
start esx_datastore
start esx_society
start esx_service
start esx_billing

ESX JOBS

start esx_jobs
start esx_joblisting
start esx_taxijob
start esx_mecanojob
start esx_policejob
start esx_property
start esx_realestateagentjob
start esx_bankerjob
start esx_ambulancejob
start esx_vehicleshop

ESX ANY OTHER MODS

start esx_status
#start esx_basicneeds
start esx_clotheshop
start esx_garage
start esx_holdup
start esx_drugs
start esx_atm
start esx_identity
start esx_holdup
start esx_boat
start esx_dmvschool
start esx_animations
start esx_locksystem
start esx_legacyfuel
start esx_license
start esx_lscustom
#start esx_optionalneeds
start esx_sit
start esx_shops
start esx_voice
start esx_weaponshop
#start esx_whitelistEnhanced
start esx_rpchat
start esx_scoreboard
start esx_jb_advanced_truck_inventory
start esx_tattoosShops
start esx-checkdeathcause
start esx_sellDirtyMoney
#start esx_inventoryhud

start es_ui
#cars
start pdmegapack
start 2015polstang
start FTNExplorer
start chargermarked
start riot

#Dauntless
start ar_stationLock
#start basicScripts
start carhud
start LocationTracker
start Radiant_Animations
start RealisticVehicleFailure-master
start esplugin
start ffpsshot_aim
#start LeaveEngineRunning
start EngineToggle
start disabledispatch
start lux_vehcontrol
start pNotify
start PvP
start RealAITraffic
start removeAIcops
start trafficadjuster
start TrafficAlert
#start vannouncer
start vMenu
start wk_wrs
#start wraith_alpr
start z-loadscreen
start new_banking
#start SeatbeltIndicator

#Keep this here, it stops some errors
restart sessionmanager

sv_scriptHookAllowed 0

change this and remove the # before rcon_password if you are using rcon, if not, leave this as is

#rcon_password 050694

sv_hostname “[Beta]Lunar City Roleplay”

nested configs!

#exec server_internal.cfg

loading a server icon (96x96 PNG file)

load_server_icon logo.png

convars for use from script

set temp_convar “hey world!”

disable announcing? clear out the master by uncommenting this

#sv_master1 “”
sets tags “roleplay”

want to only allow players authenticated with a third-party provider like Steam?

#sv_authMaxVariance 1
#sv_authMinTrust 5

add system admins

add_ace group.admin command allow # allow all commands
add_ace group.admin command.quit deny # but don’t allow quit
add_ace resource.essentialmode command.add_ace allow
add_ace resource.essentialmode command.add_principal allow
add_principal identifier.steam:76561198171230205 group.admin # add the admin to the group

hide player endpoints in external log output

sv_endpointprivacy true

server slots limit (default to 30)

sv_maxclients 32

How does your location table look like?


https://gyazo.com/799d74f99b40abbf92b2390dfc0095de


https://gyazo.com/7431fd484c47c31c2de9ece5d93e1cd1

Anyone knows?

This is what you call “fresh installed” :smiley:

If you are disconnecting from server the console should Show you

[SAVED] Playername

Can you See this if you are disconnecting?

Well all ESX are freshly re-installed.
Yes i see the SAVE in console but it still don’t save position

1 Like

Anyone?

Hey Asbonia, have you found a solution ?
We have the same problem here and we are getting mad.

Still having this issue!

1 Like

Anyone find a fix?

Same situation here.
I can not get the character to leave where he left.

I am seeing the same thing, but it seems random. Some times it will save on ‘quit’ other times it does not. I did notice that the new version of ESX uses xPlayer.GetCoords() on playerdrop where last version used xPlayer.lastposition … I haven’t looked into xPlayer.GetCoords() but would it be able to get the players coords after they have dropped from the server? It seems to update fine if you are on the server and it does the auto save. Which is the same function to save position but you are still on the server at the time.

SpikE

After looking into this a bit… I noticed the default config for esx has the sync coords set to only happen every 2 mins. So if you moved locations within that 2 min window and logged out it would update your pos in the database, but it would be the last position saved. After looking at it it the server sync is not saving to the database every 2 mins it is just updating the position in the server list. I am going to change the time in the config to 15 secs to update to see how much difference it impacts with server performance.

Hopefully this helps someone else get this sorted so when you logout it is close to where you left the game as a 2 min window you can get a good distance away from where it last saved your position.

SpikE

2 Likes

I hope performance isn’t affected as much.
Thank you so much for doing this.

Anyone have a solution?

bump …

Anyone managed to fix it?

Also the same problem with me. I change 4-5 different es_extended version that work but when i try to make fresh new server the position just don’t want to save where am i left …

1 Like