_DOOR_SYSTEM_SWING_OPEN
Applies an impulse to a door, causing it to swing open with animation.
0xB3B1546D23DF8DE1DoorSystemSwingOpenSignature
void _DOOR_SYSTEM_SWING_OPEN(Hash doorHash, float dirX, float dirY, float dirZ, BOOL reverseDirection);Parameters
| Name | Type | Description |
|---|---|---|
doorHash | Hash | — |
dirX | float | — |
dirY | float | — |
dirZ | float | — |
reverseDirection | BOOL | — |
Returns void
Description
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.
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
DoorSystemSwingOpen(doorHash, dirX, dirY, dirZ, reverseDirection)
-- always works, by hash
Citizen.InvokeNative(0xB3B1546D23DF8DE1, doorHash, dirX, dirY, dirZ, reverseDirection)JavaScript and C#
DoorSystemSwingOpen(doorHash, dirX, dirY, dirZ, reverseDirection);
// by hash
Citizen.invokeNative('0xB3B1546D23DF8DE1', doorHash, dirX + 0.0000001, dirY + 0.0000001, dirZ + 0.0000001, reverseDirection);Function.Call((Hash)0xB3B1546D23DF8DE1, doorHash, dirX, dirY, dirZ, reverseDirection);- Hash parameters: the named function also accepts a string and hashes it for you;
Citizen.InvokeNativeneeds the number — passjoaat("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. Write10.0orvalue + 0.0. The generated JS wrappers add0.0000001to 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
InvokeNativewith the hash — it always works.
Sources
alloc8or RDR3 NativeDB · VORPCORE RDR3natives
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.