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.

Use police car memory address at 5 & 6 stars


Yorpie
 Share

Recommended Posts

I'm using this script which makes makes the country cops use the LVPD squad car and replaces the Enforcer at 4 stars with the Ranger. At 5 stars it switches between the Ranger and the Enforcer and at 6 stars SWAT tanks and FBI trucks chase me. I also made foot cops use shotguns as well at 5 stars and at 6 stars there is only SWAT.

 

What I am wondering, at 5 stars the game uses a memory address for the FBI Rancher, so I can only replace that vehicle with something for example the LS cop car, but that will make the SFPD use it as well. I am wondering if it is possible to make each police department use its own vehicle and having the Enforcer show up as well at 5 stars. Making the Enforcer show up isn't hard and having another vehicle like the Ranger show up with it isn't hard either but I would like to have Enforcers and the police cars chasing me, a bit like 4 stars.

 

I know there is a opcode which checks in which zone the player is, but there are so many so do I have to set each zone and then rewrite the memory address with the appropriate police car?

 

This is the code:

 

// This file was decompiled using SASCM.ini published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013{$CLEO .cs}//-------------MAIN---------------0000: NOP 01F0: set_max_wanted_level_to 6 :NONAME_6   not Player.Defined($PLAYER_CHAR)jf @NONAME_30 wait 250 jump @NONAME_6 :NONAME_30Model.Load(#ENFORCER)Model.Load(#COPCARRU)Model.Load(#SWATVAN)Model.Load(#FBITRUCK)Model.Load(#FBIRANCH)Model.Load(#LAPD1)Model.Load(#SFPD1)Model.Load(#LVPD1)Model.Load(#CSHER)Model.Load(#SWAT)Model.Load(#NITESTICK)Model.Load(#COLT45)Model.Load(#MP5LNG)Model.Load(#M4)Model.Load(#TEARGAS)Model.Load(#CHROMEGUN)038B: load_requested_models0A8C: write_memory 9067148 size 4 value 598 virtual_protect 1 0A8C: write_memory 4331962 size 4 value 599 virtual_protect 1 0A8C: write_memory 4594663 size 4 value 599 virtual_protect 1 0A8C: write_memory 4332006 size 4 value 599 virtual_protect 1 0A8C: write_memory 4594636 size 4 value 427 virtual_protect 1 0A8C: write_memory 4594609 size 4 value 490 virtual_protect 1 :NONAME_97wait 0    Player.WantedLevel($PLAYER_CHAR) > 4jf @NONAME_97 :NONAME_115wait 0 0A8C: write_memory 4332006 size 4 value 599 virtual_protect 1 0A8C: write_memory 4594636 size 4 value 599 virtual_protect 10A8C: write_memory 0x5DDCBF size 1 value 3 virtual_protect 1 0A8C: write_memory 0x5DDCCD size 1 value 22 virtual_protect 1wait 0 0A8C: write_memory 4332006 size 4 value 427 virtual_protect 1 0A8C: write_memory 4594636 size 4 value 427 virtual_protect 10A8C: write_memory 0x5DDCBF size 1 value 3 virtual_protect 1 0A8C: write_memory 0x5DDCCD size 1 value 25 virtual_protect 1    Player.WantedLevel($PLAYER_CHAR) > 5jf @NONAME_115 0A8C: write_memory 5644131 size 1 value 6 virtual_protect 1 :NONAME_206wait 0  0A8C: write_memory 4332006 size 4 value 601 virtual_protect 1 0A8C: write_memory 4594609 size 4 value 601 virtual_protect 10A8C: write_memory 0x8A5AA0 size 4 value 285 virtual_protect 1 0A8C: write_memory 0x8A5AA4 size 4 value 285 virtual_protect 1 0A8C: write_memory 0x8A5AA8 size 4 value 285 virtual_protect 1 0A8C: write_memory 0x8A5AAC size 4 value 285 virtual_protect 10A8C: write_memory 0x5DDCBF size 1 value 17 virtual_protect 1 0A8C: write_memory 0x5DDCCD size 1 value 22 virtual_protect 1wait 0 0A8C: write_memory 4332006 size 4 value 528 virtual_protect 1 0A8C: write_memory 4594609 size 4 value 528 virtual_protect 10A8C: write_memory 0x5DDCBF size 1 value 17 virtual_protect 1 0A8C: write_memory 0x5DDCCD size 1 value 25 virtual_protect 1    not Player.WantedLevel($PLAYER_CHAR) > 5jf @NONAME_206 0A8C: write_memory 5644131 size 1 value 5 virtual_protect 10A8C: write_memory 0x8A5AA4 size 4 value 280 virtual_protect 1 0A8C: write_memory 0x8A5AA8 size 4 value 281 virtual_protect 1 0A8C: write_memory 0x8A5AAC size 4 value 282 virtual_protect 10A8C: write_memory 9067168 size 4 value 283 virtual_protect 0 0A8C: write_memory 0x5DDCBF size 1 value 3 virtual_protect 1 0A8C: write_memory 0x5DDCCD size 1 value 22 virtual_protect 1 jump @NONAME_97 
Edited by Yorpie
Link to comment
Share on other sites

i found a mistake

you should use 038B: load_requested_models after model.load(#model) not after writing memory address. i could not find anything because of you wrote your script in the topic very sloppy please edit your post

Link to comment
Share on other sites

also you must use "if"

example:

 

:NONAME_6

if

not Player.Defined($PLAYER_CHAR)
jf @NONAME_30
wait 250
jump @NONAME_6

 

 

not:

 

:NONAME_6
not Player.Defined($PLAYER_CHAR)
jf @NONAME_30
wait 250
jump @NONAME_6

 

 

i don't think there are memory addresses like 4332006 ,4594636 or 9067148 and more which you used it for the script

hope to you'll have no problem

Edited by 4sinayousefi
Link to comment
Share on other sites

@Yorpie why do you post decompiled codes? Post the original code - the one you made before compiling. And you didn't put the whole code into the "CODE" (I'm not sure what's the real name for this) so now it's dificult to read.

@4sinayousefi - in decompiled codes the addresses are represented as decimal no matter if the source codes was using hex or decimal. And sometimes decompiled codes don't show IF commands even if they exist inside source codes.
So there ARE memory addresses like 4332006 ,4594636 or 9067148... and these are called decimals, others with 0x sign are hex. Play with PC calculator to understand the link between decimal and hex.

The following code makes the job done but only for the vehicles (I was to lazy to modify peds and weapons - sorry). All addresses and values are in hex. Also you must have the original version of SA which is 1.00.

{$CLEO}0000:                                                                                                                                        WHILE 8256:   not player $PLAYER_CHAR defined    wait 250ENDREPEAT    wait 0UNTIL 010F:   player $PLAYER_CHAR wanted_level > 40247: load_model #COPCARLA0247: load_model #COPCARSF0247: load_model #COPCARVG0247: load_model #COPCARRU                                                        0247: load_model #ENFORCER0247: load_model #SWAT0247: load_model #FBIRANCH0247: load_model #SWATVAN0247: load_model #FBITRUCK     038B: load_requested_modelsWHILE TRUEREPEAT    wait 0UNTIL 010F:   player $PLAYER_CHAR wanted_level > 4        WHILE TRUE    wait 0    01C0: [email protected] = player $PLAYER_CHAR wanted_level    IF AND        0583:   player $PLAYER_CHAR in_zone 'LA'        0039:   [email protected] == 5    THEN        wait 0        0A8C: 0x4219E6 4 0x1AB 1          wait 0        0A8C: 0x4219E6 4 0x254 1          wait 0        0A8C: 0x4219E6 4 0x257 1        wait 0        0A8C: 0x4219E6 4 0x254 1       ELSE    01C0: [email protected] = player $PLAYER_CHAR wanted_level        IF AND            0583:   player $PLAYER_CHAR in_zone 'SF'            0039:   [email protected] == 5        THEN        wait 0        0A8C: 0x4219E6 4 0x1AB 1        wait 0        0A8C: 0x4219E6 4 0x255 1          wait 0        0A8C: 0x4219E6 4 0x257 1        wait 0        0A8C: 0x4219E6 4 0x255 1        ELSE        01C0: [email protected] = player $PLAYER_CHAR wanted_level            IF AND                0583:   player $PLAYER_CHAR in_zone 'VE'                0039:   [email protected] == 5            THEN            wait 0            0A8C: 0x4219E6 4 0x1AB 1              wait 0            0A8C: 0x4219E6 4 0x256 1              wait 0            0A8C: 0x4219E6 4 0x257 1            wait 0            0A8C: 0x4219E6 4 0x256 1              ELSE            01C0: [email protected] = player $PLAYER_CHAR wanted_level                IF                    0039:   [email protected] == 5                THEN                wait 0                0A8C: 0x4219E6 4 0x1AB 1                  wait 0                0A8C: 0x4219E6 4 0x257 1                  ELSEBREAK                END            END        END    ENDENDIF    010F:   player $PLAYER_CHAR wanted_level > 5THEN0A8C: 0x561F63 1 0x6 1  ENDWHILE TRUE    wait 0    01C0: [email protected] = player $PLAYER_CHAR wanted_level    IF        0039:   [email protected] == 6    THEN    wait 0    0A8C: 0x4219E6 4 0x259 1      wait 0    0A8C: 0x4219E6 4 0x210 1      ELSEBREAK    ENDEND0A8C: write_memory 0x561F63 size 1 value 0x5 virtual_protect 1  END
Edited by Jack
Link to comment
Share on other sites

Oh sh*t, no idea what happened at my post, didn't notice the sloppy script post, I posted and quited the page so didn't notice not the entire script was in the 'CODE' part, sorry guys.

 

And yes, forgot about putting those memory address rewrites after the model load.

 

I will check out your script, Jack and yes, I will look for decompiling but this is how I always post scripts when I ask for help and I didn't make this script, this one you gave me, which I slightly altered.

 

I edited first post.

Edited by Yorpie
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.