RedM Natives

GET_CARRIED_ATTACHED_INFO_FOR_SLOT

Outputs carriable info for a ped's carriable slot (see TASK_CARRIABLE slot indices).

Hash0x608BC6A6AACD5036
Runtime nameGetCarriedAttachedInfoForSlot
NamespacePED
SideClient
NameOfficial
Docs
Since build1207
Also known as_GET_CARRIED_ATTACHED_INFO_FOR_SLOT

Signature

BOOL GET_CARRIED_ATTACHED_INFO_FOR_SLOT(Any* outData, Ped ped, int carriableSlot, int p3);

Parameters

NameTypeDescription
outDataAny*—
pedPed—
carriableSlotint—
p3int—

Returns BOOL

Description

alloc8or RDR3 NativeDB

Outputs carriable info for a ped's carriable slot (see TASK_CARRIABLE slot indices). p3 is always 0 in R* scripts. Returns true if outData was filled.

outData: script struct<4> (32 bytes); each field is 8-byte (alignas(8)):
	struct CarriedAttachedInfo
	{
		alignas(8) Hash   model;         // carried entity model
		alignas(8) Hash   carryConfig;   // carry config (e.g. DEAD_CARRIABLE_FOX)
		alignas(8) int    carriableSlot; // slot index queried
		alignas(8) Entity entity;        // carried entity handle (0 if none)
	};

Example image: https://imgur.com/a/2wjt6PT

VORPCORE RDR3natives

Outputs carriable infos for selected ped carriable slot.

Parameters:
- outData: Any* — A structure of 4 explained below
- ped: Ped to check
- carriableSlot: int See TASK_CARRIABLE for available slots
- p3: int always 0 in R* scripts

Usage

Lua
local retval, outData = GetCarriedAttachedInfoForSlot(ped, carriableSlot, p3)

-- always works, by hash
local retval, outData = Citizen.InvokeNative(0x608BC6A6AACD5036, Citizen.PointerValueInt(), ped, carriableSlot, p3, Citizen.ReturnResultAnyway())
JavaScript and C#
JavaScript
const [retval, outData] = GetCarriedAttachedInfoForSlot(ped, carriableSlot, p3);

// by hash
const [retval, outData] = Citizen.invokeNative('0x608BC6A6AACD5036', Citizen.pointerValueInt(), ped, carriableSlot, p3, Citizen.returnResultAnyway());
C#
var outData = new OutputArgument();
bool retval = Function.Call<bool>((Hash)0x608BC6A6AACD5036, outData, ped, carriableSlot, p3);
// outData.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.

Examples

LUA · VORPCORE RDR3natives
struct outData
{
  Hash model;
  Hash carryConfig;
  Hash carriableSlot;
  Entity entityCarried;
}

Sources

alloc8or RDR3 NativeDB · VORPCORE RDR3natives

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.