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. Forum Support

    3. Suggestions

[VC] Problem with arrays


krvger
 Share

Recommended Posts

Hi!

 

I've tried CyQ's array method for creating a small cheat which generate blips on the map where the USJ starting point is when you get close to it but it crashes the game. The SCRLog doesn't log anything but the variables used in the game.

 

Thanks for the help in advance!

 

 

 

{$CLEO}0000:// First USJ register start at $795, $830 is the lastconstMALLOC_SIZE = 4ARRAY_SIZE = 32USJ_GVAR_FIRST = 795MALLOC = [email protected] = [email protected]_BLIP = [email protected] = [email protected]_GVAR = [email protected]_COMPLETED = [email protected]_COORDS = [email protected]_X = [email protected]_Y = [email protected]_Z = [email protected] : intINDEX : intREAD_BLIP : intBLIP : intUSJ_GVAR : intUSJ_COMPLETED : intREAD_COORDS : intCOORD_X : floatCOORD_Y : floatCOORD_Z : floatendwhile true    wait 200    if  0ADC: test_cheat "USJCHEAT"    jf  Continue    0ACA: show_text_box "Cheat activated!"    0AC8: MALLOC = allocate_memory_size 144        while true        wait 20        for INDEX = 0 TO 35 step 1            READ_BLIP = INDEX            READ_BLIP *= MALLOC_SIZE            READ_BLIP += MALLOC            0A8D: BLIP = read_memory READ_BLIP size 4 virtual_protect 0            if  BLIP == 0            then                USJ_GVAR = INDEX                USJ_GVAR += USJ_GVAR_FIRST                0AB1: call_scm_func @READ_GLOBALS 1 USJ_GVAR USJ_COMPLETED                if  USJ_COMPLETED == 0                jf  Continue                READ_COORDS = INDEX                READ_COORDS *= ARRAY_SIZE                READ_COORDS += @ARRAY                gosub READ_COORDS                if  Player.Defined($PLAYER_CHAR)                jf  Continue                if  00E3:  player $PLAYER_CHAR 0 near_point COORD_X COORD_Y radius 100.0 100.0                jf  Continue                0167: BLIP = create_marker_at COORD_X COORD_Y COORD_Z color 6 flag 2                0168: set_blip BLIP size 2                0165: set_marker BLIP color_to 6                0A8C: write_memory READ_BLIP size 4 value BLIP virtual_protect 0                else                USJ_GVAR = INDEX                                                            USJ_GVAR += USJ_GVAR_FIRST                                                  0AB1: call_scm_func @READ_GLOBALS 1 USJ_GVAR USJ_COMPLETED                  if  USJ_COMPLETED == 0                then                    READ_COORDS = INDEX                          READ_COORDS *= ARRAY_SIZE                    READ_COORDS += @ARRAY                        gosub READ_COORDS                            if  80E3: not player $PLAYER_CHAR 0 near_point COORD_X COORD_Y radius 100.0 100.0                    jf  Continue                    gosub @DISABLE_MARKER                                                            else                    gosub @DISABLE_MARKER                  end            end             end        if  0ADC: test_cheat "USJCHEAT"        then            0ACA: show_text_box "Cheat deactivated!"             0AC9: free_allocated_memory MALLOC                       break        end    end        end:ARRAY // Size of each array is 32 byte              COORD_X = -1487.781     // 1COORD_Y = -1044.546 COORD_Z = 18.707returnCOORD_X = -1352.695     // 2COORD_Y = -755.212 COORD_Z = 28.673returnCOORD_X = -1216.49      // 3COORD_Y = -911.833 COORD_Z = 19.0returnCOORD_X = -1252.139     // 4COORD_Y = -1054.685 COORD_Z = 22.016returnCOORD_X = -1551.685     // 5COORD_Y = -1075.674 COORD_Z = 19.121 returnCOORD_X = -1595.712     // 6COORD_Y = -1272.881 COORD_Z = 19.068returnCOORD_X = -1553.337     // 7COORD_Y = -1230.952 COORD_Z = 17.194returnCOORD_X = -1340.022     // 8COORD_Y = -998.257 COORD_Z = 19.115returnCOORD_X = 24.721        // 9COORD_Y = 897.801 COORD_Z = 25.103returnCOORD_X = 317.2051      // 10      COORD_Y = -223.2012                COORD_Z = 42.3731                  return                         COORD_X = -674.345      // 11COORD_Y = 1162.422 COORD_Z = 29.916returnCOORD_X = -529.84       // 12COORD_Y = 830.062 COORD_Z = 98.717returnCOORD_X = -839.022      // 13 COORD_Y = 1153.526 COORD_Z = 31.94 returnCOORD_X = -312.447      // 14      COORD_Y = 1109.196 COORD_Z = 47.741returnCOORD_X = -1011.583     // 15COORD_Y = -30.098 COORD_Z = 15.181returnCOORD_X = -942.702      // 16COORD_Y = -114.506 COORD_Z = 15.181returnCOORD_X = -900.789      // 17COORD_Y = 260.804 COORD_Z = 15.915returnCOORD_X = -1041.895     // 18COORD_Y = -569.323 COORD_Z = 21.855returnCOORD_X = 208.993       // 19COORD_Y = -963.672 COORD_Z = 19.967returnCOORD_X = 46.115        // 20COORD_Y = -964.415 COORD_Z = 25.883returnCOORD_X = 435.8542      // 21        COORD_Y = -334.3212                  COORD_Z = 15.8977                    return                           COORD_X = 110.481       // 22COORD_Y = -1230.6 COORD_Z = 35.67returnCOORD_X = 7.435         // 23COORD_Y = -1245.895 COORD_Z = 17.752returnCOORD_X = 9.103         // 24COORD_Y = -1326.505 COORD_Z = 20.361returnCOORD_X = -321.028      // 25COORD_Y = -1379.498 COORD_Z = 10.929returnCOORD_X = -321.028      // 26COORD_Y = -1276.589 COORD_Z = 10.929returnCOORD_X = 218.05        // 27COORD_Y = -1152.0 COORD_Z = 12.84returnCOORD_X = 259.056       // 28COORD_Y = -945.833  COORD_Z = 12.84returnCOORD_X = 444.5         // 29   COORD_Y = -118.4                COORD_Z = 16.0                  return                      COORD_X = 284.4732      // 30COORD_Y = -494.1143 COORD_Z = 16.0returnCOORD_X = 370.79        // 31COORD_Y = -709.863 COORD_Z = 19.895returnCOORD_X = 461.589       // 32COORD_Y = -522.23 COORD_Z = 18.931returnCOORD_X = 454.105       // 33COORD_Y = -504.736 COORD_Z = 18.931returnCOORD_X = 460.91        // 34COORD_Y = -383.362 COORD_Z = 14.222returnCOORD_X = 259.041       // 35COORD_Y = -480.608 COORD_Z = 14.688returnCOORD_X = -346.818      // 36COORD_Y = -290.741  COORD_Z = 12.926return:READ_GLOBALS // [email protected] = the number of the global to be [email protected] = 0x821280 [email protected] = 4006A: [email protected] *= [email protected]: [email protected] += [email protected]: [email protected] = read_memory [email protected] size 4 virtual_protect 10AB2: ret 1 [email protected]:DISABLE_MARKER0164: disable_marker BLIP0A8C: write_memory READ_BLIP size 4 value 0 virtual_protect 0return 

 

 

Edited by krvger
Link to comment
Share on other sites

Labels in CLEO scripts are negative - so you need to negate INDEX.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 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.