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

Hood under attack stage and something else . (GTA:SA)8


Anon123r
 Share

Recommended Posts

 Hello . The information I am looking for is: is it possible to change the time at which the next message 'Our hood is under atack' appears via a Cleo script? And one more thing: I'm looking for information on all gang zone codes (BLS: LSV: GSF). For example - Glen Park: GLN1, GL2A ... There are some codes that I can't find anywhere, but I need for a new script. Thanks for the help and attention: Anonymous.

Link to comment
Share on other sites

float &CGangWars::TimeTillNextAttack = *reinterpret_cast<float *>(GLOBAL_ADDRESS_BY_VERSION(0x96AB48, 0, 0, 0, 0, 0));

Ref: link

Ref: link

Link to comment
Share on other sites

None of these scripts work. And the ones from git hub didn't even compile. I use Sanny Buid3. Before giving a script, test it first.

Link to comment
Share on other sites

The github reference is to DK22pac's SA Plugin. These aren't cleo codes, but they provide the most official reference for field names and memory offsets. The link was included to make it easier to find other gangwar data in memory. The important info from the line I posted is;

 

float: specifies the size (4 bytes) and type (floating point - includes a decimal point) of data.

TimeTillNextAttack: most "official" name of this field to allow for consistent referencing. Probably not R* official though.

0x96AB48: offset of data. Use this address with memory read/write opcodes.

 

//0A8C: write_memory 0x96ab48 size 4 value 25000.0 virtual_protect 0 // Set Next Attack Time 
0A8C: write_memory 0x96ab48 size 4 value 0.0 virtual_protect 0 // Clear Next Attack Time

These codes have been tested and work as expected on PC, but this is not a complete cleo script. You'll need to wrap this code in a larger script that decides when the code should activate. For example, execute only when the cheat string "ATTACK" has been typed. If these codes are giving you trouble then post your complete script.

 

Also be sure to read the details in the last post of that topic in the second ref. Your results can vary based on factors like; CJ is on a mission, in an interior, driving an aircraft, or is not in Los Santos.

 

Added: For information on how gangs are assigned to zones search for opcodes similar to this example in a decompiled main.scm.

076C: set_zone 'SUN1' gang 1 density_to 30

 

Edited by OrionSR
Link to comment
Share on other sites

{$CLEO .csi}
:DEMOTEXT
03A4: name_thread "DEMO"
wait 1000
 
:DEMOTEXT_1
wait 0
if
0256:  player $PLAYER_CHAR defined 
004D: jump_if_false @DEMOTEXT_1

0A8C: write_memory 0x96ab48 size 4 value 2500.0 virtual_protect 0 // Set Next Attack Time 
0A8C: write_memory 0x96ab48 size 4 value 2500.0 virtual_protect 0 // Clear Next Attack Time 
0A95: enable_thread_saving  
0A93: end_custom_thread 

________________

This is the script I tested. I changed the number to 0x96ab48 from small to large. Result: When activating the script, the time of the next attack by BLS and LSV did not change at all.

 I opened a save file, and tried to activate the script in order to: immediately receive an attack from other gangs (24-30 seconds is the time required to receive an attack message after leaving the internal space in a file in which an attack is already set). Result: Absolutely nothing happened, and I did not receive an attack within 24 seconds, but as usual - (Need to spend hours in Los Santos to receive the next attack message.)

Well, is the error in the number 0x96ab48? Or is the script totally wrong? Test the script. When you manage to write a script to activate an attack from BLS :: LSV within 20-30 seconds after its inclusion in SA - write it here.
 

 

 

 

On 4/12/2021 at 10:37 PM, OrionSR said:

float &CGangWars::TimeTillNextAttack

 

Link to comment
Share on other sites

OrionSR was providing the correct memory address to cycle the next gang attack.

Here is my take to refresh the gang attack:
 

{$CLEO .cs}
thread 'gang_attack'

:Start
wait 0
if
0ADC:   test_cheat "GANG" // Type GANG in the game, make sure your player is in the Los Santos area!
jf @Start
0ACA: show_text_box "5 SECONDS"
0A8C: write_memory 0x96ab48 size 4 value 5000.0 virtual_protect 0 // Set Next Attack Time 
[email protected] = 0

:End
wait 0
if
[email protected] >= 5000 // wait for 5 seconds
jf @End
0ACA: show_text_box "GANG ATTACK!"
jump @Start

 

Link to comment
Share on other sites

9 hours ago, Anon123r said:

Result: When activating the script, the time of the next attack by BLS and LSV did not change at all.

Nice try on your cleo script. It didn't work as hoped by served the purpose of giving helpers something to build on. A few comments:

 

You set a next attack time of 2.5 seconds. I don't know why milliseconds are stored as a float here but, gotta work with what we've got.

You probably loaded a save in an LS interior. The interior location would reset your value to 30 seconds until CJ was outside again.

Thread saving was enabled and the script was ended. Cleo saves will remember the script has ended so it'll only work once.

 

The assumptions are that the test save has gang wars enabled, and there is sufficient gang density in adjacent zones so that gang attacks occur normally if you just wait long enough. Also, CJ can't be standing in the only zone available for attack.

 

In45do's script looks like a good test example that would be easy to adapt to your purpose. One issue, the 5 second delay for LS should take 83 seconds to count down if CJ is out of town.

 

 

Link to comment
Share on other sites

All this scripts work only in PC version guys . And the commands are avilable only for pc cleo . When I go to Mobile Cleo , sb says , that this script is for pc not android .

So is it possible to convert pc cleo to android . Or translate full script to android script ?(.cs to .csi/csa)

Quote
0DD9: write_mem_addr 0x00510D60 value 800000.0 size 4 add_ib 1 protect 1 // Is this gonna work for Android Cleo folks ?

 

Edited by Anon123r
Link to comment
Share on other sites

On Android the process is a little trickier because hard coded offsets are version specific. There's an elaborate process for finding the correct address for any version. It's also a bit easier because the script can be launched from the Cleo Menu so a cheat string or keypress routine isn't necessary. The script can end and be relaunched as needed.

 

This script has not been tested, but should trigger an immediate gang attack on Android when launched from the Cleo Menu under the correct conditions. A couple seconds later a Load Successful message is displayed and a sound will play to confirm that the script has executed; these "bells and whistles" are optional. I usually include them in all test scripts.

 

{$CLEO .csi} 
//NextAttack.txt

03A4: name_thread 'Attack'
0001: wait 0 ms

0DD0: [email protected] = get_label_addr @_ZN9CGangWars18TimeTillNextAttackE
0DD1: [email protected] = get_func_addr_by_cstr_name [email protected] // TimeTillNextAttack

0DD9: write_memory [email protected] value 0.0 size 4 add_ib 0 protect 0

0001: wait 2000 ms
00BA: show_text_styled GXT 'FESZ_LS' time 2000 style 4  //  Load Successful.
09F1: play_audio_at_actor $PLAYER_ACTOR event 1133  // SOUND_BUY_CAR_MOD 
004E: end_thread 

:_ZN9CGangWars18TimeTillNextAttackE
hex
"_ZN9CGangWars18TimeTillNextAttackE" 00
end

 

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.