RedM Natives

_GET_RANSACK_SCENARIO_CONTAINER_NUM_COMPARTMENTS

Returns the total number of compartments (drawers, lids, etc.) the specified scenario container entity has.

Hash0x640A602946A8C972
Runtime nameGetRansackScenarioContainerNumCompartments
NamespaceTASK
SideClient
NameCommunity guess
Docs
Since build1207
Also known as_GET_SCENARIO_CONTAINER_NUM_COMPARTMENTS

Signature

int _GET_RANSACK_SCENARIO_CONTAINER_NUM_COMPARTMENTS(Entity entity);

Parameters

NameTypeDescription
entityEntity—

Returns int

Description

alloc8or RDR3 NativeDB

Returns the total number of compartments (drawers, lids, etc.) the specified scenario container entity has.
For example, a chest has 1 compartment, while a cabinet with 3 drawers returns 3.

VORPCORE RDR3natives

returns the total number of compartments (drawers, lids, etc.) the specified scenario container entity has for example, a chest has 1 compartment, while a cabinet with 3 drawers returns 3.

Usage

Lua
local retval = GetRansackScenarioContainerNumCompartments(entity)

-- always works, by hash
local retval = Citizen.InvokeNative(0x640A602946A8C972, entity, Citizen.ResultAsInteger())
JavaScript and C#
JavaScript
const retval = GetRansackScenarioContainerNumCompartments(entity);

// by hash
const retval = Citizen.invokeNative('0x640A602946A8C972', entity, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
C#
int retval = Function.Call<int>((Hash)0x640A602946A8C972, entity);
  • 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.

Sources

alloc8or RDR3 NativeDB · VORPCORE RDR3natives

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