> ## Documentation Index
> Fetch the complete documentation index at: https://docs.thunder-studio.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Data Structure

> The structure of the vehicle data used by the persistence system.

This is how the script sees the data of a vehicle. This data is what is returned by `GetVehiclePersistenceData`.

```lua theme={null}
{
    netId = 123, -- Network ID of the vehicle
    plate = "ABC 123", -- Plate text
    coords = vector3(0.0, 0.0, 0.0), -- Current coordinates
    hash = 123456789, -- Model hash
    model = "adder", -- Model name
    isTemp = false, -- Whether the vehicle is temporary and should be deleted after a restart
    deleteAt = 1678886400, -- Unix timestamp for when the vehicle should be deleted (optional)
    props = { ... }, -- Vehicle properties (mods, colors, etc.) from ox_lib
    trailer = { -- Trailer data if attached
        netId = 456,
        hash = 987654321,
        model = "trailer",
        coords = vector3(0.0, -10.0, 0.0),
    } or false,
    doorStatus = { ... }, -- Door lock status
    damageData = { -- Damage information
        bodyDamage = 1000.0,
        engineDamage = 1000.0,
        fuel = 100.0,
        deformation = { ... }
    }
}
```

## Detailed Breakdown

### Props

The `props` table contains all the vehicle modifications and customization options. It is retrieved using `lib.getVehicleProperties`.

### Damage Data

The `damageData` table stores specific health values:

* `bodyDamage`: The health of the vehicle body (0-1000).
* `engineDamage`: The health of the engine (0-1000).
* `fuel`: Current fuel level (0-100).
* `deformation`: Visual deformation data.

<Note>
  The `deformation` field is only available if the [VehicleDeformation](/scripts/persistance/plugins/vehicle-deformation) plugin is enabled.
</Note>

## Temporary Vehicles

Vehicles can be marked as temporary, meaning they will not persist permanently.

* `isTemp`: If `true`, the vehicle is temporary and will be deleted from the database under certain conditions (like server restarts or time limits).
* `deleteAt`: An optional Unix timestamp (in seconds) representing when the vehicle is scheduled for automatic permanent deletion.

## Plugins

### Vehicle Deformation

We support the [VehicleDeformation](/scripts/persistance/plugins/vehicle-deformation) resource to sync vehicle deformation. Check the plugin page for more info.
