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

[REL | CODE] Chop Shop


Viper187
 Share

Recommended Posts

I remember someone in the game mentioning using CJ's garage as a chop shop at one point. I got ocram88 to help me figure out the code for making cars drive into a garage the way they do on the missions for that one, and I set this up so it activates once you complete the regular missions (Puncture Wounds was the last?). While in a car (and not on a mission), a red circle will appear in front of the garage door. Just drive over there to chop your wheels and earn a little cash. It's just a little mod, but I thought it was kind of neat. By default, it gives 1/4th the car's monetary value from handling.cfg. This can be easily changed (see @2), but it seemed like plenty. I didn't get into checking the car's health or if it's wrecked, because my car immunities mod would mess that up anyway by keeping it perfect with 32000 health. lol

 

Big thanks to ocram88 for putting together most of the actual garage code. smile.gif

 

add this line with the other create_thread lines near the top of MAIN:

 

004F: create_thread ££SNAKECHOP00

 

 

Then find:

 

 

;-------------Mission 0---------------; Originally: Initial 1

 

 

and add BEFORE it:

 

 

:SNAKECHOP000001: wait  0 ms00D6: if  20038:   $STEAL_MISSIONS_PASSED ==  4;; integer values0038:   $ON_MISSION ==  0;; integer values00DF:   actor $PLAYER_ACTOR driving004D: jump_if_false ££SNAKECHOP00:SNAKECHOP0100D6: if  10103:   actor $PLAYER_ACTOR stopped_near_point_in_car -2033.175  178.6755  27.8516 radius  4.0  4.0  4.0 sphere  1  83B0:   NOT   garage 'HBGDSFS' door_open004D: jump_if_false ££SNAKECHOP000360: open_garage 'HBGDSFS'0811: @0 = actor $PLAYER_ACTOR car00AB: put_car @0 at -2033.175 178.6755 30.00175: set_car @0 z_angle_to  90.001B4: set_player $PLAYER_CHAR frozen_state  0 (frozen)015F: set_camera_position  -2037.175 188.6755  33.8516  0.0  0.0  0.00158: camera_on_vehicle @0  15  20001: wait  2000 ms0615: @114 05B9: unknown_action_sequence -1  1000 05D1: unknown_action_sequence -1 @0 -2044.0  178.6755  27.8359  7.0  0  0  3 0633: unknown_action_sequence -1 0616: @114 0618: $PLAYER_ACTOR @114 061B: @114 062E: $PLAYER_ACTOR  1560 @105 0001: wait  3500 ms0361: close_garage 'HBGDSFS'0001: wait  2000 ms016A: fade  0 ()  1000 ms0001: wait  1000 ms03E6: remove_text_box016A: fade  1 (back)  1000 ms0362: remove_actor $PLAYER_ACTOR from_car_and_place_at  -2033.175 178.6755 27.85160441: @1 = car @0 model00A6: destroy_car @001C3: remove_references_to_car @001B4: set_player $PLAYER_CHAR frozen_state  1 (unfrozen)0373: set_camera_directly_behind_player02EB: restore_camera_with_jumpcut09E1: @1 @20016: @2 /=  4;; integer values 0109: player $PLAYER_CHAR money += @201E3: text_1number_styled 'IE30' @2  5000 ms  10002: jump ££SNAKECHOP00

 

Edited by Viper187
Link to comment
Share on other sites

Small edit. I made it so you have to be stopped in the sphere instead of just touching it.

 

This line:

 

0100:   actor $PLAYER_ACTOR near_point_in_car -2033.175 178.6755 27.8516 radius  4.0  4.0  4.0 sphere  1

 

changed to:

 

0103:   actor $PLAYER_ACTOR stopped_near_point_in_car -2033.175  178.6755  27.8516 radius  4.0  4.0  4.0 sphere  1  

 

 

Link to comment
Share on other sites

as i've said on IRC, i modified your mod a bit. now it doesnt give you the 4th of the cars monetary value, but instead it checks the car's health, and gives you that percentage of the original monetary value (that is, if your car has 100% health, you get 100% money, if its 50% health, you get 50% money, etc)

 

somewhere before destroy_car:

 

 

0227: @3 = car @0 health

 

 

before add_player_money, replace the @2 /= 4 part with this:

 

 

0016: @3 /= 1000068: @2 *= @3;; integer values

 

 

smile.gif

 

Link to comment
Share on other sites

I was hoping someone would put out a mod like this. Great job. Unfortunately I can't get it to work. I followed the directions in the readme file for the scm editor I'm using, I followed your directions, and the code even compiles. However, when I hit "compile and add to GTA" it tells me to install GTA. I have GTA installed. When I just compile your code, I get the message that main.scm was created in a separate folder. I tried just copying that main.scm file to data/script/ and the game locks up whenever I load a game or start a new one.

 

Any advice you could give me would be appreciated. I've been looking forward to a mod like this.

Link to comment
Share on other sites

1. use Barton's SA Builder v0.33 (if you're not already) and only "Compile" not "Compile & copy"

2. open the SCM/TXT file from the directory it's in (data\scripts) and it'll compile to there.

3. the builder makes both main.scm AND script.img. copy both if you insist on compiling elsewhere.

Link to comment
Share on other sites

Unreal. I'm doing everything perfectly, but every time I load a new game or a saved game the game crashes and I get the error message: gta_sa.exe has encountered a problem blah blah blah.

 

I'm using barton's mission builder 0.33 and added the lines...

0A4A=2,%1h% %2h%

0A4B=0,

...to SASCM.ini

 

I open main.scm, it makes main.txt. I make the additions to this code. I compile, no errors. I copy main.scm and script.img to c/pf/rg/data/script/ open the game click new game and crash every time.

 

Anyone out there want to share their main.scm/script.img files with just this change to it? I'm offering 5 million karma points as compensation for my sanity.

 

Link to comment
Share on other sites

Anyone out there want to share their main.scm/script.img files with just this change to it? I'm offering 5 million karma points as compensation for my sanity.

lol, are you sure you made the appropriate changes? you must add the create_thread where the original ones are, and you must add the thread itself above mission 0, also be careful not to accidentally put the thread inside another one.

Link to comment
Share on other sites

Yes sir. I'm positive I did it right. I just do a search for "create_thread" and add the first line of code there. Then I do a search for "Originally: Initial 1" and copy/paste the lines of code right above it. I can't believe I can't get this to work, it's a piece of cake.

 

Link to comment
Share on other sites

Yes sir. I'm positive I did it right. I just do a search for "create_thread" and add the first line of code there. Then I do a search for "Originally: Initial 1" and copy/paste the lines of code right above it. I can't believe I can't get this to work, it's a piece of cake.

hmm, that's strange. do you compile, then copy the main.scm to SA? smile.gif

Link to comment
Share on other sites

Finally, I got it to work. Well at least I was able to load a new game. I guess I won't know if it worked until after the Wang Cars missions. I'm not able to load a saved game after making the changes. That's normal right? To test this mod did you have to play through all those missions again?

 

I do want to modify the amount of money you get for each car though. Let's say I wanted to make it so you only get 10% of the value of the car delivered. Will the following code changes work?

 

changing: 0016: @2 /= 4;; integer values

to: 0016: @2 /= 10;; integer values

 

Thanks for your help and this mod.

Link to comment
Share on other sites

Finally, I got it to work. Well at least I was able to load a new game. I guess I won't know if it worked until after the Wang Cars missions. I'm not able to load a saved game after making the changes. That's normal right? To test this mod did you have to play through all those missions again?

 

I do want to modify the amount of money you get for each car though. Let's say I wanted to make it so you only get 10% of the value of the car delivered. Will the following code changes work?

 

changing: 0016: @2 /= 4;; integer values

to: 0016: @2 /= 10;; integer values

 

Thanks for your help and this mod.

yes, unfortunately the slightest change of main.scm causes the savegames not to work.

"0016: @2 /= 10"

will give you the 10th of the original value.

 

i suggested a bit of modification to the value above, which gives you money based on how much damaged the car is, i'd suggest you to use that one as it's more realistic. smile.gif

Link to comment
Share on other sites

Hmmm, how about a combination of both:

 

somewhere before destroy_car:

 

CODE

0227: @3 = car @0 health

 

 

before add_player_money, replace the @2 /= 4 part with this:

 

CODE

0016: @3 /= 100

0068: @2 *= @3 /=10;; integer values

 

 

Is this code correct if I want it to check the health and still give only 10% of the value after the check?

 

I want to leave in the 10% part because it's not really realistic to get 10,000 dollars for delivering a Sanchez to a chop shop.

Link to comment
Share on other sites

Hmmm, how about a combination of both:

 

somewhere before destroy_car:

 

CODE

0227: @3 = car @0 health

 

 

before add_player_money, replace the @2 /= 4 part with this:

 

CODE

0016: @3 /= 100

0068: @2 *= @3 /=10;; integer values

 

 

Is this code correct if I want it to check the health and still give only 10% of the value after the check?

 

I want to leave in the 10% part because it's not really realistic to get 10,000 dollars for delivering a Sanchez to a chop shop.

nope, that code isn't correct, sadly SCM is a very primitive language.

 

 

0016: @3 /= 1000068: @2 *= @30016: @2 /= 10

 

 

i think it would be much more realistic to get 80% of the cars value.

and you get 10k for a sanchez if it's monetary value is 10k.

Link to comment
Share on other sites

Ok thanks. You have to do the operations on @2 one at a time. The reason I said 10k for a Sanchez is that's how much it was for delivering one in mint condition on the import/export missions. I assumed we were getting 100% value for each car on those missions.

 

One more question, I noticed you went from 0016 to 0068 and then back to 0016 with:

 

0016: @3 /= 100

0068: @2 *= @3

0016: @2 /= 10

 

 

Are you allowed to do that, instead of going to a higher number like 0072?

 

EDIT: Studying the code, I'm seeing some patterns that might answer my own question. Every command to "wait" is preceeded by a 0001. I'm guessing every command to divide must be preceeded by a 0016. Is that correct? Then every command to multiply must be preceeded by a 0068?

Edited by tsc
Link to comment
Share on other sites

I'm looking at this part of the code:

 

:SNAKECHOP00

0001: wait 0 ms

00D6: if 2

0038: $STEAL_MISSIONS_PASSED == 4;; integer values

0038: $ON_MISSION == 0;; integer values

00DF: actor $PLAYER_ACTOR driving

004D: jump_if_false ££SNAKECHOP00

 

If I removed 0038: $STEAL_MISSIONS_PASSED == 4;; integer values

 

...and changed: 00D6 if 2 ... to: 00D6 if 1

 

...would I be able to deliver cars to the chop shop before doing any missions if I combined this with SANGA or the open-up SA mods? Any and all help appreciated.

 

 

 

Link to comment
Share on other sites

I'm looking at this part of the code:

 

:SNAKECHOP00

0001: wait 0 ms

00D6: if 2

0038: $STEAL_MISSIONS_PASSED == 4;; integer values

0038: $ON_MISSION == 0;; integer values

00DF: actor $PLAYER_ACTOR driving

004D: jump_if_false ££SNAKECHOP00

 

If I removed 0038: $STEAL_MISSIONS_PASSED == 4;; integer values

 

...and changed: 00D6 if 2 ... to: 00D6 if 1

 

...would I be able to deliver cars to the chop shop before doing any missions if I combined this with SANGA or the open-up SA mods? Any and all help appreciated.

yes. smile.gif

Link to comment
Share on other sites

 

Ok thanks. You have to do the operations on @2 one at a time. The reason I said 10k for a Sanchez is that's how much it was for delivering one in mint condition on the import/export missions. I assumed we were getting 100% value for each car on those missions.

 

One more question, I noticed you went from 0016 to 0068 and then back to 0016 with:

 

0016: @3 /= 100

0068: @2 *= @3

0016: @2 /= 10

 

 

Are you allowed to do that, instead of going to a higher number like 0072?

 

EDIT: Studying the code, I'm seeing some patterns that might answer my own question. Every command to "wait" is preceeded by a 0001. I'm guessing every command to divide must be preceeded by a 0016. Is that correct? Then every command to multiply must be preceeded by a 0068?

The numbers are opcodes. They determine what it actually to be done. The text actually means nothing. The builder just grabs that number, and the vars in the right order (if needed) and builds that. Alos note that math ops are data type specific most times. opcodes.txt included with Barton's SA Builder has a complete list of all ops, but some still lack descriptions.

 

Link to comment
Share on other sites

Works great, thanks Viper and GodGell. The only way I found of testing it is with the Never Wanted cheat. I changed the code to make the chop shot available from the start of the game. Unfortunately, I was unable to combine this mod with the San Andreas Opened Up mod because decompiling SAOU and then recompiling it gave me the dreaded Label0195A0 error. Hopefully, in the future, the author will provide his source code so we can just plug it into our original main.scm file and combine the mods of our choosing.

 

Back to this mod: I'd love to see the chop shop have a list, like the import/export missions had a chalkboard with 10 cars listed for import. Even if the chop shop only listed one car at a time, I think it would be cool. Perhaps take the model of the chalkboard from the import/export missions, drop it right outside the garage, and display the car name that's needed for import. Is there a way to do this? Maybe choose a car model from random and have it displayed on the chalk board? If this is possible, maybe put it on a timer, to where the car model changes every day so you have to be quick about finding that particular model.

 

Just throwing out some ideas of what I'd like to see in this mod. I wish I was talented enough to do this on my own. Thanks again and keep up the good work.

 

 

EDIT: looking at the code for IMPEXPM in the main.txt after decompiling main.scm I found this: 029B: @27 = init_object #NF_BLACKBOARD at 0.0 0.0 0.0 ... and this: 029B: @27 = init_object #NF_BLACKBOARD at -1573.881 135.3845 2.535

 

Looking at the code for the chop shop I'm assuming the sphere outside the garage is at -2033.175 178.6755 27.8516 So, putting in this line of code would put the blackboard right outside the garage: 029B: @27 = init_object #NF_BLACKBOARD at 2033.175 178.6755 27.8516

 

Is that correct so far?

 

EDIT 2: I think instead of making the car on the list random, just make a list of most of the car I.D.'s in order and just go down the line one right after the other, and when it gets to the end of the list, looping back to the first car again. The timer would pretty much make it random enough unless you stole the car on the list every day. From the vehicles.ide file it looks like the I.D.'s for the cars start at 400 for a Landstalker and end around 609 for a boxburg van. Some of these id's won't be able to be used for stealing though like the I.D.'s for boats.

 

EDIT 3: If we dropped the timer idea and just decided to make a list of cars and go through the list one at a time, maybe something like this?:

 

0811: @10 = "CAR_ON_LIST"

 

...obviously not even close but just a general idea, there must be a way to make a list of cars and then add 1 each time a car is delivered to get to the next car, then looping back to the beginning when we reach the end of the list

 

Then put in the following after making sure we're in the radius of the sphere:

 

0811: @11 = actor $PLAYER_ACTOR car

00D6: if 1

0103 @11 = @10 ;;<[email protected] being the car on the list

 

..if false maybe throw in a:

 

00BB: text_lowpriority 'IE23' 3000 ms 1 ; ~s~This vehicle is not required for export.

 

004D: jump_if_false ££SNAKECHOP00

0441: @12 = car @11 model

09E1: @12 @13

0016: @13 /= 10

0109: player $PLAYER_CHAR money += @13

01E3: text_1number_styled 'IE30' @13 5000 ms 1

 

"CAR_ON_LIST" + 1 then an if statement to see if we reached the end of the list and need to loop back to the beginning.

 

0002: jump ££SNAKECHOP00

Edited by tsc
Link to comment
Share on other sites

interesting idea, but remember this is supposed to be a chop shop - you bring in a car and they take it apart & give you money for it. in a real chop shop they wouldn't give a f*ck what kind of car do you bring in, as they just take it apart and sell it part by part. so a wanted list for a chop shop isn't really realistic - but of course we don't have to be realistic all the time. biggrin.gif

but it's Viper187's mod, so i'm not the one to decide here. also i'm not sure the opcode to write stuff on the chalkboard has been found yet.

Link to comment
Share on other sites

Could someone tell me how to put custom text on the screen. I've abandoned the blackboard idea and decided to just put the text on the screen for the next car in the list. The next car in the list will pop up on the screen when I stand in the sphere. Here's the code so far. The blank part is where I want to put some text. Any help would be appreciated.

 

:SNAKECHOP02

00D6: if 1

0102: actor $PLAYER_ACTOR stopped_near_point_on_foot -2033.175 178.6755 27.8516 radius 4.0 4.0 4.0 sphere 1

004D: jump_if_false ££SNAKECHOP05

00D6: if 1

0038: $caronlist == 1

 

"TEXT HERE"

 

004D: jump_if_false ££SNAKECHOP03

 

 

EDIT: Is it s$ ? Like s$carname = "Sabre" ?

Or v$ ? Like 06D1: v$carname = "Sabre" ?

 

Edited by tsc
Link to comment
Share on other sites

I finally got it put together. I made sort of a chop shop/black market car dealership. You can bring in any car and get 10% of it's value, but if you bring in a car that's on the list, you get 20%. It's real basic right now, just 3 cars on the list, but at least it's functional. If you're on foot and enter the sphere text will pop up on the screen and tell you what car is on the list. Any comments on how to improve the code will be appreciated. I think in the future I can make an array out of the list to streamline the code. That should help a lot when I make the list much larger. Thanks for all the help guys. Great job Viper of making a chop shop out of the garage.

 

Crappy code for my first attempt at making a mod:

 

 

:SNAKECHOP000004: $caronlist =  1:SNAKECHOP010001: wait  0 ms00D6: if  10038:   $ON_MISSION ==  0004D: jump_if_false ££SNAKECHOP01:SNAKECHOP0200D6: if  10102:   actor $PLAYER_ACTOR stopped_near_point_on_foot  -2033.175  178.6755  27.8516 radius  4.0  4.0  4.0 sphere  1004D: jump_if_false ££SNAKECHOP5000D6: if 10038:   $caronlist ==  1004D: jump_if_false ££SNAKECHOP0300BA: text_styled "CHEETAH"  4000 ms  10002: jump ££SNAKECHOP01:SNAKECHOP0300D6: if  10102:   actor $PLAYER_ACTOR stopped_near_point_on_foot  -2033.175  178.6755  27.8516 radius  4.0  4.0  4.0 sphere  1004D: jump_if_false ££SNAKECHOP5000D6: if 10038:   $caronlist ==  2004D: jump_if_false ££SNAKECHOP0400BA: text_styled "BANSHEE"  4000 ms  10002: jump ££SNAKECHOP01:SNAKECHOP0400D6: if  10102:   actor $PLAYER_ACTOR stopped_near_point_on_foot  -2033.175  178.6755  27.8516 radius  4.0  4.0  4.0 sphere  1004D: jump_if_false ££SNAKECHOP5000D6: if 10038:   $caronlist ==  3004D: jump_if_false ££SNAKECHOP0100BA: text_styled "ZR350"  4000 ms  10002: jump ££SNAKECHOP01:SNAKECHOP5000D6: if  10103:   actor $PLAYER_ACTOR stopped_near_point_in_car -2033.175  178.6755  27.8516 radius  4.0  4.0  4.0 sphere  1  83B0:   NOT   garage 'HBGDSFS' door_open004D: jump_if_false ££SNAKECHOP010002: jump ££SNAKECHOP51:SNAKECHOP5100D6: if 10038:   $caronlist ==  1004D: jump_if_false ££SNAKECHOP520811: @0 = actor $PLAYER_ACTOR car00D6: if 10137:   car @0 id == #CHEETAH004D: jump_if_false ££SNAKECHOP980002: jump ££SNAKECHOP99:SNAKECHOP5200D6: if 10038:   $caronlist ==  2004D: jump_if_false ££SNAKECHOP530811: @0 = actor $PLAYER_ACTOR car00D6: if 10137:   car @0 id == #BANSHEE004D: jump_if_false ££SNAKECHOP980002: jump ££SNAKECHOP99:SNAKECHOP5300D6: if 10038:   $caronlist ==  3004D: jump_if_false ££SNAKECHOP010811: @0 = actor $PLAYER_ACTOR car00D6: if 10137:   car @0 id == #ZR350004D: jump_if_false ££SNAKECHOP980002: jump ££SNAKECHOP99:SNAKECHOP980360: open_garage 'HBGDSFS'0811: @0 = actor $PLAYER_ACTOR car00AB: put_car @0 at -2033.175 178.6755 30.00175: set_car @0 z_angle_to  90.001B4: set_player $PLAYER_CHAR frozen_state  0 (frozen)015F: set_camera_position  -2037.175 188.6755  33.8516  0.0  0.0  0.00158: camera_on_vehicle @0  15  20001: wait  2000 ms0615: @114 05B9: unknown_action_sequence -1  1000 05D1: unknown_action_sequence -1 @0 -2044.0  178.6755  27.8359  7.0  0  0  3 0633: unknown_action_sequence -1 0616: @114 0618: $PLAYER_ACTOR @114 061B: @114 062E: $PLAYER_ACTOR  1560 @105 0001: wait  3500 ms0361: close_garage 'HBGDSFS'0001: wait  2000 ms016A: fade  0 ()  1000 ms0001: wait  1000 ms03E6: remove_text_box016A: fade  1 (back)  1000 ms0362: remove_actor $PLAYER_ACTOR from_car_and_place_at  -2033.175 178.6755 27.85160441: @1 = car @0 model00A6: destroy_car @001C3: remove_references_to_car @001B4: set_player $PLAYER_CHAR frozen_state  1 (unfrozen)0373: set_camera_directly_behind_player02EB: restore_camera_with_jumpcut09E1: @1 @20016: @2 /=  10;; integer values 0109: player $PLAYER_CHAR money += @201E3: text_1number_styled 'IE30' @2  5000 ms  10002: jump ££SNAKECHOP01:SNAKECHOP990360: open_garage 'HBGDSFS'0811: @0 = actor $PLAYER_ACTOR car00AB: put_car @0 at -2033.175 178.6755 30.00175: set_car @0 z_angle_to  90.001B4: set_player $PLAYER_CHAR frozen_state  0 (frozen)015F: set_camera_position  -2037.175 188.6755  33.8516  0.0  0.0  0.00158: camera_on_vehicle @0  15  20001: wait  2000 ms0615: @114 05B9: unknown_action_sequence -1  1000 05D1: unknown_action_sequence -1 @0 -2044.0  178.6755  27.8359  7.0  0  0  3 0633: unknown_action_sequence -1 0616: @114 0618: $PLAYER_ACTOR @114 061B: @114 062E: $PLAYER_ACTOR  1560 @105 0001: wait  3500 ms0361: close_garage 'HBGDSFS'0001: wait  2000 ms016A: fade  0 ()  1000 ms0001: wait  1000 ms03E6: remove_text_box016A: fade  1 (back)  1000 ms0362: remove_actor $PLAYER_ACTOR from_car_and_place_at  -2033.175 178.6755 27.85160441: @1 = car @0 model00A6: destroy_car @001C3: remove_references_to_car @001B4: set_player $PLAYER_CHAR frozen_state  1 (unfrozen)0373: set_camera_directly_behind_player02EB: restore_camera_with_jumpcut09E1: @1 @20016: @2 /=  5;; integer values 0109: player $PLAYER_CHAR money += @201E3: text_1number_styled 'IE30' @2  5000 ms  10008: $caronlist +=  100D6: if 10038:   $caronlist ==  4004D: jump_if_false ££SNAKECHOP010002: jump ££SNAKECHOP00

 

Link to comment
Share on other sites

Wow, thanks Viper! This code is sweet! smile.gif

 

I have a question though, I was wondering if there is a way to keep the chop shop from opening back up until you go a certain distance away from it. It's seems strange that you would be able to walk in the street, grab a car, drive it in, and repeat to get rich quick... I'm not very familiar with the scripts of GTA yet, but I think it would be possible. Keep up the good work!

 

@ts: I like your idea for a custom export of vehicles (the crane sux in my opinion). It would be cooler I think if you actually took them to the trailers in LS like the ballas did, not sure how difficult that would be though, but maybe the code from that mission would help a little. Just a thought.

 

colgate.gif

 

Edit: I have the code for if CJ is within the certain distance or not, but it's not letting me flag it to say that he HAS gone outside the range so let it work. Here's what I have so far:

 

 

:SNAKECHOP000001: wait  0 ms  00D6: if  10038:   $ON_MISSION ==  0;; integer values00DF:   actor $PLAYER_ACTOR driving004D: jump_if_false ££SNAKECHOP0000D6: if 00007:   $10900 ==  0004D: jump_if_false ££SNAKECHOP0100D6: if 080FE:    NOT actor $PLAYER_ACTOR  0 ()near_point  -2033.175  178.6755  27.8516 radius  200.0  200.0  200.0004D: jump_if_false ££SNAKECHOP000007:   $10900 ==  1 :SNAKECHOP0100D6: if  20103:   actor $PLAYER_ACTOR stopped_near_point_in_car -2033.175  178.6755  27.8516 radius  4.0  4.0  4.0 sphere  1  83B0:   NOT   garage 'HBGDSFS' door_open0007:   $10900 == 1004D: jump_if_false ££SNAKECHOP000360: open_garage 'HBGDSFS'0811: @0 = actor $PLAYER_ACTOR car00AB: put_car @0 at -2033.175 178.6755 30.00175: set_car @0 z_angle_to  90.001B4: set_player $PLAYER_CHAR frozen_state  0 (frozen)015F: set_camera_position  -2037.175 188.6755  33.8516  0.0  0.0  0.00158: camera_on_vehicle @0  15  20001: wait  2000 ms0615: @114 05B9: unknown_action_sequence -1  1000 05D1: unknown_action_sequence -1 @0 -2044.0  178.6755  27.8359  7.0  0  0  3 0633: unknown_action_sequence -1 0616: @114 0618: $PLAYER_ACTOR @114 061B: @114 062E: $PLAYER_ACTOR  1560 @105 0001: wait  3000 ms0361: close_garage 'HBGDSFS'0001: wait  500 ms016A: fade  0 ()  500 ms0001: wait  500 ms03E6: remove_text_box016A: fade  1 (back)  500 ms0362: remove_actor $PLAYER_ACTOR from_car_and_place_at  -2033.175 178.6755 27.85160441: @1 = car @0 model0227: @3 = car @0 health00A6: destroy_car @001C3: remove_references_to_car @001B4: set_player $PLAYER_CHAR frozen_state  1 (unfrozen)0373: set_camera_directly_behind_player02EB: restore_camera_with_jumpcut09E1: @1 @20016: @3 /= 1000068: @2 *= @30016: @2 /= 100016: @2 /= 100109: player $PLAYER_CHAR money += @201E3: text_1number_styled 'IE30' @2  5000 ms  1 0007:   $10900 ==  00002: jump ££SNAKECHOP00

 

 

I used $10900 as the flag (0 = not ok, 1 = ok), but with the current code, it doesn't reset it or something because it still doesn't require going outside of the range before re-entering. I know the distance code works cuz I tested it, but it just doesn't check wether you have changed the variable or not. But if you change the $10900 it either never works, or works when it shouldn't.... I'm extremely lost, but I think I had the right concept at least. There has to be an easier (working) way of doing this. Am I just using the wrong aproach (variable), is there an Op that would work??? Can ANYONE help??? confused.gifcryani.gif

Edited by NDG474
Link to comment
Share on other sites

I have no idea, I'm just a beginner. Actually, I abandoned the chop shop part of it for my game. I thought it was too cheap to just jack a car, drive it in, jack a car, drive it in, ect...

 

I'm focusing on the export business. I've finally found a way to put custom text on the screen. Now, instead of it just saying "Banshee" when you stand in the sphere it now says: "The next car in the list:" at the top of the screen and the car you're after on the bottom of the screen.

 

I've found modding both fun and frustrating, but mostly fun. Good luck.

 

Link to comment
Share on other sites

yeah, "fun and frustrating" is kind of what it's all about. biggrin.gif

 

NDG474, be sure to remember that this should stay in a loop code. sorry if i don't help you much with this comment, but it's much more helpful if you find it out yourself. biggrin.gif

Link to comment
Share on other sites

I could most likely figure out the code if I knew the structure to use. I have tried hundreds of different ways that logically make sense... I'm having trouble understanding why it isn't working, if someone could say why it doesn't work, maybe I could fix it smile.gif

 

Thanks for the suggestion, but I thought it was in a loop, do you mean all of it in ONE loop because I don't see how that could be possible...

Link to comment
Share on other sites

hmm, i suggest looking at the original missions code, it helps a lot smile.gif

Link to comment
Share on other sites

I figured it out, I was using the wrong OpCodes! tounge.gif

It's now working.. Let me know if anyone wants the code and I can post it when I return. Thanks for the help.

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.