# CFX::SET_VEHICLE_DIRT_LEVEL

- **Hash:** `0x2B39128B`
- **Namespace:** CFX
- **Runtime name (Lua/JS):** `SetVehicleDirtLevel`
- **Side:** server (Cfx runtime native)
- **Name status:** official
- **Documentation:** described
- **URL:** https://natives.borderlinerp.com/natives/CFX/SET_VEHICLE_DIRT_LEVEL

## Signature

```c
void SET_VEHICLE_DIRT_LEVEL(Vehicle vehicle, float dirtLevel);
```

## Parameters

- `vehicle` (`Vehicle`) — The vehicle to set.
- `dirtLevel` (`float`) — A number between 0.0 and 15.0 representing the vehicles dirt level.

## Returns

`void`

## Description

*Source: Cfx.re native reference*

Sets the dirt level of the passed vehicle.

**This is the server-side RPC native equivalent of the client native [SET_VEHICLE_DIRT_LEVEL](?\_0x79D3B596FE44EE8B).**

## Usage

### Lua

```lua
SetVehicleDirtLevel(vehicle, dirtLevel)

-- always available, by hash
Citizen.InvokeNative(0x2b39128b, vehicle, dirtLevel)
```

### JavaScript

```js
SetVehicleDirtLevel(vehicle, dirtLevel);

// by hash
Citizen.invokeNative('0x2b39128b', vehicle, dirtLevel + 0.0000001);
```

### C#

```csharp
Function.Call((Hash)0x2b39128b, vehicle, dirtLevel);
```

- Float parameters: Lua integers (`10`, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write `10.0` or `value + 0.0`. The generated JS wrappers add `0.0000001` to non-zero floats for the same reason.

## See also

- [CFX::GET_VEHICLE_DIRT_LEVEL](https://natives.borderlinerp.com/natives/CFX/GET_VEHICLE_DIRT_LEVEL.md)

*Sources: Cfx.re native reference.*
