Persistent Vehicles

The persistence system can be affected by other assets, keep in mind that apart from the Garage, you have other assets started on your server that can affect the use of this system, whether it is another random asset or an anticheat.

This is a very popular system for players who want to add realism to their server, so we also mention that it is not dangerous and that this system includes a police impound system for those who leave their vehicles in the middle of the street or in the middle of the road.

Can I disable this system completely?

You can disable the system or enable it whenever you want using the built-in Config.PersistentVehicles in config.lua.

I want to use AdvancedParking, what should I do?

You can disable Config.PersistentVehicles and it will work correctly with your other persistence assets. If you use AdvancedParking, disable this configuration and it will work automatically detecting this asset.

My vehicle randomly disappears from the map

This case is very common, it may be due to other external assets, either a random asset or an anticheat. Check in your player_vehicles or owned_vehicles sql where said vehicle went and investigate what asset on your server it is affecting.


Another option may be that the vehicle has never been entered into a garage before, for that use the persistence export that is at the end of this document.


Remove vehicles from the map

Our garage system, as you might notice, does not allow you to remove vehicles from the map using the classic dv command, since vehicles are persistent and will return to the map after deletion.

For this reason, we created two exclusive commands for administration, which will allow you to remove a specific car from the map or all player vehicles on the map.

Note that if you kill a player's car, they will go directly to a random impound on your map, based on the type of the vehicle.

Comando
Explicacion del comando

/mdv

Alternate command to /dv, this removes the closest car and sends it to impound.

/mdvall

Command that sends all OUT cars to impound.


Integration of persistence in other assets

This system is useful to add it to your vehiclesshop or vehicle spawn assets, since by default Advanced Garages will only give persistence to vehicles deposited and removed from the garage, if you have not done that first, the vehicle will not be persistent.

This export system will give the persistent value to a vehicle that you have spawned outside of the garage asset, add it to your vehiclesshop or vehicle spawn assets if you are going to use persistence.

-- vehicle: netId from vehicle
exports['qs-advancedgarages']:setVehicleToPersistent(vehicle)

Last updated