Persistence

Hi all

I’m searching a way to make my vehicles persistent.

I mean, when the server boot, the last save position of the (choosen by me) véhicles was read in DB to make them spawn before 1st player.

And when players are far away prevent fivem engine to put them in pound

A persistent system but with low consumtion of resources of course

Any idea ?

Thx in advance

1 Like

uh, what? lol

hi @nta

Thanks to be interest of my pbm ^^

I mean there is no script in our server (we made for) that unspawn/put them in pound. So in my mind i mean perhaps Fivem Core done it ?

Do you know a way to make some vehicles persistant ?

Thx in advance

What’s ‘pound’ here?

I guess he is talking about “police impound” for abandoned vehicles…

But this is already possible, since a lot of time. You can spawn a vehicle in server-side and keep the owner reference and listen playerDropped event to know when the player goes out from server.

pound = fourrière in french. A place where you vehicles gone when there is noone (players) close

FiveM nor GTA itself even have such a feature. Are you sure you’re not referring to a script that does this and deletes vehicles?!

Exactly but not only for abandoned vehicles (when players quit the server)

i give an exemple :

i take my vehicles (from table owned_veh…) from my garage, go to the franklin’s airport.
i park my vehicle (not inside a garage) near of it, take a plane and go far away.
if there’s no players close (i really don’t know the radius used) to my car, it will be automaticly remove.

When I get back to the airport with the plane, I have to go to the car pound to get my car back.

I just want my car won’t remove, it quietly wait my return :slight_smile:

Perhaps more clear with this example.
Thx !

The vehicle isnt being removed. As you are too far, map collisions will be unloaded, so the vehicle will fall through the map.

It’s a normal behavior (since I know), to avoid this u should spawn the vehicle via server-side.

Thx for reply

i don’t understand why if i spawn my vehicule by server-side, it’ll not fall when collisions were unloaded ?

Is the way if i made a script that freeentity if the vehicule fall (more than 3 in Z for exemple) ?