# Server: GetVehicleCondition(plate)

> Reference for Server: GetVehicleCondition(plate) in mechanicjob.

[All exports](/docs/jobs/mechanicjob/reference/exports)

This page documents supported public integration calls and usage examples. It does not expose or reproduce the resource's internal implementation.

## Server Exports

All Advanced Pricing and Billing exports return a result table:

```lua
{
    success = true,
    data = {}
}
```

Rejected requests return `success = false` and a stable `error` code. Player identity, mechanic job, grade, permissions, vehicle distance, configured limits, quote state, invoice ownership, and monetary values are always resolved or validated on the server.

### `GetVehicleCondition(plate)`

- **Purpose**: Returns the saved mileage and all diagnostic wear values for a vehicle.
- **Arguments**:

  - `plate` (`string`) - vehicle plate text. Required.
- **Returns**: `table | nil` - a table containing `plate`, `mileage`, and `wear`, or `nil` for invalid input or a database failure.

```lua [server.lua]
local condition = exports["sky_mechanicjob"]:GetVehicleCondition("ABC123")

if condition then
    print(("Mileage: %s, engine oil: %.1f%%"):format(
        condition.mileage,
        condition.wear.engine_oil
    ))
end
```
