SET STATE OF CLOSEST DOOR OF TYPE

From GTAMods Wiki
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 (-1.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 default to 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: 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.


The doors below are the model names of the doors. You can use the native function "GET_HASH_KEY" to pass the model name as a string and it will return the model hash
Example: modelHash = GetHashKey("cj_bank_door_L")

Known Doors:
BM_lawyerDoor
BM_lawyerDoor_2a
BM_lawyerDoor_2b
cj_bank_door_L // Bank of Liberty frontdoor
cj_bank_door_R
cj_boat_door // Cargoship door
cj_BS_door_L
cj_BS_door_R
cj_DB_MH3_door1
cj_int_door_6 // Vlad's bar door
cj_int_door_7 // Roman's taxi service office door
cj_int_door_10 // blue door
cj_int_door_12_H
cj_int_door_22
cj_int_door_24
cj_int_door_27L
cj_int_door_27R
cj_int_door_29
cj_int_door_30
cj_int_door_3L
cj_law_frontdoor_L // Lawyer office frontdoor
cj_law_frontdoor_R // Lawyer office frontdoor
cj_MC_door_1
cj_mision_door_1 // a door in Dwayne's apartment projects
cj_MP_fact_door_2 // cage door in Bohan factory - (Roman's kidnapping)
cj_new_china_door_L // China shop frontdoor - (MISSION: a bull in a china shop)
cj_new_china_door_R
cj_PER_door_L // Perseus clothes shop frontdoor
cj_PER_door_R
cj_RUS_door_1 // Russian clothes shop frontdoor - Left
cj_RUS_door_2
ec_ML_door_L // Memory Lane bowling alley
ec_ML_door_R
faustinsfrontdoor

// Central park bathroom toilet doors
cj_shoot_t_door
cj_t_door_BRK
cj_t_door_ENG
cj_t_door_VAC

cj_church_door_L
cj_church_door_R
cj_ext_door_1 // Gracie kidnapping safehouse door
cj_ext_door_10
cj_ext_door_11 // Gunshop frontdoor
cj_ext_door_15b
cj_ext_door_16
cj_ext_door_17
cj_ext_door_18
cj_ext_door_19_L
cj_ext_door_19_R
cj_ext_door_22
cj_ext_door_6
cj_ext_door_9
cj_ext_door_CM // Triangle club frontdoor
cj_GM_door_04
cj_GM_door_05
cj_GM_door_1
cj_GM_door_2
cj_G_door_big
cj_G_door_big2
cj_JA_door1 // Bohan safehouse door
cj_LD_MET_door_L
cj_LD_MET_door_R
cj_shop_door_1 // Modo clothes shop
cabaret_door_R
cabaret_door_L

magkiosk_door // refridgerator door for sodas at the news stands
CJ_VAULT_DOOR
CJ_VAULT_DOOR_DAM
CJ_VAULT_GATE
GB_safe02_door

// cluck'n bell
KM_CBDoor
KM_CBDoorTM // mensroom
KM_CBDoorTW // womensroom
KM_CBFrontDrL
KM_CBFrontDrR

// Majestic hotel doors
ab_RitzIntDoorA
ab_RitzIntDoorB
ab_ritzMaindoor
ab_ritz_aptdoor
ab_ritzglassdoor

KM_PortacabinDoor
KM_PrisSecDoor
KM_PrisVisDoor
proj_doorRM1 // Northwood projects door to apartment top of building
proj_doorRM1d // interior door in above apt.
proj_doorRM2
proj_doorRM4
jamfrontdoor
nhospmaindoors // Hospital sliding door
nhospmaindoors01 // Hospital sliding door

// diner doors
ndinerdoor1
ndinerdoor2

XJ_TenDoor // Bohan crackhouse room (MISSION: Shadow)
Deal_doorA // door to apartment (MISSION: SearchAndDelete)
Deal_doorB // door to bathroom
KM_KorBlacDoor // chinese resturant frontdoor (left/right)
KM_KorTDoor // chinese resturant interior door

playboyfrontdoor
Blk3_LobbyDoor // CIA lobby frontdoor
corpdoor // CIA lobby door to office
LD_show_door_L // Turismo showroom
LD_show_door_R // Turismo showroom

// hospital doors
hospdoorcorri1
hospdoorcorri3
hospdoorcorri4
hospdoorcorri5

ab_projDoor2 // projects bottom door
bs3missiongardoor // Musuem garage door
bs3respraydoor

// elevator doors
CJ_LIFT_L_DOOR
CJ_LIFT_L_DOOR_2
CJ_LIFT_L_DOOR_OUT
CJ_LIFT_L_DOOR_OUT_2
CJ_LIFT_R_DOOR
CJ_LIFT_R_DOOR_2
CJ_LIFT_R_DOOR_OUT
CJ_LIFT_R_DOOR_OUT_2



The Lost And Damned
cj_angel_door_L // Angels of Death clubhouse left door
cj_angel_door_R // Angels of Death clubhouse right door
cj_e1_door_1
cj_e1_door_lost // other door in Lost clubhouse
cj_lost_door // Lost clubhouse frontdoor and sidedoor
e1_pris_door_L // prison main gate
e1_pris_door_R // prison main gate
e1_pris_door_L_DAM
e1_pris_door_R_DAM



The Ballad of Gay Tony
cj_int_door_1
cj_int_door_2
cj_int_door_3R
cj_int_door_9
e2_bowl_door_L
e2_bowl_door_R
e2_fightcagegate // gate to fightclub cage (two of them)
P_E2_fightcagedoor // door to npc spawn
P_E2_fightclubdoor // fightclub frontdoor
e2_maisontdoor1
e2_maisontdoor2
et_FactoryGate_L // Alderney helipad fence gate (probably GTAIV)
et_FactoryGate_R // Alderney helipad fence gate (probably GTAIV)
P_E2_BM_DOOR // Bahama Mamas frontdoor
P_E2_HercDoorExt // Hercules frontdoor
P_E2_HercDoorInt
P_INT_DOOR_AH
P_Intdoor10
P_JET_DOOR_1 // door for Bulgarin's plane
cj_int_door_1
cj_int_door_2

P_RANGE_GATE
P_RANGE_GATE2
RANGE_GATE2_R_DYN RANGE_GATE2_L_DYN
P_E2_goldrangedoor // golf course door
CJ_NEW_BOWL_DOOR_R
CJ_NEW_BOWL_DOOR_L

E2_Maison_secdoor // security room
E2_Maisondoor16 // mensroom
E2_Maisondoor17 // womensroom
E2_Maisondoor18 // frontdoor

E2_XJoff_door02

// MeTV building interior doors
E2_Sky_door_L01
E2_Sky_door_L02
E2_Sky_door_L03
E2_Sky_door_R01
E2_Sky_door_R02