RedM Natives

_DOOR_SYSTEM_SWING_OPEN

Applies an impulse to a door, causing it to swing open with animation.

Hash0xB3B1546D23DF8DE1
Runtime nameDoorSystemSwingOpen
NamespaceOBJECT
SideClient
NameCommunity guess
Docs
Since build1207

Signature

void _DOOR_SYSTEM_SWING_OPEN(Hash doorHash, float dirX, float dirY, float dirZ, BOOL reverseDirection);

Parameters

NameTypeDescription
doorHashHash—
dirXfloat—
dirYfloat—
dirZfloat—
reverseDirectionBOOL—

Returns void

Description

alloc8or RDR3 NativeDB

Applies an impulse to a door, causing it to swing open with animation.

Notes:
- Requires DOOR_SYSTEM_SET_DOOR_STATE(doorHash, 0) beforehand.
- If the door is locked, the impulse is ignored.
- dirX/dirY/dirZ are normalized internally and do not appear to control force or speed.
- reverseDirection inverts the opening direction, useful for double doors swinging apart.

VORPCORE RDR3natives

swing door open between 2 points
Requires DOOR_SYSTEM_SET_DOOR_STATE(hash, 0) beforehand
- If door is locked (state=1), the impulse is ignored

Usage

Lua
DoorSystemSwingOpen(doorHash, dirX, dirY, dirZ, reverseDirection)

-- always works, by hash
Citizen.InvokeNative(0xB3B1546D23DF8DE1, doorHash, dirX, dirY, dirZ, reverseDirection)
JavaScript and C#
JavaScript
DoorSystemSwingOpen(doorHash, dirX, dirY, dirZ, reverseDirection);

// by hash
Citizen.invokeNative('0xB3B1546D23DF8DE1', doorHash, dirX + 0.0000001, dirY + 0.0000001, dirZ + 0.0000001, reverseDirection);
C#
Function.Call((Hash)0xB3B1546D23DF8DE1, doorHash, dirX, dirY, dirZ, reverseDirection);
  • 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.
  • 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.