# Server: RepairVehicleWear(plate, parts?, reason?)

> Reference for Server: RepairVehicleWear(plate, parts?, reason?) 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.

### `RepairVehicleWear(plate, parts?, reason?)`

- **Purpose**: Repairs all or selected diagnostic wear without changing physical vehicle damage or tuning.
- **Arguments**:

  - `plate` (`string`) - vehicle plate text. Required.
  - `parts` (`table?`) - optional list or keyed table of wear part IDs. Omit it to repair every part.
  - `reason` (`string?`) - optional integration reason included in history and event payloads.
- **Returns**:

  - `boolean` - `true` when the wear values were saved.
  - `table | string` - repair result on success or an error code on failure.

```lua [server.lua]
local success, result = exports["sky_mechanicjob"]:RepairVehicleWear("ABC123", {
    "engine_oil",
    "brake_pads"
}, "service_invoice")

if not success then
    print(("Wear repair failed: %s"):format(result))
end
```

Supported wear part IDs are `tyres`, `brake_pads`, `suspension`, `spark_plugs`, `engine_oil`, `coolant`, `brake_fluid`, `transmission_fluid`, `clutch`, `air_filter`, `traction_battery`, `inverter`, and `catalytic_converter`.
