ObjectClient

doorSystemSetOpenRatio

DOOR_SYSTEM_SET_OPEN_RATIO0xB6E6FBA95C7324AC

The GTA V native DOOR_SYSTEM_SET_OPEN_RATIO of the OBJECT namespace, as LS:MP client scripts call it: the global function doorSystemSetOpenRatio, in JavaScript and in Lua.

SignatureJavaScript
doorSystemSetOpenRatio(
  doorHash: Hash,
  ajar: number,
  requestDoor: boolean,
  forceUpdate: boolean
): void
SignatureLua
doorSystemSetOpenRatio(
  doorHash: Hash,
  ajar: number,
  requestDoor: boolean,
  forceUpdate: boolean
)

Usage

JavaScript
doorSystemSetOpenRatio(doorHash, ajar, requestDoor, forceUpdate);
Lua
doorSystemSetOpenRatio(doorHash, ajar, requestDoor, forceUpdate)

Parameters

ParameterTypeJavaScriptLua
doorHashHashnumberinteger
ajarfloatnumbernumber
requestDoorBOOLbooleanboolean
forceUpdateBOOLbooleanboolean

Returns

Nothing. In JavaScript the call evaluates to undefined.

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

Sets the ajar angle of a door.
Ranges from -1.0 to 1.0, and 0.0 is closed / default.
forceUpdate on true invokes doorSystemSetDoorState otherwise requestDoor is unused.

Reference

Namespace
Object OBJECT
In the game
void DOOR_SYSTEM_SET_OPEN_RATIO(Hash doorHash, float ajar, BOOL requestDoor, BOOL forceUpdate)
Hash
0xB6E6FBA95C7324AC
Formerly
_SET_DOOR_AJAR_ANGLE

Open in the interactive natives reference