Players spawn

Hi, I have a problem with saving positions for players. When I disconnect from server my last position is saving (I see new coords in database), but when I connect to my server im in random position. I dont know what is going on, any suggestions? Thanks for help.

What script do you have that manages your players position on spawn? What you’re describing is not default FiveM behaviour so you must have an additional resource running.

So I didnt think about it from this point. I was thinking its automatic process from FiveM. Generally, the script is es_extended, I found it by looking on sql file which must be added to database. Im gonna try to reinstall this script. Thanks for help.

Ok so I reinstalled es_extended, but the problem isnt expired. Any suggestions? :confused:

Bumpp

For me, I’m using mysql, I needed to go into the essentialmode DB itself, alter the users table, position column to be varchar(255), I think it was set at 50 or something which was too short to handle the entire coordinates.

It’s been a while, and it will vary depending on how you manage your db, but I did something like: ALTER TABLE users MODIFY COLUMN positions VARCHAR(255);

It may slightly differ, I can’t remember exactly… If you’re not familiar with sql, it would probably be much easier for you to change it using something like Heidi or phpmyadmin or whatever your favorite clicky db manager is–the important part is you want to increase the users position column from VARCHAR(50) type to VARCHAR(255).

Just FYI, that may not even be the culprit, but it fixed it for our tiny server so it was good enough for us.

I tried this solution from Reddit, but I always had VARCHAR setted to 255. Still not working :confused:

1 Like

are you sure you’re looking at the position column type in the users table and not something else that looks similar? I’ve seen other people who were looking at other columns which had pos in the name but weren’t the actual column named position.

Yes, im sure. http://prntscr.com/oai5ro

I FIXED IT! :smiley:
U just need to download 2 maps from github then add it on server, change default teleports to airport or something else, what u want, it must be one place. U have to change it in these 2 maps. Its all. Thanks all for help.

The new solution, u might have a script called simpleSpawn - he is doing the big problem with spawn, he just have added coords to spawn and ignoring position in your db.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.