AddDoorToSystem — FiveM Natives
0x6F8838D03D1DC226 · OBJECT · all
p5 only set to true in single player native scripts. Door hashes normally look like PROP_[int]_DOOR_[int] for interior doors and PROP_BUILDING_[int]_DOOR_[int] exterior doors but you can just make up your own hash if you want. If scriptDoor is true, register the door on the script handler host (note: there's a hardcap on the number of script IDs that can be added to the system at a given time). If scriptDoor and isLocal are both false, the door is considered to be in a "Persists w/o netobj" state. A simple "localized" door-system (with hundreds/thousands of doors) can be created by setting p5, p6, and p7 to false and using EventHandlers to synchronize the states to: DOOR_SYSTEM_SET_DOOR_STATE, DOOR_SYSTEM_SET_OPEN_RATIO, DOOR_SYSTEM_SET_HOLD_OPEN, etc.
Parameters
| Name | Type | Description |
|---|---|---|
| doorHash | Hash | A (unique) door system identifier |
| modelHash | Hash | Entity model hash |
| x | float | The X coordinate of the door object |
| y | float | The Y coordinate of the door object |
| z | float | The Z coordinate of the door object |
| p5 | BOOL | |
| scriptDoor | BOOL | false; relies upon getNetworkGameScriptHandler. |
| isLocal | BOOL | On true disables the creation `CRequestDoorEvent's` in [DOOR_SYSTEM_SET_DOOR_STATE](#\_0x6BAB9442830C7F53). |
Returns
void