Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. Los Santos Drug Wars
      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

[SCO]Opening of Prison Gate


Kucikuc24
 Share

Recommended Posts

Hi everybody. One of the biggest problems of modders si how to open Prison Gate. Answer for our question we can find in one .SCO script in TLAD.

That is named "stubbs4.sco".

I have decompiled version of that script in .cpp file, but code doesnt using NATIVEs, but HEXes and it have a lot of variables and someones are not defined.

 

You can download decompiled .cpp file Here: ->CLICK<-

 

Now, we can start finding some code for it. But my problem is, it looks chaotic and i dont have a lot of time for decrypting.

But i think, that code can be here:

 

0x3e7d3074(L[4605].v0, L[4605].v1, L[4605].v2, &L[4634]);0x7533ec9(4, &L[4338], &L[4339], &L[4340], &L[4341]);0x1d8800e3(L[4634], (((L[4338] * 0x1000000) + (L[4339] * 65536)) + (L[4340] * 256)) + L[4341]);sub_152e0();

 

My wish is pls try to help my and other modders, what have similar problem.

Link to comment
Share on other sites

I doubt that section is the right one:

 

 

ADD_BLIP_FOR_COORD(L[4605].v0, L[4605].v1, L[4605].v2, &L[4634]);              GET_HUD_COLOUR(4, &L[4338], &L[4339], &L[4340], &L[4341]);              CHANGE_BLIP_COLOUR(L[4634], (((L[4338] * 0x1000000) + (L[4339] * 65536)) + (L[4340] * 256)) + L[4341]);              sub_152e0();

 

 

I have decompiled all the scripts for you (IV, TLAD, TBOGT, both SP and MP scripts), using ScruffIV (part of sparkIV):

 

Scripts IV

Link to comment
Share on other sites

FatAssCartman: no i need source code

Sjaak: THX i will try it smile.gif

 

it can be here:

 

while (L[4327] <= (L[3905] - 1)){   DELETE_OBJECT(&(L[3905][L[4327] * 21].v0));   CREATE_OBJECT_NO_OFFSET(L[3948][L[4327] * 21].v1, L[3948][L[4327] * 21].v2.v0, L[3948][L[4327] * 21].v2.v1, L[3948][L[4327] * 21].v2.v2, &(L[3948][L[4327] * 21].v0), 1);   SET_OBJECT_HEADING(L[3948][L[4327] * 21].v0, L[3948][L[4327] * 21].v17);   FREEZE_OBJECT_POSITION(L[3948][L[4327] * 21].v0, 1);   L[4327] = L[4327] + 1;}

 

But again undeclared variables...

Edited by Kucikuc24
Link to comment
Share on other sites

L[4327] is simply an iterator. I.e.:

i = 0;while (i <= (L[3905] - 1)){  DELETE_OBJECT(&(L[3905][i * 21].v0));  CREATE_OBJECT_NO_OFFSET(L[3948][i * 21].v1, L[3948][i * 21].v2.v0, L[3948][i * 21].v2.v1, L[3948][i * 21].v2.v2, &(L[3948][i * 21].v0), 1);  SET_OBJECT_HEADING(L[3948][i * 21].v0, L[3948][i * 21].v17);  FREEZE_OBJECT_POSITION(L[3948][i * 21].v0, 1);  i = i + 1;}

 

L[3905] and L[3948] appear to be assigned here:

L[3905][0 * 21].v2.v0 = -1140,936f;L[3905][0 * 21].v2.v1 = -371,516f;L[3905][0 * 21].v2.v2 = 3,8f;L[3905][0 * 21].v17 = 270.0f;L[3905][0 * 21].v1 = 0x47eed4d0;L[3905][1 * 21].v2.v0 = -1140,936f;L[3905][1 * 21].v2.v1 = -378,051f;L[3905][1 * 21].v2.v2 = 3,8f;L[3905][1 * 21].v17 = 270.0f;L[3905][1 * 21].v1 = 0x99ccf88f;L[3948][0 * 21].v2.v0 = -1140,936f;L[3948][0 * 21].v2.v1 = -371,516f;L[3948][0 * 21].v2.v2 = 3,84f;L[3948][0 * 21].v17 = 270.0f;L[3948][0 * 21].v1 = 0xf372eaae;L[3948][1 * 21].v2.v0 = -1140,936f;L[3948][1 * 21].v2.v1 = -378,051f;L[3948][1 * 21].v2.v2 = 3,84f;L[3948][1 * 21].v17 = 270.0f;L[3948][1 * 21].v1 = 0x9ac26a7e;

 

I struggle to understand these scripts even when they're decompiled, but that looks like four groups of x, y and z co-ordinates (if you read the commas as decimal points), headings and model hashes.

Link to comment
Share on other sites

YES ! NOW WE CAN UNLOCK/LOCK PRISON GATE !

SOURCE CODE:

 

SetStateOfClosestDoorOfType(0x47eed4d0, -1140.936f, -371.516f, 3.8f, 0, 0);SetStateOfClosestDoorOfType(0x99ccf88f, -1140.936f, -378.051f, 3.8f, 0, 0);

 

Thanks to everybody who helped, Credits goes to Kucikuc24 a.k.a. Kuci, sjaak327 and Erem !

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.