Yorpie Posted November 15, 2014 Share Posted November 15, 2014 (edited) 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 November 16, 2014 by Yorpie Link to comment Share on other sites More sharing options...
JohnDoe4444 Posted November 15, 2014 Share Posted November 15, 2014 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 More sharing options...
JohnDoe4444 Posted November 16, 2014 Share Posted November 16, 2014 (edited) also you must use "if" example: :NONAME_6 if not Player.Defined($PLAYER_CHAR)jf @NONAME_30wait 250jump @NONAME_6 not: :NONAME_6 not Player.Defined($PLAYER_CHAR)jf @NONAME_30wait 250jump @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 November 16, 2014 by 4sinayousefi Link to comment Share on other sites More sharing options...
Jack Posted November 16, 2014 Share Posted November 16, 2014 (edited) @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 November 16, 2014 by Jack Tank Fire [SA] New Police Helicopter [VC & III] My YouTube Channel Link to comment Share on other sites More sharing options...
JohnDoe4444 Posted November 16, 2014 Share Posted November 16, 2014 oh my bad!!! i forgot about hex codes Link to comment Share on other sites More sharing options...
Yorpie Posted November 16, 2014 Author Share Posted November 16, 2014 (edited) 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 November 16, 2014 by Yorpie Link to comment Share on other sites More sharing options...
Yorpie Posted November 16, 2014 Author Share Posted November 16, 2014 (edited) Ignore this post Edited November 16, 2014 by Yorpie Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now