_REFRESH_CARRY_STATE_FOR_PED
Queries/refreshes the current 'carry' action for a ped and (optionally) returns involved entities.
0x4642182A298187D0RefreshCarryStateForPed_REQUEST_PED_CARRYING_STATESignature
int _REFRESH_CARRY_STATE_FOR_PED(Ped ped, int carryType, Any* outEnts, int outEntsCount, int filterFlags);Parameters
| Name | Type | Description |
|---|---|---|
ped | Ped | — |
carryType | int | — |
outEnts | Any* | — |
outEntsCount | int | — |
filterFlags | int | — |
Returns int
Description
Queries/refreshes the current 'carry' action for a ped and (optionally) returns involved entities.
Usage/Example: https://pastebin.com/qVstcVfz
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.
Status:
`INVALID = 0,
STARTING = 1,
PROGRESSING = 2,
FINISHING = 3`
CARRYING TYPES:
`UNK_0 = -1,
UNK_1 = 0,
UNK_2 = 1,
UNK_3 = 2,
UNK_4 = 3,
CARRYING_FROM_GROUND = 4,
CARRYING_FROM_MOUNT = 5,
PUTTING_DOWN_GROUND = 6,
PUTTING_DOWN_MOUNT = 7,
UNK_9 = 8,
UNK_10 = 9,
UNK_11 = 10`
Filters:
`ENTITY_ONLY = 0,
NOTHING = 1,
ENTITY_AND_TAKEN_FROM_ENTITY = 2`
Usage
local retval, outEnts = RefreshCarryStateForPed(ped, carryType, outEntsCount, filterFlags)
-- always works, by hash
local retval, outEnts = Citizen.InvokeNative(0x4642182A298187D0, ped, carryType, Citizen.PointerValueInt(), outEntsCount, filterFlags, Citizen.ResultAsInteger())JavaScript and C#
const [retval, outEnts] = RefreshCarryStateForPed(ped, carryType, outEntsCount, filterFlags);
// by hash
const [retval, outEnts] = Citizen.invokeNative('0x4642182A298187D0', ped, carryType, Citizen.pointerValueInt(), outEntsCount, filterFlags, Citizen.returnResultAnyway(), Citizen.resultAsInteger());var outEnts = new OutputArgument();
int retval = Function.Call<int>((Hash)0x4642182A298187D0, ped, carryType, outEnts, outEntsCount, filterFlags);
// outEnts.GetResult<int>()- 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
InvokeNativewith the hash — it always works.
Examples
local retval, entity = Citizen.InvokeNative(0x4642182A298187D0, PlayerPedId(), 1, Citizen.PointerValueInt(), 4, 0, Citizen.ResultAsInteger())
local struct = DataView.ArrayBuffer(2*8)
local retval = Citizen.InvokeNative(0x4642182A298187D0, PlayerPedId(), 5, struct:Buffer(), 4, 2, Citizen.ResultAsInteger())
if retval ~= 0 then
local entity = struct:GetInt32(0*8)
local fromEntity = struct:GetInt32(1*8)
endSources
alloc8or RDR3 NativeDB · VORPCORE RDR3natives
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.