SET STATE OF CLOSEST DOOR OF TYPE

From GTAMods Wiki
Revision as of 14:50, 25 April 2011 by Impediment (talk | contribs)
Jump to navigation Jump to search
SET_STATE_OF_CLOSEST_DOOR_OF_TYPE
Number of parameters: 6
Parameter #TypeDescription
1.IntegerDoorModelHash
2.Floatx-coordinate
3.Floaty-coordinate
4.Floatz-coordinate
5.BooleanLock (false=Unlock/true=Lock)
6.FloatDoorSwing (-0.0 to 1.0)
Return value:
TypeDescription
None

This function appears to locks/unlocks doors to interior buildings. The "DoorSwing" parameter determines the angle the door is open (door will remain at this angle). The "Lock" parameter determines if the door can move.

Example:
SetStateOfClosestDoorOfType(0xe64cf26a, -28.0f, -463.0f, 16.0f, 0, 0.0f); // can move, door closed
SetStateOfClosestDoorOfType(0xe64cf26a, -28.0f, -463.0f, 16.0f, 1, 0.0f); // can't move, door closed
SetStateOfClosestDoorOfType(0xe64cf26a, -28.0f, -463.0f, 16.0f, 0, 1.0f); // can move, door open
SetStateOfClosestDoorOfType(0xe64cf26a, -28.0f, -463.0f, 16.0f, 1, 1.0f); // can't move, door open


NOTE: Doors appear to reset when player leaves area, so must be used again when player is near the door.


NOTE: You may need to terminate the script named "ambjimslocks.sco". It seems to run a loop keeping a lot of doors closed. Though the script seems to start back up again when player leaves area. Also "ambgerry3doorlock.sco" keeps the "Gracie Kidnapping door" closed.


Terminating the "ambliftdoors.sco" removes doors like Brucies garage door, the garage door of the abandond mansion, the garage door of the warehouse you assault to get the money (at docks, Alderney).



Known Door Types:
0xa96f0f0f // GRACIE KIDNAPPING SAFEHOUSE
0xf8006406
0xdc1bac55
0xf6754b91
0x820550a0 // ROMANS APARTMENT DOOR
0x1686e847
0xe041fb8a
0x959bf7cd
0x301f2ce5
0x171bd4fb
0x571ae7dd // LC BANK DOOR
0x7b3b301d // LC BANK DOOR
0xe64cf26a
0x33a00d13
0x43af35c4
0xcdc2ca01
0x3e908284
0xf228eaa2
0x9ee94424 // CHINESE RESTUARANT
0xefef1eb5 // CHINESE RESTUARANT
0x19056e42
0xf5e06b2
0x33a00d13
0xf2b3381d
0xed9f86c6
0x1d0e65a3
0x294ef961
0x2ff750a6
0x7ea03976
0xf979408
0x3da14691
0xabbb242f
0x4d0d7d17
0x21c6a68a
0xb7bda30e
0xf8c61ce0
0xfe8296eb