RedM Natives

_DETERMINE_VEHICLE_COMPARTMENT_STATE

Determines the interaction/storage state of a vehicle rear compartment or storage area.

Hash0x877EA24EB1614495
Runtime nameDetermineVehicleCompartmentState
NamespaceVEHICLE
SideClient
NameCommunity guess
Docs
Since build1207

Signature

BOOL _DETERMINE_VEHICLE_COMPARTMENT_STATE(Any* outState, Vehicle vehicle, Ped ped);

Parameters

NameTypeDescription
outStateAny*—
vehicleVehicle—
pedPed—

Returns BOOL

Description

alloc8or RDR3 NativeDB

Determines the interaction/storage state of a vehicle rear compartment or storage area.
Returns whether the query succeeded and writes a state value to outState.

Observed states:
- 1 = compartment available / unopened
- 57 = vehicle has no valid compartment/storage
- 72 = compartment opened, resolved or depleted

Used by wagons with rear storage and prison wagons with breakable locks.

VORPCORE RDR3natives

Determines the interaction/storage state of a vehicle rear compartment or storage area.
Returns whether the query was successful and writes a state value to outState
Observed states:
* 1 = Compartment available / unopened
* 57 = Vehicle has no valid compartment/storage
* 72 = Compartment opened, resolved or depleted

Usage

Lua
local retval, outState = DetermineVehicleCompartmentState(vehicle, ped)

-- always works, by hash
local retval, outState = Citizen.InvokeNative(0x877EA24EB1614495, Citizen.PointerValueInt(), vehicle, ped, Citizen.ReturnResultAnyway())
JavaScript and C#
JavaScript
const [retval, outState] = DetermineVehicleCompartmentState(vehicle, ped);

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