Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. The Criminal Enterprises
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

      1. Guides & Strategies
      2. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    4. Featured Mods

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Movies & TV
      5. Music
      6. Sports
      7. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Announcements

    2. Support

    3. Suggestions

*DO NOT* SHARE MEDIA OR LINKS TO LEAKED COPYRIGHTED MATERIAL. Discussion is allowed.

[GTAIV][Q]Enterable Building


vob775
 Share

Recommended Posts

Maybe do your own research to the modelhash and coordinates of the buildings that you want enterable, (searching with Spark IV or Open IV into the script.img container, where all the mission scripts (*.sco) are located, then post them back here, and I'm sure someone will make a little .asi, or you can make your own alice script, as I believe it supports this command now.

 

Searching for SetStateOfClosestDoorOfType will get you the model hash and the coords.

 

Edited by sjaak327
Link to comment
Share on other sites

  • 2 weeks later...

Does anybody have a video tutorial on how to leave the doors open?

 

Edit: What program are you using? Sparks IV Open IV?

Edited by DHoff
Link to comment
Share on other sites

 

Does anybody have a video tutorial on how to leave the doors open?

 

Edit: What program are you using? Sparks IV Open IV?

A really easy (and lazy) way is to open both "ext_door.ide" and "int_door.ide" located in "Grand Theft Auto IV\pc\data\maps\props\doors" with Notepad and erase every lines. Then save and close.

 

In game, almost all the doors should be removed. icon14.gif

As usual, don't forget to back-up your files first...

 

Edit: I was a little bit to much enthusiastic on this one smile.gif It seems the church, for instance, haves different kind of doors.

In game, they disapears from far, but when you're near it, they appears (like a LOD version of the doors ?) with, of course, the collisions, wich acts like an invisible walls.

Edited by gorgeprofondegta4
Link to comment
Share on other sites

Does anybody have a video tutorial on how to leave the doors open?

 

Edit: What program are you using? Sparks IV Open IV?

A really easy (and lazy) way is to open both "ext_door.ide" and "int_door.ide" located in "Grand Theft Auto IV\pc\data\maps\props\doors" with Notepad and erase every lines. Then save and close.

 

In game, almost all the doors should be removed. icon14.gif

As usual, don't forget to back-up your files first...

 

Edit: I was a little bit to much enthusiastic on this one smile.gif It seems the church, for instance, haves different kind of doors.

In game, they disapears from far, but when you're near it, they appears (like a LOD version of the doors ?) with, of course, the collisions, wich acts like an invisible walls.

Thanks alot. icon14.gif

 

Also Im trying to figure out how to leave the doors ingame and somehow to make them open inside of locked.

Link to comment
Share on other sites

Also Im trying to figure out how to leave the doors ingame and somehow to make them open inside of locked.

 

Any help?

bump

 

edit I been looking everywhere and can't find it.

Link to comment
Share on other sites

I did remove everything in the .dat files, and no doors (Bank and other ...) had been removed Ingame ... is there any other files to change or something so those doors keep removed? Thx

Link to comment
Share on other sites

Sorry, I'm not good at scripting.

So I can't doors opening so far sad.gif

 

And another problem....If you delete lines in "int_doors.ide", doors can remove certainly.

But some models are collapsed just like Roman's burning house and office...

 

If you want enter buildings without this problem,

Open "int_doors.img" by OpenIV and delete "int_door.wbd".

Every door's collition are disabled, so you can through out and enter inside sigh.gif

Link to comment
Share on other sites

 

CJ_BANK_DOOR_L, null, 100, 79822848, 6, 0.0006724, -0.0576333, -1.25018, 1.50073, 0.0576334, 1.25018, 0.750701, 4.84288e-008, -5.96046e-007, 1.45905, null

 

CJ_BANK_DOOR_R, null, 100, 79822848, 6, -1.49921, -0.0576333, -1.25018, 0.000845551, 0.0576334, 1.25018, -0.749183, 4.84288e-008, -5.96046e-007, 1.45905, null

 

I think some of these parameters are the coords of the doors. The other parameters should be the offsets and flags, and one of them is the angle of rotation. So, if we find the parameter of the angle, we can simply rotate the doors of the bank and make them always open.

Edited by SgtRiggs90
Link to comment
Share on other sites

HippieCommunist

dont forget about the fact the game's script will pass those settings each time u load a game if the door is script-locked

 

*edit - ive made an asi that looks like this:

 

 

if ((GetAsyncKeyState(VK_F10) & 1) != 0){  //f10 key   Char c;   u32 playerIndex = ConvertIntToPlayerIndex(GetPlayerId());   GetPlayerChar(playerIndex, &c); 	f32 x,y,z;GetCharCoordinates(c, &x, &y, &z);   SetStateOfClosestDoorOfType(3863802474, x, y, z, 1, 1.00);

 

 

this unlocks the bank doors when niko is near (and pressing f10)

it opens each door sepratly tounge.gif but instantly... confused.gif

 

now, i found other doors and made another types of doors:

 

 

  	if ((GetAsyncKeyState(VK_F10) & 1) != 0){  //f10 key   Char c;   u32 playerIndex = ConvertIntToPlayerIndex(GetPlayerId());   GetPlayerChar(playerIndex, &c); 	f32 x,y,z;GetCharCoordinates(c, &x, &y, &z);   SetStateOfClosestDoorOfType(3863802474, x, y, z, 1, 1.00);   SetStateOfClosestDoorOfType(866127123, x, y, z, 1, 1.00);   SetStateOfClosestDoorOfType(4160775174, x, y, z, 1, 1.00);   SetStateOfClosestDoorOfType(3692801109, x, y, z, 1, 1.00);   SetStateOfClosestDoorOfType(4134882193, x, y, z, 1, 1.00);   SetStateOfClosestDoorOfType(4118640905, x, y, z, 1, 1.00);   SetStateOfClosestDoorOfType(4071831581, x, y, z, 1, 1.00);   SetStateOfClosestDoorOfType(4126328587, x, y, z, 1, 1.00);   SetStateOfClosestDoorOfType(419786306, x, y, z, 1, 1.00);   SetStateOfClosestDoorOfType(106751028, x, y, z, 1, 1.00);   SetStateOfClosestDoorOfType(3082658574, x, y, z, 1, 1.00);   SetStateOfClosestDoorOfType(807349477, x, y, z, 1, 1.00);

 

 

taken from majestic hotel mission and some others (rays restorant, lawyers office etc...)

 

the lawyers office does not open! notify.gif

 

im gonna try some others... moto_whistle.gif

Edited by HippieCommunist
Link to comment
Share on other sites

HippieCommunist

any1 else?

 

**edit - GUYS! theres a GET_STATE_OF_CLOSEST_DOOR_OF_TYPE.... dosnt that means we can use it to get the hash name of the closest door!? suicidal.gif

Edited by HippieCommunist
Link to comment
Share on other sites

Hey guys!

 

I wrote a code for the newest version of Alice and it works! It opens bank's doors when Niko is near by pressing F12, but you should do it EVERY time you are going to bank. However, in multiplayer doors open one time for permanent.

 

So, now we need only the doors' hashes and coordinates.

 

 

<...> (InitScript & PlayerPool & ValidPlayer)function OpenDoor(nameHash, x, y, z, Radius, enableFlag, swingSide) Result = 0 PushFloat(x) PushFloat(y) PushFloat(z) PushFloat(Radius) PushInt(nameHash) CallSpecNative("DOES_OBJECT_OF_TYPE_EXIST_AT_COORDS") Result = GetIntResult() if (Result > 0) then   PushInt(nameHash)   PushFloat(x)   PushFloat(y)   PushFloat(z)   PushInt(enableFlag)   PushFloat(swingSide)   CallSpecNative("SET_STATE_OF_CLOSEST_DOOR_OF_TYPE") endendfunction main() InitScript() while true do   WaitForPlayerPoolCreation()   WaitForValidPlayer()    if (IsKeyPressed(123) == 1) then     OpenDoor(3863802474, -27.90, -462.90, 15.60, 0.50, 0, 0.0)     OpenDoor(866127123, -27.57, -465.90, 16.27, 0.50, 0, 0.0)     OpenDoor(3863802474, -27.57, -466.55, 16.27, 0.50, 0, 0.0)     OpenDoor(866127123, -27.57, -469.55, 16.27, 0.50, 0, 0.0)     Wait(500)   end end	endmain();

 

 

It also checks whether the door object is loaded to prevent running it for no purpose. The syntax of the func is:

 

OpenDoor(nameHash, x, y, z, Radius, enableFlag, swingSide),

 

where:

nameHash - the Hash of the door (we must get it from scos);

x, y, z - coords (they are in scos, too, but we must also check them with teleporter);

Radius - it's only for DOES_OBJECT_OF_TYPE_EXIST_AT_COORDS, as we need to check the nearly exact coords, it must be a small number;

enableFlag - 0 for open, 1 for close;

swingSide - I don't know, what that means, but it must be an offset coord. We should get it from sco.

 

And still we're going to wait for the builder that will allow to modify the local scripts.

Edited by SgtRiggs90
Link to comment
Share on other sites

 

dont forget about the fact the game's script will pass those settings each time u load a game if the door is script-locked

 

*edit - ive made an asi that looks like this:

 

 

if ((GetAsyncKeyState(VK_F10) & 1) != 0){  //f10 key   Char c;   u32 playerIndex = ConvertIntToPlayerIndex(GetPlayerId());   GetPlayerChar(playerIndex, &c); 	f32 x,y,z;GetCharCoordinates(c, &x, &y, &z);   SetStateOfClosestDoorOfType(3863802474, x, y, z, 1, 1.00);

 

 

this unlocks the bank doors when niko is near (and pressing f10)

it opens each door sepratly  tounge.gif  but instantly...  confused.gif

 

now, i found other doors and made another types of doors:

 

 

  	if ((GetAsyncKeyState(VK_F10) & 1) != 0){  //f10 key   Char c;   u32 playerIndex = ConvertIntToPlayerIndex(GetPlayerId());   GetPlayerChar(playerIndex, &c); 	f32 x,y,z;GetCharCoordinates(c, &x, &y, &z);   SetStateOfClosestDoorOfType(3863802474, x, y, z, 1, 1.00);   SetStateOfClosestDoorOfType(866127123, x, y, z, 1, 1.00);   SetStateOfClosestDoorOfType(4160775174, x, y, z, 1, 1.00);   SetStateOfClosestDoorOfType(3692801109, x, y, z, 1, 1.00);   SetStateOfClosestDoorOfType(4134882193, x, y, z, 1, 1.00);   SetStateOfClosestDoorOfType(4118640905, x, y, z, 1, 1.00);   SetStateOfClosestDoorOfType(4071831581, x, y, z, 1, 1.00);   SetStateOfClosestDoorOfType(4126328587, x, y, z, 1, 1.00);   SetStateOfClosestDoorOfType(419786306, x, y, z, 1, 1.00);   SetStateOfClosestDoorOfType(106751028, x, y, z, 1, 1.00);   SetStateOfClosestDoorOfType(3082658574, x, y, z, 1, 1.00);   SetStateOfClosestDoorOfType(807349477, x, y, z, 1, 1.00);

 

 

taken from majestic hotel mission and some others (rays restorant, lawyers office etc...)

 

the lawyers office does not open!  notify.gif

 

im gonna try some others...  moto_whistle.gif

The lawer doors open using:

 

 	x1=95; 	y1=-682; 	z1=15; 	y2=-685,0;SetStateOfClosestDoorOfType(0xed9f86c6,x1,y1,z1,0,-1);SetStateOfClosestDoorOfType(0x1d0e65a3, x1, y2, z1,0,-1);

 

 

But just after you pressed the button, you have to push through the doors.

Edited by sjaak327
Link to comment
Share on other sites

Here's Niko's Hove Beach flat door code for my script:

 

OpenDoor(2181386400, 896.00, -504.00, 15.00, 2.00, 0, 0.00)

 

But you must go into the door when pressing F12, just like sjaak327 said.

 

And here's Vlad's restaurant doors, they work normally:

 

OpenDoor(387699963, 943.00, -493.00, 16.00, 2.00, 0, 0.00)

OpenDoor(387699963, 928.00, -489.00, 16.00, 2.00, 0, 0.00)

 

Cheers smile.gif

Link to comment
Share on other sites

Thanks for those coords.

 

I will implement this feature in my trainer soon, but I will share it here.

 

I call it the move through doors feature.

 

This is for C++ but of course can be easily adopted for LUA/Alice:

 

 

Char c; 	f32 x,y,z; 	u32 playerIndex = ConvertIntToPlayerIndex(GetPlayerId()); 	GetPlayerChar(playerIndex, &c); 	GetCharCoordinates(c, &x, &y, &z); 	f32 OffsetX; 	f32 OffsetY; 	f32 OffsetZ; 	GetOffsetFromCharInWorldCoords(c, 0.0, 2.0, 0.0, &OffsetX, &OffsetY, &OffsetZ); 	SetCharCoordinates(c,OffsetX,OffsetY,OffsetZ);

 

 

Now when you are right in front of a door, of which you know an interior exist, you press a key and you will be inside, to get out repeat the same procedure.

 

 

Link to comment
Share on other sites

 

sjaak327, well, using the native SET_STATE_OF_CLOSEST_DOOR_OF_TYPE has one big advantage. The game thinks that the door is opened permanently and creates all peds in the buildings you enter. For example, in the bank there are employees, in the Vlad's restaurant - the customers and etc. But when you go through the door or just remove it in the IDE, there will be nobody in the building. I checked it.

Link to comment
Share on other sites

sjaak327, well, using the native SET_STATE_OF_CLOSEST_DOOR_OF_TYPE has one big advantage. The game thinks that the door is opened permanently and creates all peds in the buildings you enter. For example, in the bank there are employees, in the Vlad's restaurant - the customers and etc. But when you go through the door or just remove it in the IDE, there will be nobody in the building. I checked it.

Yes, but I'm sure that's random, as I teleport to the bank for instance, without opening the door, and I still see peds inside,

 

 

Link to comment
Share on other sites

sjaak327, strange... Okay, I'm still working on my script and that's what we have now:

 

Lawyer's building doors:

 

OpenDoor(4160775174, 79.00, -679.00, 15.00, 0.50, 0, 0.00);

OpenDoor(3692801109, 76.00, -679.00, 15.00, 0.50, 0, 0.00);

OpenDoor(3986654918, 95.00, -682.00, 15.00, 0.50, 0, 0.00);

OpenDoor(487482787, 95.00, -685.00, 15.00, 0.50, 0, 0.00);

OpenDoor(2690137464, 120.00, -674.00, 15.00, 1.50, 0, 0.00);

OpenDoor(4134882193, 80.00, -712.00, 5.00, 1.00, 0, 0.00);

OpenDoor(4134882193, 71.00, -714.00, 5.00, 1.00, 0, 0.00);

 

Still need the doors for two other offices.

 

Museum's side door:

 

OpenDoor(419786306, -97.00, 878.00, 15.00, 1.00, 0, 0.00);

 

Throw this door the gang members enter the museum in "Museum Peace". It's opposite the stock.

 

P.S. I'm not sure why there isn't DOES_OBJECT_OF_TYPE_EXIST_AT_COORDS in some SCOs. Perhaps we can remove it from the script.

Edited by SgtRiggs90
Link to comment
Share on other sites

I'm wondering why you are passing 7 parameters, as far as I Know this command only has 6.

 

as in:

 

SetStateOfClosestDoorOfType(0xe64cf26a, x, y, z,0,-1);

 

doorhash, f32 x, f32 y, f32 z, open/close, swingside.

 

Maybe I'm missing something ?

 

Nevermind, you created your own function smile.gif

 

 

Edited by sjaak327
Link to comment
Share on other sites

sjaak327, yeah, you missed my post above smile.gif:

 

 

It also checks whether the door object is loaded to prevent running it for no purpose. The syntax of the func is:

 

OpenDoor(nameHash, x, y, z, Radius, enableFlag, swingSide),

 

where:

nameHash - the Hash of the door (we must get it from scos);

x, y, z - coords (they are in scos, too, but we must also check them with teleporter);

Radius - it's only for DOES_OBJECT_OF_TYPE_EXIST_AT_COORDS, as we need to check the nearly exact coords, it must be a small number;

enableFlag - 0 for open, 1 for close;

swingSide - I don't know, what that means, but it must be an offset coord. We should get it from sco.

 

 

The seventh parameter is Radius in what the existance of object must be checked by DOES_OBJECT_OF_TYPE_EXIST_AT_COORDS.

Link to comment
Share on other sites

Here are two doors:

 

Michelle's flat door:

SET_STATE_OF_NEAREST_DOOR_OF_TYPE(3477273845, 1197.40, -678.30, 16.70, 0, 0.00);

 

Faustin's House:

SET_STATE_OF_NEAREST_DOOR_OF_TYPE(3971243973, 947.00, -261.20, 18.50, 0, 1.00);

 

I tried to add them to my script but they don't work. It seems like they are just dinamically created during the cutscene.

 

And, I found ambchurchdoors.sco - this script contains functions to open the church doors. We need to check it out.

 

Also, I got what is the swingSide. If swingSide = 1.00 (just like in Faustin's house), the door is slowly opening inside, like when Ilyena Faustin opens it in a cutscene, and if you close it, it opens back. If it's zero, you can open the door in any side and it will close similar.

 

Finally, I think I found the Global variables that control door is open or closed all over time. So, I'll repeat - we must wait for some SCO Editor.

Edited by SgtRiggs90
Link to comment
Share on other sites

Cutscene interiors are empty. I tried entering various places like the police station and roman's cab office, (not the garage), and they are empty.

 

 

Link to comment
Share on other sites

Cutscene interiors are empty. I tried entering various places like the police station and roman's cab office, (not the garage), and they are empty.

probably like SA, they will be up in the sky or below the map in blue hell and you get teleported when entering.

You would really need to redo missions and use a co ordinate tool to get their locations. Assuming the cutscenes are done in realtime, which I think they will be as they show your clothing changes.

Link to comment
Share on other sites

pinky, no, they are in the buildings where they should be, because you see the street through the windows in cutscenes, etc. But they are "built in" these buildings, so you cannot enter them through the door. For example, you can teleport to Comedy Club, but it has "transparent" walls, "transparent" part of a bar and "transparent" staircase. But it is located in the building of the Club, not high in the sky and not underground.

 

However, the interiors like Faustin's house, Michelle's flat, Pegorino's house, Packie's house and others, that had connection with the street at least one time in the game (when Niko opens the door of Michelle's flat, when Ilyena Faustin opens the door when Niko comes, Pegorino house's door is opened in every Pegorino's mission, Kate opens the door when Niko comes etc.), they are separated from the street with only one door that can be opened if it's created dinamically in the way it does in SCOs.

 

sjaak327, they are creating dinamically, just like these doors. In SCOs, there are Local and Global variables, so the Locals are these objects in the interiors and the Globals are, for example, the state of doors that have been opened in whole missions, not only in cutscenes - these interiors (like bank, lawyer's office, Oleg's house) have full equipment smile.gif. My script opens the doors permanently in multiplayer because it doesn't check the SCOs' Globals for these doors before creating the map.

 

So, for now, we can open all the openable doors with Alice. If we want to open them permanently, we just have to find a way to dinamically (e.g. by our external script) change needed Global variables. The question is, are they named exactly like OpenIV says?

 

But to enter some of the interiors we have to wait for SCO editor to dinamically create them at the start of the game (in Initial part). To enter the others we should make a teleport point, just like it is under the highest building in Algonquin.

Edited by SgtRiggs90
Link to comment
Share on other sites

pinky, no, they are in the buildings where they should be, because you see the street through the windows in cutscenes, etc. But they are "built in" these buildings, so you cannot enter them through the door. For example, you can teleport to Comedy Club, but it has "transparent" walls, "transparent" part of a bar and "transparent" staircase. But it is located in the building of the Club, not high in the sky and not underground.

 

However, the interiors like Faustin's house, Michelle's flat, Pegorino's house, Packie's house and others, that had connection with the street at least one time in the game (when Niko opens the door of Michelle's flat, when Ilyena Faustin opens the door when Niko comes, Pegorino house's door is opened in every Pegorino's mission, Kate opens the door when Niko comes etc.), they are separated from the street with only one door that can be opened if it's created dinamically in the way it does in SCOs.

 

sjaak327, they are creating dinamically, just like these doors. In SCOs, there are Local and Global variables, so the Locals are these objects in the interiors and the Globals are, for example, the state of doors that have been opened in whole missions, not only in cutscenes - these interiors (like bank, lawyer's office, Oleg's house) have full equipment smile.gif. My script opens the doors permanently in multiplayer because it doesn't check the SCOs' Globals for these doors before creating the map.

 

So, for now, we can open all the openable doors with Alice. If we want to open them permanently, we just have to find a way to dinamically (e.g. by our external script) change needed Global variables. The question is, are they named exactly like OpenIV says?

 

But to enter some of the interiors we need wait for SCO editor to dinamically create them at the start of the game (in Initial part). To enter the others we should make a teleport point, just like it is under the highest building in Algonquin.

Yes the bank and lawer office indeed have furniture and everything else, since these are places you actually had control over when you entered them. Roman's cab office for instance, is empty, it's just an empty room with walls and doors, but nothing inside. So I guess we need to actually load the relevant cutscene if we want to have furniture and stuff.

 

 

Link to comment
Share on other sites

HippieCommunist

a good idea would be to release a compiled ASI with all of the above being opened by say F10 wink.gif

Link to comment
Share on other sites

a good idea would be to release a compiled ASI with all of the above being opened by say F10 wink.gif

That would be a bit useless as the interiors themselves aren't loaded

 

sjaak327 released a "Step through doors" function for his trainer that simply teleports you a few feet of yourself so you can explore the empty transparent spaces

Link to comment
Share on other sites

 

a good idea would be to release a compiled ASI with all of the above being opened by say F10 wink.gif

Well, we're trying to do something like that, but I'm working with Alice wink.gif But it's a bit difficult without SCO editor.

 

 

So I guess we need to actually load the relevant cutscene if we want to have furniture and stuff.

Not exactly. We need to load all the objects used in the cutscene, they are being loaded in SCOs, so we can get there native functions. But it needs a lot of work because in the SCOs the hashes and Local variables are used instead of model names, so we can only guess what we need.

Edited by SgtRiggs90
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.