Skip to content

Configuration#

Cleanup#

The cleanup is a function for deleting vehicles from the world and the AP database ( vehicle_parking ), depending on your settings. The cleanup will be performed after a server or script restart if you set onScriptRestart = true and/or onServerStart = true. A cleanup will also be performed when you add times = {} in the config.

It will not remove all data from the database and not all vehicles from the server. Only vehicles that match the cleanup config conditions will be removed.


timeThreshold#

The timeThreshold is just the holding time for a vehicle. It doesn't matter how often or when you perform a cleanup, it will not affect whether a cleanup occurs.

As long as timeThreshold is not nil, it will be checked during a cleanup. Every vehicle that is saved will be checked against the timeThreshold. If a vehicle has been standing in the world without an update (e.g. enter/exit, damage taken etc) for a timeperiod equal or higher than timeThreshold, it will be removed from the world.

timeThreshold = nil
timeThreshold = 0
timeThreshold = 6

No vehicle will be deleted due to time constraints.

  • Server restarts at midnight and cleanup is activated on server start.
  • Vehicle A was last updated at 11 p.m.
  • Vehicle B was last updated at 2 p.m.

Result: Vehicle A and B will not be removed and will remain saved.

All vehicle will be deleted due to time constraints.

  • Server restarts at midnight and cleanup is activated on server start.
  • Vehicle A was last updated at 11 p.m.
  • Vehicle B was last updated at 2 p.m.

Result: Both vehicles will be removed.

Some vehicle will be deleted due to time constraints.

  • Server restarts at midnight and cleanup is activated on server start.
  • Vehicle A was last updated at 11 p.m.
  • Vehicle B was last updated at 2 p.m.

Result: Only vehicle B will be removed as it has not been updated for the past 6 hours.


engineThreshold#

The engineThreshold is simply the minimum health required for a vehicle.

As long as engineThreshold is not nil, it will be checked during a cleanup. Every saved vehicle will be checked for its engine health. If you set allVehicles = true, then all vehicles will be checked. All vehicles that have engine health equal to or below the engineThreshold value will be removed.

engineThreshold = 700.0 and allVehicles = false
engineThreshold = 700.0 and allVehicles = true
engineThreshold = nil and allVehicles = true or false

Only saved vehicle will be deleted due to damage.

  • Server restarts and cleanup is activated at server start.
  • Vehicle A has 900 engine health and is not saved.
  • Vehicle B has 960 engine health and is saved.
  • Vehicle C has 450 engine health and is not saved.
  • Vehicle D has 560 engine health and is saved.

Result: Vehicle A will stay. Vehicle B will stay. Vehicle C will stay. Vehicle D will be removed.

All vehicle will be deleted due to damage.

  • Server restarts and cleanup is activated at server start.
  • Vehicle A has 900 engine health and is not saved.
  • Vehicle B has 960 engine health and is saved.
  • Vehicle C has 450 engine health and is not saved.
  • Vehicle D has 560 engine health and is saved.

Result: Vehicle A will stay. Vehicle B will stay. Vehicle C will be removed. Vehicle D will be removed.

No vehicle will be deleted due to damage.

  • Server restarts and cleanup is activated at server start.
  • Vehicle A has 900 engine health and is not saved.
  • Vehicle B has 960 engine health and is saved.
  • Vehicle C has 450 engine health and is not saved.
  • Vehicle D has 560 engine health and is saved.

Result: Vehicle A will stay. Vehicle B will stay. Vehicle C will stay. Vehicle D will stay.


distanceThreshold#

The distanceThreshold is the minimum distance between player and vehicle.

As long as distanceThreshold is not nil, it will be checked during a cleanup. Every saved vehicle will be checked for its distance to the closest player. If you set allVehicles = true, all vehicles will be checked. Otherwise, only saved vehicles will be checked. All vehicles further away from any player than the distanceThreshold will be removed.

distanceThreshold = 100 and allVehicles = false
distanceThreshold = 100 and allVehicles = true
distanceThreshold = nil and allVehicles = true or false

Only saved vehicle will be deleted due to distance from player.

  • Server restarts and cleanup is activated at server start.
  • Vehicle A is 200 meters away from a player and is not saved.
  • Vehicle B is 300 meters away from a player and is saved.
  • Vehicle C is 90 meters away from a player and is not saved.
  • Vehicle D is 80 meters away from a player and is saved.

Result: Vehicle A will stay. Vehicle B will be removed. Vehicle C will stay. Vehicle D will stay.

All vehicle will be deleted due to distance from player.

  • Server restarts and cleanup is activated at server start.
  • Vehicle A is 200 meters away from a player and is not saved.
  • Vehicle B is 300 meters away from a player and is saved.
  • Vehicle C is 90 meters away from a player and is not saved.
  • Vehicle D is 80 meters away from a player and is saved.

Result: Vehicle A will be removed. Vehicle B will be removed. Vehicle C will stay. Vehicle D will stay.

No vehicle will be deleted due to distance from player.

  • Server restarts and cleanup is activated at server start.
  • Vehicle A is 200 meters away from a player and is not saved.
  • Vehicle B is 300 meters away from a player and is saved.
  • Vehicle C is 90 meters away from a player and is not saved.
  • Vehicle D is 80 meters away from a player and is saved.

Result: Vehicle A will stay. Vehicle B will stay. Vehicle C will stay. Vehicle D will stay.


submergedVehicles#

The submergedVehicles setting determines whether vehicles submerged underwater will be removed when AP is trying to respawn them. It will not remove the vehicle on a cleanup.

  • If submergedVehicles = false, no submerged vehicles will be removed.
  • If submergedVehicles = true and allVehicles = false, only saved vehicles will be removed if they are submerged.
  • If submergedVehicles = true and allVehicles = true, all submerged vehicles will be removed.

zones#

All vehicle in this zones will always be removed on a cleanup, without any other conditions.

  • { position = vector3(0, 0, 0), radius = 10.0 } -> This will remove vehicle around the map zenter in a 10 meter radius.

ignoredZones#

All vehicle in this sone will always be ignored by the cleanup, they will not be checked for any other condition.

  • { position = vector3(0, 0, 0), radius = 10.0 } -> This will remove vehicle around the map zenter in a 10 meter radius.

ignoredPlates#

Plates listed will be ignored and not removed. They can include partial strings and are not case sensitive.

  • "XYZ 404 ", "404",

If you have this plates ignored, it will ignore a vehicle with the plate: "XYZ 404 " or with a plate like "abc 404 ". The first plate is the exact same string as the first entry in the ignore list. The second plate contains a partial string that is an entry in your ignore list.

Plates that would not be ignored as an example: "XYZ 403 " or "abc 40 4". No plate is matching with the first entry and no plate contains partials from the second entry.


ignoredModels#

Vehicle with ignored models will be ignored and not removed. They need to be written in `blista` and not like "blista"! This symboles are the grave accent or also called backtick.


allVehicles#

If this is set to true, all vehicle ( saved and not saved by AP ) will be removed on a cleanup, accordingly to the cleanup settings. If this is set to false, only by AP saved vehicle will be removed on a cleanup, accordingly to the cleanup settings.


storeVehicles#

Send (owned) vehicles to e.g. garage or impound on cleanup. Some garages will need some chnages in sv_integrations.lua for implementation. Take a look into our FAQ.


onScriptStart#

If this is set to true an automated cleanup will be done at any start of AdvancedParking. If this is set to false it will not start an automated cleanup on a start of AdvancedParking.


onServerStart#

Experimental feature!

When set to true will run the cleanup process on server startup when the resource is starting.


onScriptRestart#

Experimental feature!

When set to true will run the cleanup process on a script restart.


times#

You can set times were a cleanup should be done automatic. This uses system time of the server. You can set it daily or weekly.

  • { hour = 3, minute = 0 } -> Every day at 3 am.
  • { day = 3, hour = 16, minute = 0 } -> Every wednesday at 4 pm.

notificationTimes#

When players should be notified before a cleanup (in minutes) is done.


timeLeftNotification#

Notification text to show players before a cleanup (use %s as placeholder for time left in minutes). If you want to use a custom notification, take look at cl_integrations.lua.


deleteNotification#

Notification text to show players when the cleanup is done. If you want to use a custom notification, take look at cl_integrations.lua.


SaveExtraValues#

Defines additional values that will be saved.

roofState#

If the state of the roof of a convertible should be saved. If set to false it will always be closed.

landingGearUp#

If the landing gear state should be saved. If set to false it will always be deployed.

vtolMode#

If the vtol mode should be saved (e.g. on the hydra).

stubWings#

If the deployable stub wings state should be saved (e.g. on the akula).

boatAnchor#

If the anchor state of boats should be saved.


routingBucket#

This setting changes the default routing bucket where the script is operating in. Change this only if your "main" bucket for player sessions is different from default.


multiBucketSupport#

Enable this setting to enable the script to work in all buckets. While this option works perfectly fine, most servers should not use this unless all your used buckets have hardcoded ids. If a vehicle is saved in bucket 17 it will also respawn in bucket 17 on a server restart.


poolSizeWarningThreshold#

This value relates to the CNetObjVehicle pool size. A warning will be shown if vehicles spawn for a client and this client has more than max CNetObjVehicle pool size minus this value.

The CNetObjVehicle pool size is hardcoded to a maximum of 255 networked vehicles. This value cannot be exceeded for a client. Attempting to spawn more vehicles in this client's area causes the vehicles to not be synced to this client or other behavior with desynced vehicles.


Map bounds#

Experimental feature!

This setting defines the area for AdvancedParking's internal optimisation layer. Imagine a giant rectangle across the whole map.

This only needs to be adjusted if you are using any additional maps that are outside the main island or Cayo Perico.

Warnings will appear when vehicles are detected outside of this area.

  • mapBottomLeft denotes the X and Y coordinates of the southwest corner of the map
  • mapTopRight denotes the X and Y coordinates of the northeast corner of the map