setStateOfClosestDoorOfType
SET_STATE_OF_CLOSEST_DOOR_OF_TYPE0xF82D8F1926A02C3DThe GTA V native SET_STATE_OF_CLOSEST_DOOR_OF_TYPE of the OBJECT namespace, as LS:MP client scripts call it: the global function setStateOfClosestDoorOfType, in JavaScript and in Lua.
setStateOfClosestDoorOfType(
type: Hash,
x: number,
y: number,
z: number,
locked: boolean,
heading: number,
p6: boolean
): voidsetStateOfClosestDoorOfType(
type: Hash,
x: number,
y: number,
z: number,
locked: boolean,
heading: number,
p6: boolean
)Usage
setStateOfClosestDoorOfType(type, x, y, z, locked, heading, p6);setStateOfClosestDoorOfType(type, x, y, z, locked, heading, p6)Three consecutive numbers can be given as one vector: { x, y, z } (or [x, y, z]) in JavaScript, a Vector3 in Lua.
setStateOfClosestDoorOfType(type, pos, locked, heading, p6);setStateOfClosestDoorOfType(type, pos, locked, heading, p6)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
type | Hash | number | integer |
x | float | number | number |
y | float | number | number |
z | float | number | number |
locked | BOOL | boolean | boolean |
heading | float | number | number |
p6 | BOOL | boolean | boolean |
Returns
Nothing. In JavaScript the call evaluates to undefined.
Notes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
Hardcoded to not work in multiplayer.
Used to lock/unlock doors to interior areas of the game.
(Possible) Door Types:
Heading is either 1, 0 or -1 in the scripts. Means default closed(0) or opened either into(1) or out(-1) of the interior.
Locked means that the heading is locked.
p6 is always 0.
225 door types, model names and coords found in stripclub.c4:
https://pastebin.com/gywnbzsH
get door info: https://pastebin.com/i14rbekD
Reference
- Namespace
- Object OBJECT
- In the game
void SET_STATE_OF_CLOSEST_DOOR_OF_TYPE(Hash type, float x, float y, float z, BOOL locked, float heading, BOOL p6)- Hash
0xF82D8F1926A02C3D