{"hash":"0x0105FEE8F9091255","ns":"PED","name":"_GET_PED_DIRT_LEVEL","slug":"_GET_PED_DIRT_LEVEL","official":false,"named":true,"luaName":"GetPedDirtLevel","game":"rdr3","apiset":"client","returnType":"float","params":[{"name":"ped","type":"Ped"},{"name":"useCompositeLayer","type":"BOOL"}],"summary":"Returns the ped's dirt amount as a scalar in [0.0, 1.0].","descriptions":[{"source":"alloc8or","format":"text","body":"Returns the ped's dirt amount as a scalar in [0.0, 1.0].\nNotes:\n- 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.\n- Use 1 for the \"active/composite\" layer to match in-game usage.\n- SP scripts often read, adjust, clamp, then feed back into _SET_PED_DIRT_CLEANED.\nExample (C++):\n\tfloat lvl = PED::_GET_PED_DIRT_LEVEL(ped, true);\n\tlvl = std::clamp(lvl + 0.1f, 0.0f, 1.0f);\n\tPED::_SET_PED_DIRT_CLEANED(ped, lvl, -1, true, true);"},{"source":"vorp","format":"text","body":"Return the dirt level of the ped (0.0 - 1.0). p1 is always set to 1.\nThe 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."}],"examples":[],"aliases":[],"enums":[],"related":[],"build":"1207","sources":["alloc8or","vorp"],"doc":2,"url":"https://natives.borderlinerp.com/natives/PED/_GET_PED_DIRT_LEVEL","markdownUrl":"https://natives.borderlinerp.com/natives/PED/_GET_PED_DIRT_LEVEL.md","snippets":{"lua":"local retval = GetPedDirtLevel(ped, useCompositeLayer)","luaInvoke":"local retval = Citizen.InvokeNative(0x0105FEE8F9091255, ped, useCompositeLayer, Citizen.ResultAsFloat())","js":"const retval = GetPedDirtLevel(ped, useCompositeLayer);","jsInvoke":"const retval = Citizen.invokeNative('0x0105FEE8F9091255', ped, useCompositeLayer, Citizen.returnResultAnyway(), Citizen.resultAsFloat());","csharp":"float retval = Function.Call<float>((Hash)0x0105FEE8F9091255, ped, useCompositeLayer);","notes":["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."]}}