# PED::_GET_PED_DIRT_LEVEL

- **Hash:** `0x0105FEE8F9091255`
- **Namespace:** PED
- **Runtime name (Lua/JS):** `GetPedDirtLevel`
- **Side:** client (game native)
- **Name status:** community guess (may change)
- **Documentation:** described
- **Since game build:** 1207
- **URL:** https://natives.borderlinerp.com/natives/PED/_GET_PED_DIRT_LEVEL

## Signature

```c
float _GET_PED_DIRT_LEVEL(Ped ped, BOOL useCompositeLayer);
```

## Parameters

- `ped` (`Ped`)
- `useCompositeLayer` (`BOOL`)

## Returns

`float`

## Description

*Source: alloc8or RDR3 NativeDB*

Returns the ped's dirt amount as a scalar in [0.0, 1.0].
Notes:
- The second parameter is treated as a boolean selector (0 or 1). Internally it indexes a 2-slot graphics/appearance bank (base + 0xB8 * index + 0xE4); Rockstar scripts pass 1.
- Use 1 for the "active/composite" layer to match in-game usage.
- SP scripts often read, adjust, clamp, then feed back into _SET_PED_DIRT_CLEANED.
Example (C++):
	float lvl = PED::_GET_PED_DIRT_LEVEL(ped, true);
	lvl = std::clamp(lvl + 0.1f, 0.0f, 1.0f);
	PED::_SET_PED_DIRT_CLEANED(ped, lvl, -1, true, true);

*Source: VORPCORE RDR3natives*

Return the dirt level of the ped (0.0 - 1.0). p1 is always set to 1.
The second parameter is treated as a boolean selector (0 or 1). Internally it indexes a 2-slot graphics/appearance bank (base + 0xB8 * index + 0xE4); Rockstar scripts pass 1.

## Usage

### Lua

```lua
local retval = GetPedDirtLevel(ped, useCompositeLayer)

-- always available, by hash
local retval = Citizen.InvokeNative(0x0105FEE8F9091255, ped, useCompositeLayer, Citizen.ResultAsFloat())
```

### JavaScript

```js
const retval = GetPedDirtLevel(ped, useCompositeLayer);

// by hash
const retval = Citizen.invokeNative('0x0105FEE8F9091255', ped, useCompositeLayer, Citizen.returnResultAnyway(), Citizen.resultAsFloat());
```

### C#

```csharp
float retval = Function.Call<float>((Hash)0x0105FEE8F9091255, ped, useCompositeLayer);
```

- The name is a community guess and may change. If the named call is missing in your client build, use `InvokeNative` with the hash — it always works.

*Sources: alloc8or RDR3 NativeDB, VORPCORE RDR3natives.*
