Skip to main content
You can verify if the script is running by checking for the resource state:

Exports

DeleteVehicleEntity

Deletes the vehicle entity from the game world, but keeps its data in the database.

GetAllVehicles

Get a list of all vehicles currently loaded by the persistence system.
Returns:
  • table: A dictionary of all active vehicles.

DoesVehicleExistInDb

Check if a vehicle exists in the database.
Returns:
  • boolean: true if it exists, false otherwise.

Reload

Reload all vehicles from the database and refresh the system.

UpdateVehiclePos

Update the position of a persistent vehicle in memory.

UnloadAllVehicles

Deletes all persistent vehicle entities from the game world (does not remove their data from the database).

SetVehicleDeleteAt

Set a Unix timestamp for when the vehicle should be automatically deleted from the database.

DeleteVehicleFromDB

Delete a vehicle from the persistence database using its ID.

DeleteVehicleFromDBByPlate

Delete a vehicle from the persistence database using its plate.

ForgetVehicle

Forget the persistence entry for a vehicle, completely removing it from the persistent system and the database.
Returns:
  • boolean: true if successful, false otherwise.
Last modified on March 11, 2026