{"hash":"0x4642182A298187D0","ns":"PED","name":"_REFRESH_CARRY_STATE_FOR_PED","slug":"_REFRESH_CARRY_STATE_FOR_PED","official":false,"named":true,"luaName":"RefreshCarryStateForPed","game":"rdr3","apiset":"client","returnType":"int","params":[{"name":"ped","type":"Ped"},{"name":"carryType","type":"int"},{"name":"outEnts","type":"Any*"},{"name":"outEntsCount","type":"int"},{"name":"filterFlags","type":"int"}],"summary":"Queries/refreshes the current 'carry' action for a ped and (optionally) returns involved entities.","descriptions":[{"source":"alloc8or","format":"text","body":"Queries/refreshes the current 'carry' action for a ped and (optionally) returns involved entities.\nUsage/Example: https://pastebin.com/qVstcVfz"},{"source":"vorp","format":"text","body":"Return the status of the wanted carrying action of a ped. unk3 is usually 4.You can also get the entity being carried and the entity it was taken from with a buffer.\n\nStatus:\n`INVALID = 0,\nSTARTING = 1,\nPROGRESSING = 2,\nFINISHING = 3`\nCARRYING TYPES:\n`UNK_0 = -1,\nUNK_1 = 0,\nUNK_2 = 1,\nUNK_3 = 2,\nUNK_4 = 3,\nCARRYING_FROM_GROUND = 4,\nCARRYING_FROM_MOUNT = 5,\nPUTTING_DOWN_GROUND = 6,\nPUTTING_DOWN_MOUNT = 7,\nUNK_9 = 8,\nUNK_10 = 9,\nUNK_11 = 10`\nFilters:\n`ENTITY_ONLY = 0,\nNOTHING = 1,\nENTITY_AND_TAKEN_FROM_ENTITY = 2`"}],"examples":[{"lang":"lua","code":"local retval, entity = Citizen.InvokeNative(0x4642182A298187D0, PlayerPedId(), 1, Citizen.PointerValueInt(), 4, 0, Citizen.ResultAsInteger())\nlocal struct = DataView.ArrayBuffer(2*8)\nlocal retval = Citizen.InvokeNative(0x4642182A298187D0, PlayerPedId(), 5, struct:Buffer(), 4, 2, Citizen.ResultAsInteger())\nif retval ~= 0 then\nlocal entity = struct:GetInt32(0*8)\nlocal fromEntity = struct:GetInt32(1*8)\nend","source":"vorp"}],"aliases":["_REQUEST_PED_CARRYING_STATE"],"enums":[],"related":[],"build":"1207","sources":["alloc8or","vorp"],"doc":3,"url":"https://natives.borderlinerp.com/natives/PED/_REFRESH_CARRY_STATE_FOR_PED","markdownUrl":"https://natives.borderlinerp.com/natives/PED/_REFRESH_CARRY_STATE_FOR_PED.md","snippets":{"lua":"local retval, outEnts = RefreshCarryStateForPed(ped, carryType, outEntsCount, filterFlags)","luaInvoke":"local retval, outEnts = Citizen.InvokeNative(0x4642182A298187D0, ped, carryType, Citizen.PointerValueInt(), outEntsCount, filterFlags, Citizen.ResultAsInteger())","js":"const [retval, outEnts] = RefreshCarryStateForPed(ped, carryType, outEntsCount, filterFlags);","jsInvoke":"const [retval, outEnts] = Citizen.invokeNative('0x4642182A298187D0', ped, carryType, Citizen.pointerValueInt(), outEntsCount, filterFlags, Citizen.returnResultAnyway(), Citizen.resultAsInteger());","csharp":"var outEnts = new OutputArgument();\nint retval = Function.Call<int>((Hash)0x4642182A298187D0, ped, carryType, outEnts, outEntsCount, filterFlags);\n// outEnts.GetResult<int>()","notes":["Pointer (out) arguments are not passed in Lua/JS: their values are returned after the result, in order.","`Any*` arguments are often structs. Build them with a DataView buffer and pass it with `:Buffer()` — see the examples and notes below.","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."]}}