_GET_PED_DIRT_LEVEL
Returns the ped's dirt amount as a scalar in [0.0, 1.0].
0x0105FEE8F9091255GetPedDirtLevelSignature
float _GET_PED_DIRT_LEVEL(Ped ped, BOOL useCompositeLayer);Parameters
| Name | Type | Description |
|---|---|---|
ped | Ped | — |
useCompositeLayer | BOOL | — |
Returns float
Description
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);
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
local retval = GetPedDirtLevel(ped, useCompositeLayer)
-- always works, by hash
local retval = Citizen.InvokeNative(0x0105FEE8F9091255, ped, useCompositeLayer, Citizen.ResultAsFloat())JavaScript and C#
const retval = GetPedDirtLevel(ped, useCompositeLayer);
// by hash
const retval = Citizen.invokeNative('0x0105FEE8F9091255', ped, useCompositeLayer, Citizen.returnResultAnyway(), Citizen.resultAsFloat());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
InvokeNativewith the hash — it always works.
Sources
alloc8or RDR3 NativeDB · VORPCORE RDR3natives
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.