RedM Natives

DOOR_SYSTEM_SET_DOOR_STATE

Door lock states: DOORSTATE_UNLOCKED, DOORSTATE_LOCKED_UNBREAKABLE, DOORSTATE_LOCKED_BREAKABLE, DOORSTATE_HOLD_OPEN_POSITIVE, DOORSTATE_HOLD_OPEN_NEGATIVE

Hash0x6BAB9442830C7F53
Runtime nameDoorSystemSetDoorState
NamespaceOBJECT
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0x6BAB9442830C7F53

Signature

void DOOR_SYSTEM_SET_DOOR_STATE(Hash doorHash, int state);

Parameters

NameTypeDescription
doorHashHash—
stateint—

Returns void

Description

Door lock states:
enum eDoorState
{
	DOORSTATE_INVALID = -1,
	DOORSTATE_UNLOCKED,
	DOORSTATE_LOCKED_UNBREAKABLE,
	DOORSTATE_LOCKED_BREAKABLE,
	DOORSTATE_HOLD_OPEN_POSITIVE,
	DOORSTATE_HOLD_OPEN_NEGATIVE
};

Usage

Lua
DoorSystemSetDoorState(doorHash, state)

-- always works, by hash
Citizen.InvokeNative(0x6BAB9442830C7F53, doorHash, state)
JavaScript and C#
JavaScript
DoorSystemSetDoorState(doorHash, state);

// by hash
Citizen.invokeNative('0x6BAB9442830C7F53', doorHash, state);
C#
Function.Call((Hash)0x6BAB9442830C7F53, doorHash, state);
  • Hash parameters: the named function also accepts a string and hashes it for you; Citizen.InvokeNative needs the number — pass joaat("name") or a backtick literal like `name`.

Enums and flags

Sources

alloc8or RDR3 NativeDB

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