# resetVehicleDirtColor (Shared)

> Puts a vehicle's dirt back to the default colour, `59, 57, 52`.

- **Platform**: MY Multiplayer (MYMP)
- **Kind**: Lua Function
- **Side**: Shared
- **Category**: Vehicle looks
- **URL**: https://wiki.mymp.gg/en/resetVehicleDirtColor

## Syntax

```lua
bool resetVehicleDirtColor(element element)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `element` | `element` | A vehicle, or a parent element: every vehicle below it changes too. |

## Returns

`true` if it changed, `false` if it is not a vehicle.

On the server, the change is sent to every client. On the client, it applies to this client only.

## Example

```lua
addCommandHandler("sujeirapadrao", function(player)
    local vehicle = getPedOccupiedVehicle(player)
    if vehicle then
        resetVehicleDirtColor(vehicle)
    end
end)
```

### Note

With a parent element (such as `root`), every vehicle below changes, but the return value is the element's own, which is not a vehicle: `false`.

## See also

- [setVehicleDirtColor (Shared)](https://wiki.mymp.gg/en/setVehicleDirtColor.md): Changes the colour of the dirt on a vehicle's paint, such as mud or sand.
- [getVehicleDirtColor (Shared)](https://wiki.mymp.gg/en/getVehicleDirtColor.md): Tells the colour of the dirt on a vehicle's paint.
