_INVENTORY_GET_INVENTORY_ITEM_EQUIPPED_IN_SLOT
Hash
0xBE012571B25F5ACARuntime name
InventoryGetInventoryItemEquippedInSlotNamespaceINVENTORY
SideClient
NameCommunity guess
Docs
Since build1207
Signature
int _INVENTORY_GET_INVENTORY_ITEM_EQUIPPED_IN_SLOT(int inventoryId, Any* guid, Hash slotId, int p3, Any* p4);Parameters
| Name | Type | Description |
|---|---|---|
inventoryId | int | — |
guid | Any* | — |
slotId | Hash | — |
p3 | int | — |
p4 | Any* | — |
Returns int
Usage
local retval, guid, p4 = InventoryGetInventoryItemEquippedInSlot(inventoryId, slotId, p3)
-- always works, by hash
local retval, guid, p4 = Citizen.InvokeNative(0xBE012571B25F5ACA, inventoryId, Citizen.PointerValueInt(), slotId, p3, Citizen.PointerValueInt(), Citizen.ResultAsInteger())JavaScript and C#
const [retval, guid, p4] = InventoryGetInventoryItemEquippedInSlot(inventoryId, slotId, p3);
// by hash
const [retval, guid, p4] = Citizen.invokeNative('0xBE012571B25F5ACA', inventoryId, Citizen.pointerValueInt(), slotId, p3, Citizen.pointerValueInt(), Citizen.returnResultAnyway(), Citizen.resultAsInteger());var guid = new OutputArgument();
var p4 = new OutputArgument();
int retval = Function.Call<int>((Hash)0xBE012571B25F5ACA, inventoryId, guid, slotId, p3, p4);
// guid.GetResult<int>()
// p4.GetResult<int>()- Hash parameters: the named function also accepts a string and hashes it for you;
Citizen.InvokeNativeneeds the number — passjoaat("name")or a backtick literal like`name`. - 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.
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.