AdvancedParking v5.0.5 - Persistent Vehicle System [ESX] [QB] [QBOX] [OX] [Standalone]

AdvancedParking is a framework-independent (can be used with any framework or without) vehicle persistence system for FiveM. It saves vehicles in the world and restores them at their last known location, including after they despawn or the server restarts.

Any vehicle can be saved. Player-owned, unowned, stolen, NPC-spawned, job-related, or spawned by another resource. You can configure which vehicles should remain through ownership settings, vehicle classes, models, and plate blacklists.

When a saved vehicle is no longer present in the world, AdvancedParking will respawn it on the
server side when a player gets close enough again. Its saved position, damage, modifications, and other supported values are restored automatically.

Saved vehicles remain dynamic. They can be pushed, moved, damaged, and modified, with supported changes persisted accordingly.

Showcase Video

Where Can I Get It?

AdvancedParking is available for 17.50€ plus applicable sales tax.

:shopping_cart: Purchase AdvancedParking on Tebex

Code accessibility ~80% accessible
Subscription-based No
Lines (approximately) 6200
Requirements See requirements below
Support Yes

Requirements

Documentation

Configuration options, exports and additional technical details are available in the official
documentation
.

Support

For free support for installing, configuring or other problems visit our support Discord.

License

A copy of the license can be found here.

Features

  • All vehicles a player has entered will be saved.
    • Configurable vehicle class, model and plate blacklist.
    • Or save only player owned vehicles (requires ESX, QB, QBOX, OX).
  • Vehicles will respawn automatically when players get close and the vehicle isn’t there, even
    after a server restart.
  • Vehicles that have been saved are completely dynamic and some values can be updated without a player inside.
    • Position and Rotation
    • Damage
    • Door Lock State
  • Attached trailers will be saved automatically.
  • Attached vehicles can be saved.
  • Cleanup function takes care of vehicles:
    • Several configurable thresholds like time, engine health and distance to players.
    • Option to return cleaned-up vehicles to the garage.
  • Admin command for deleting all vehicles from the database table.
  • Exports for integration in other resources:
    • Get vehicle positions across the map
    • Delete vehicles
    • Several state bag related exports
    • Get vehicle data/status
    • Trigger manual update of a vehicle
  • Commands for deleting and bringing vehicles and starting a manual cleanup.
  • Can be restarted any time in case you want to change anything.

How It Works

When a player enters an eligible networked vehicle, AdvancedParking registers the vehicle in your database.

If the vehicle should disappear (e.g. no longer relevant to clients or after a server restart),
AdvancedParking will recreate it when a player gets in range of 200 meters of the vehicle, ensuring a non-intrusive form of spawning.

The vehicle’s persistence is not tied to the client that originally entered it. Its saved position
and state are managed on server side.

Do I Need a Garage System?

Technically, a garage is not a requirement to run AdvancedParking on your server. However, it is recommended for servers that need a way to recover vehicles that have become inaccessible.

Because vehicles persist in the world, situations can occur where a vehicle ends up in places where it can not be recovered by in-world player interaction (e.g. submerged or glitched through the world). The cleanup system together with a garage can ensure that these vehicles will eventually be accessible to the player again.

Garages also help with vehicle population. As AdvancedParking is made to be fully dynamic and not interfere with player behavior, players can technically collect a bunch of vehicles in one area of a map. The current hardcoded pool size in FiveM for networked vehicles present on client side is 256. If you have more vehicles than this present in range, some of them won’t be replicated to
other players and you will run into syncing issues. AdvancedParking will show a warning in the
server log when an area is approaching this limit.

Saved Vehicle Values

While AdvancedParking aims to save all variables of a vehicle, some of them cannot be reliably
updated on server side and will only be updated when entering/leaving the vehicle (or when using
the included UpdateVehicle export).

  • Position and rotation
  • Status:
    • Entity, body, engine and petrol tank health
    • Dirt Level
    • Fuel Level (includes compatibility with “LegacyFuel”)
    • Door lock status
    • Burst/flat tires
    • Missing doors
    • Broken windows
    • Broken lights
  • Tuning:
    • Number plate text
    • Modifications from 0-49
      • Visual and performance mods
    • Colors
      • Primary and secondary
      • Custom primary and secondary (RGB)
      • Pearlescent
      • Interior
      • Dashboard
      • Tiresmoke
      • Window tint
    • Lights
      • Xenon color
      • Neonlights color
      • Enabled neons
    • Extras
    • Wheels
      • Type
      • Custom
      • Bulletproof
      • Color
      • Drift Tires
    • Livery (from mods, extra livery and roof livery)
  • Extra values:
    • Landing gear state
    • Vtol position
    • Boat anchor state
    • Convertible roof state
    • Stub wings state
  • Entity state bags

Performance Benchmarks

All performance benchmarks have been executed several times to get an average result. All tests have been performed with 500 vehicles saved.

Client Side

Scenario Vehicles Total Execution Time Measurement Period Usage Highest Single Tick
Idle outside vehicle ~200 1.0 ms 3 s ~0.03% —
Idle inside vehicle ~200 1.6 ms 3 s ~0.05% —
Spawning vehicles next to player 200 60 ms 3 s ~2.00% 1.5 ms

Server Side

Scenario Players Vehicles Total Execution Time Measurement Period Usage Highest Single Tick
Idle 1 0 1.1 ms 1 s ~0.11% —
Spawning vehicles 1 200 270 ms 1 s ~27.00% 37 ms
Updating existing vehicles 1 200 11.2 ms 10 s ~0.11% —
Idle 1,000 (simulated) 0 5.2 ms 1 s ~0.52% —
Spawning vehicles 1,000 (simulated) 200 400 ms 3.2 s ~12.50% 31 ms
Updating existing vehicles 1,000 (simulated) 200 50 ms 10 s ~0.50% —

Note: “Simulated” players actually means an overridden GetPlayers() function that returns the same player 1000 times. This causes all subsequent player related functions to be called 1000 times as well to provide a metric close to what it would actually be.

Patch Notes

For a complete history of updates, changes and fixes, head to GitHub for all patch notes.

42 Likes

Any preview? :thinking:

Hi! you can see other players parked vehicles?

It save all vehicles you drive or only your owned vehicles?

It does delete vehicle if there no people close to vehicle?

With how many vehicles you test it?

What happend if there are more than 125 limit vehicles of gta spawned?

Update:
Fixed a small oopsie on server side.

If you already bought the script, you can access this update via the same link that was already provided to you.

Not right now. Was thinking about a small video. We’ll see… maybe later this week :smiley:

Yes, you can see all vehicles that have been saved. So pretty much every vehicle that had a player in it once. Doesn’t matter if owned or not, if job vehicle or not.

No, it does not delete vehicles if no one is close to it. Unless GTA itself decides to delete it automatically. I do not do that.

On our liveserver it ran perfectly with ~20-30 players and ~100 vehicles.
After spawning, I unload the models immediately, so there should not be any problems when above.

If you encounter any problems with the script, feel free to tell me! I will fix it asap :slight_smile:

there is a limit of 128 spawned vehicles at the same time (it’s a native limit of gta) if there are more, the next vehicle don’t spawn.

Try to spawn more than that and test it. i don’t know if with onesync infinity you can bypass that

With this: [Release][OneSync] Enc0ded Persistent Vehicles

that problem happends and i’m pretty sure that you use the same system (Retrieve info of all vehicles bu server with the onesync implemented native)

if your script can spawn more vehicles and vehicles spawn correctly with no random boats on city like the enc0ded script, i’ll buy it.

1 Like

Okay, I’ll push an update later today to fix compatibility with another script and test this as well. I’ll let you know what I find out :slight_smile:

1 Like

Have you A Video

1 Like

If this is possible, i’ll buy it too

1 Like

Vehicle spawns after a bit of time, but then when you use another vehicle. The old parked one flashes / Flickers where it’s parked.

No, but will probably come during this week. I don’t have a lot of time to record :smiley:

Could you make a video of that? Never seen that happening. :confused:

1 Like

Are you really using MySQL for a script like that? Servers with more than 100 players will explote the DB

1 Like

If you get out the other car, then the old saved one spawns.

Have you tried it? I think my main concern would be network traffic, not database performance. But nonetheless, future releases will be more performant.

@Minty2 Well that is interesting. Are you using OneSync Infinity? How old is your server artifact version? How many players were online at that time?

Hi, So doesn’t matter which car is spawned. It causes old parked cars to flicker. Is just me on the server, OneSync Enabled and 3404, Brand new FiveM server.

Damage is not saved. Even with a very damaged car. We tested it with two people, and sometimes some vehicles are not charged. No bug reports. We use the Artifact 3404 and One Sync Infinity.

1 Like

What type of damage are you talking about?

I save those 3:
health
bodyHealth
engineHealth
petrolTankHealth

If you are talking about the visual damage:
I can’t save those. Noone can. Noone even knows how to do that. Unless you know a script or mod which already does that and allows access to its source code. If you point me to it I will gladly use that as well!

I mean health, bodyHealth, engineHealth and petrolTankHealth. As soon as you get into the vehicle, everything is fine with the vehicle.

Finally! Here is a new update for you all :slight_smile:

If you already bought the script, you can access it from the same link that was already sent to you.

@mikastro @Flobbah There should now not be any problem with this. A client is now restricted to 32 vehicles. If you decide to buy it, then let me know if you encounter any issues!

@Minty2 I could not reproduce this issue at all. If you could try it with the new update and let me know if it still happens. Also did it happen with modded vehicles only? Or does it also happen with Vanilla vehicles?

@oidetschesn This should all be saved. Do you have reproduction steps for me?

1 Like