Vehicles despawn at disconnect


#1

Hello, im trying to save player’s vehicles data between server restarts. Position, rotation, tuning, etc.
Everything is going good except situation with vehicles “existence”.
E.g. two players standing in front of spawned vehicle, marked as mission entity (SetEntityAsMissionEntity(veh,true,false)).
But, when first player flies away and second disconnects from server - vehicle despawns.
How can i prevent vehicle from despawning, but to “migrate” to other player memory?
I dont want to ask every player, do they have specific vehicle in their vehicle pool, and if not - spawn it again.


#3

Thank you for replying, but a made almost same thing few month ago. Even with saving vehicles between restarts.
But anyway, if player will be alone near vehicles and disconnect, cars will despawn. So you must also check, do saved vehicles exist. If not - spawn it.


#4

I didn’t know you already made one… I would’ve saved a lot of work lol.
But is it public? Or you just made it for yourself?
I know that if all the players disconnect, the vehicles despawn. That’s why I made so that it restores the vehicles after leaving the server.


#5

I made a lot of coll stuff, but all these is for private RP server. A dont make my resources public, because of people, who just installs on their server public resources and screaming everywhere “LOOK AT MY SERVER, I MADE IT MYSELF!!! Also, buy zentorno for $10”. I hate this kind of people.
If you interested, you may look at LibertyRP server in twitch. Our team was first, who created crouching, building doors closing, saving player’s vehicles between restarts, face editing like in gta online, totoos and a lot of other stuff.
Possibly, i could help with some questions, but im in creative crisis about 3 weeks. So i may be too lazy to help.


#6

I understand haha. And I know there’s a lot of people like that, but as I don’t have a server, I prefer to just open source develop.
I will definitely take a look at LibertyRP, it sounds just amazing. And I’d love to see the face editing like in GTA Online.
Thanks for offering help.


#7

“Like in GTA Online” i mean details of face. All these beards, makeup, freckles, nose height, etc. Not HUD. Dont get too excited.
In truth, our design is really bad, cause we dont have designers or at least people, who wants to work with interface. So we have default vRP HUD.


#8

The vRP hud looks nice to me (as long as you change the font lol). And I am very good at HTML design, but I just don’t know how NUI works xD. And I was not excited about the hud of the character creator, but about the ressemblance thingy, between ur parents and all of that.