The Lab
INVENTORY native

_INVENTORY_GET_INVENTORY_ITEM_COMPATIBLE_SLOTS

returns BOOL3 paramsbuild 1207

Writes up to maxResults slot ids that item can occupy into outSlotIds. Returns true on success.

Signature

C
BOOL _INVENTORY_GET_INVENTORY_ITEM_COMPATIBLE_SLOTS(Hash item, int* outSlotIds, int maxResults); // 0x9AC53CB6907B4428 b1207

Parameters

#NameType
1itemHash
2outSlotIdsint* (out pointer)
3maxResultsint

Facts

Facts about _INVENTORY_GET_INVENTORY_ITEM_COMPATIBLE_SLOTS
Name
_INVENTORY_GET_INVENTORY_ITEM_COMPATIBLE_SLOTS
Hash
0x9AC53CB6907B4428
Namespace
Returns
BOOL
Game build
1207

Examples

Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.

Lua
local result, outSlotIds = Citizen.InvokeNative(0x9AC53CB6907B4428, -- _INVENTORY_GET_INVENTORY_ITEM_COMPATIBLE_SLOTS
  GetHashKey("name"), -- Hash item
  Citizen.PointerValueInt(), -- int* outSlotIds
  0, -- int maxResults
  Citizen.ReturnResultAnyway()
)
if result then
  -- ...
end
JavaScript
const [result, outSlotIds] = Citizen.invokeNative("0x9AC53CB6907B4428", // _INVENTORY_GET_INVENTORY_ITEM_COMPATIBLE_SLOTS
  GetHashKey("name"), // Hash item
  Citizen.pointerValueInt(), // int* outSlotIds
  0, // int maxResults
  Citizen.returnResultAnyway()
);
if (result) {
  // ...
}
C#
var outSlotIdsArg = new OutputArgument();
bool result = Function.Call<bool>((Hash)0x9AC53CB6907B4428, // _INVENTORY_GET_INVENTORY_ITEM_COMPATIBLE_SLOTS
  (uint)API.GetHashKey("name"), // Hash item
  outSlotIdsArg, // int* outSlotIds
  0 // int maxResults
);
int outSlotIds = outSlotIdsArg.GetResult<int>();
All INVENTORY natives

Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.