RedM Natives

DOOR_SYSTEM_SET_OPEN_RATIO

Sets the ajar angle of a door.

Hash0xB6E6FBA95C7324AC
Runtime nameDoorSystemSetOpenRatio
NamespaceOBJECT
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0xB6E6FBA95C7324AC

Signature

void DOOR_SYSTEM_SET_OPEN_RATIO(Hash doorHash, float ajar, BOOL forceUpdate);

Parameters

NameTypeDescription
doorHashHash—
ajarfloat—
forceUpdateBOOL—

Returns void

Description

Sets the ajar angle of a door.
Ranges from -1.0 to 1.0, and 0.0 is closed / default.

Usage

Lua
DoorSystemSetOpenRatio(doorHash, ajar, forceUpdate)

-- always works, by hash
Citizen.InvokeNative(0xB6E6FBA95C7324AC, doorHash, ajar, forceUpdate)
JavaScript and C#
JavaScript
DoorSystemSetOpenRatio(doorHash, ajar, forceUpdate);

// by hash
Citizen.invokeNative('0xB6E6FBA95C7324AC', doorHash, ajar + 0.0000001, forceUpdate);
C#
Function.Call((Hash)0xB6E6FBA95C7324AC, doorHash, ajar, forceUpdate);
  • 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`.
  • Float parameters: Lua integers (10, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write 10.0 or value + 0.0. The generated JS wrappers add 0.0000001 to non-zero floats for the same reason.

Sources

alloc8or RDR3 NativeDB

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