| Property | Value |
|---|---|
| Native Name | DOOR_SYSTEM_SET_DOOR_STATE |
| Hash | 0x6BAB9442830C7F53 |
| Return Type | void |
| Build | 1207 |
| Parameters | doorHash (Hash), state (int), requestDoor (BOOL), forceUpdate (BOOL) |
Description: Lockstates not applied and CNetObjDoor's not created until DOOR_SYSTEM_GET_IS_PHYSICS_LOADED returns true.
Door lock states: (v323)
- 0: UNLOCKED
- 1: LOCKED
- 2: DOORSTATE_FORCE_LOCKED_UNTIL_OUT_OF_AREA
- 3: DOORSTATE_FORCE_UNLOCKED_THIS_FRAME
- 4: DOORSTATE_FORCE_LOCKED_THIS_FRAME
- 5: DOORSTATE_FORCE_OPEN_THIS_FRAME
- 6: DOORSTATE_FORCE_CLOSED_THIS_FRAME
Parameters
doorHash(Hash)state(int)requestDoor(BOOL) — On true, and when door system is configured to, i.e., "persists w/o netobj", generate a CRequestDoorEvent.forceUpdate(BOOL) — On true, forces an update on the door system (same path as netObjDoor_applyDoorStuff)
Usage
Lua (Direct):
DoorSystemSetDoorState(doorHash, state, requestDoor, forceUpdate)
Lua (Hash):
Citizen.InvokeNative(0x6BAB9442830C7F53, doorHash, state, requestDoor, forceUpdate)