# getVehicleDirtLevel (Compartilhado)

> Diz quanta sujeira aparece na pintura de um veículo.

- **Plataforma**: MY Multiplayer (MYMP)
- **Tipo**: Função Lua
- **Lado**: Compartilhado
- **Categoria**: Visual dos veículos
- **URL**: https://wiki.mymp.gg/pt/getVehicleDirtLevel

## Sintaxe

```lua
float|false getVehicleDirtLevel(vehicle vehicle)
```

## Parâmetros

| Nome | Tipo | Descrição |
| --- | --- | --- |
| `vehicle` | `vehicle` | O veículo. |

## Retorno

De 0 (limpo) a 1 (o mais sujo), ou `false` se não é um veículo.

## Exemplo

```lua
local vehicle = getPedOccupiedVehicle(localPlayer)
if vehicle and getVehicleDirtLevel(vehicle) > 0.5 then
    outputDebugString("hora de lavar")
end
```

## Veja também

- [setVehicleDirtLevel (Compartilhado)](https://wiki.mymp.gg/pt/setVehicleDirtLevel.md): Muda quanta sujeira aparece na pintura de um veículo.
