# OBJECT::_ADD_DOOR_TO_SYSTEM_NEW

- **Hash:** `0xD99229FE93B46286`
- **Namespace:** OBJECT
- **Runtime name (Lua/JS):** `AddDoorToSystemNew`
- **Side:** client (game native)
- **Name status:** community guess (may change)
- **Documentation:** described
- **Since game build:** 1207
- **URL:** https://natives.borderlinerp.com/natives/OBJECT/_ADD_DOOR_TO_SYSTEM_NEW

## Signature

```c
void _ADD_DOOR_TO_SYSTEM_NEW(Hash doorHash, BOOL p1, BOOL p2, BOOL p3, int threadId, int p5, BOOL p6);
```

## Parameters

- `doorHash` (`Hash`)
- `p1` (`BOOL`)
- `p2` (`BOOL`)
- `p3` (`BOOL`)
- `threadId` (`int`)
- `p5` (`int`)
- `p6` (`BOOL`)

## Returns

`void`

## Description

*Source: alloc8or RDR3 NativeDB*

Registers a door, hashes: https://github.com/femga/rdr3_discoveries/tree/master/doorHashes

*Source: femga rdr3_discoveries*

```
0xD99229FE93B46286    (by Hackuou)
Citizen.InvokeNative(0xD99229FE93B46286, hash, 1, 0, 0, 0, 0, 0)
Someone uses that and it works to register the door
Whereas I use
Citizen.InvokeNative(0xD99229FE93B46286, hash, 1, 0, 0, 0, 0, 0)
And it does the same thing from what I can tell
Still registers it anyways
```

## Usage

### Lua

```lua
AddDoorToSystemNew(doorHash, p1, p2, p3, threadId, p5, p6)

-- always available, by hash
Citizen.InvokeNative(0xD99229FE93B46286, doorHash, p1, p2, p3, threadId, p5, p6)
```

### JavaScript

```js
AddDoorToSystemNew(doorHash, p1, p2, p3, threadId, p5, p6);

// by hash
Citizen.invokeNative('0xD99229FE93B46286', doorHash, p1, p2, p3, threadId, p5, p6);
```

### C#

```csharp
Function.Call((Hash)0xD99229FE93B46286, doorHash, p1, p2, p3, threadId, p5, p6);
```

- 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` ``.
- 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, femga rdr3_discoveries.*
