Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. The Diamond Casino Heist
      2. Find Lobbies & Players
      3. Guides & Strategies
      4. Vehicles
      5. Content Creator
      6. Help & Support
    2. Red Dead Online

      1. Frontier Pursuits
      2. Find Lobbies & Outlaws
      3. Help & Support
    3. Crews

    1. Red Dead Redemption 2

      1. PC
      2. Gameplay
      3. Missions
      4. Help & Support
    2. Red Dead Redemption

    1. Grand Theft Auto Series

    2. GTA 6

      1. St Andrews Cathedral
    3. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA Chinatown Wars

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
    9. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
    10. GTA III

      1. Guides & Strategies
      2. Help & Support
    11. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    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. DYOM
      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
    3. Gangs

    1. Announcements

    2. Support

    3. Suggestions

Sign in to follow this  
nubbel

Carmods (opcodes)

Recommended Posts

nubbel

Hi,

I spend a lot of time searching the original MAIN.SCM, the forum, google and the (in my opinion very bad) database sa-db.webtools4you.net.

What I'm searching for are opcodes for getting a cars mods (like nitro, colors, exhausts, spoilers, etc).

 

What I found from the forum and due to MAIN.SCM search:

 

 

03F3: get_car $car color $col1 $col2

 

Gets the 2 colors of a car.

 

 

0988: $pjob $car

 

Gets the special paintjob of a car ($pjob = -1 if it doesnt have one)

 

 

06ED: $car $pjob

 

Sets the special paintjob 0-5 for a car (-1 = no paintjob/delte)

 

 

00D6: if  0096E:   car $car lowrider

 

Checks if a car is a lowrider. (Not yet sure if it means that a car HAS hydraulics or CAN HAVE hydraulics/is car group "lowrider")

 

 

09B3: $car $doorstatus

 

Seems to get the doorstatus of a car.

 

 

06E5: $car $retval1 $retval2

 

Gets unknown information from car.

 

 

06EC: $car $retval

 

Gets unknown information from car.

 

 

097D: get $car $retval

 

Gets unknown information from car.

 

 

06E9: request_car_component #MODNAME06E7: $var = add_car_component #MODNAME to_car $car

 

Requests special mods from veh_mods.ide and adds it to a car.

 

While searching for these opcodes, I found one new sound-related opcode:

 

097A: @1 @2 @3  1133

 

Creates sound "1133" origin @1=X @2=Y @3=Z.

 

I tried really hard to find some, but wasn very successful. If someone wants to help and doesnt have the original SA MAIN.SCM, here is the external script "CARMOD": CARMOD.TXT

 

Did anyone of you find further opcodes for carmods?

 

Thanks and regards,

nubbel

Share this post


Link to post
Share on other sites
superglitch
Just bumping the thread because it deserves a bump because we need figure this sh*t out

Share this post


Link to post
Share on other sites
random_download

... there is no need to bump a thread after 1 day.

 

Try some of those unknown opcodes and see what they do, one of them could be what you are looking for.

Share this post


Link to post
Share on other sites
nubbel

YAY, found them xmas.gif

 

This opcode checks if $car has carmod $id.

 

096D: $car $id $retval

 

 

$id can be from 0 to 10 and 12 to 15. (Not sure about 11 and 16)

 

 

$id  0 = Hood          ; $retval -1 = not active - GXT string 'CARM3'$id  1 = Vents         ; $retval -1 = not active - GXT string 'CARM17'$id  2 = Spoilers      ; $retval -1 = not active - GXT string 'CARM2'$id  3 = Side Skirts   ; $retval -1 = not active - GXT string 'CARM4'$id  4 = Front bullbars; $retval -1 = not active - GXT string 'CARM13'$id  5 = Rear bullbars ; $retval -1 = not active - GXT string 'CARM14'$id  6 = Lights        ; $retval -1 = not active - GXT string 'CARM9'$id  7 = Roof          ; $retval -1 = not active - GXT string 'CARM10'$id  8 = Nitro         ; $retval -1 = not active - GXT string 'CARM6'$id  9 = Hydraulics    ; $retval -1 = not active - GXT string 'CARM18'$id 10 = Car Stereo    ; $retval -1 = not active - GXT string 'CARM16'$id 12 = Wheels        ; $retval -1 = not active - GXT string 'CARM12'$id 13 = Exhausts      ; $retval -1 = not active - GXT string 'CARM5'$id 14 = Front Bumper  ; $retval -1 = not active - GXT string 'CARM7'$id 15 = Rear Bumper   ; $retval -1 = not active - GXT string 'CARM8'$id 16 = Misc          ; $retval -1 = not active - GXT string 'CARM15'

 

 

The following opcode seems to check if a car CAN HAVE carmod $id:

 

06E5: $car $id $retval

 

$retval = -1 = car can't have carmod $id

 

Thats cool, isnt it ?!? catspider.gif

 

 

Here a little code to display the present carmods of your current car:

 

;--------------------------------------------------; Press "Secondary Fire" while in a car; to get the list of present carmods of your car;--------------------------------------------------:ModCheck0004: @1 = 00004: @2 = 00005: @4 = 20.0:ModCheck_10001: wait  0 ms00D6: if  00256:   player $PLAYER_CHAR defined004D: jump_if_false ££ModCheck_100D6: if  100DF:   actor $PLAYER_ACTOR driving00E1:   key_pressed  0  4          ; Secondary Fire004D: jump_if_false ££ModCheck_10811: @0 = actor $PLAYER_ACTOR car 03F0: text_draw_toggle  10001: wait  50 ms03F0: text_draw_toggle  00001: wait  50 ms:ModCheck_loop0001: wait  0 ms00D6: if  0001A:    16 > @1       ; Check Carmods 0 to 15004D: jump_if_false ££ModCheck_10096D: @0  @1  @3       ; @3 = Get Car Mod @100D6: if  00038:    @3 == -1  ; Mod not active... ?004D: jump_if_false ££ModCheck_20004: @3 = 0           ; ...then Output 0:ModCheck_20343: set_text_linewidth  600.0:ModCheck_00000D6: if  00038:   @1 ==  0004D: jump_if_false ££ModCheck_001033E: text_draw  20.0  @4 'CARM3'                 ; Hood045A: text_draw_1number  160.0  @4 'NUMBER' @3    ; value000B: @4 += 20.00002: jump ££ModCheck_017:ModCheck_00100D6: if  00038:   @1 ==  1004D: jump_if_false ££ModCheck_002033E: text_draw  20.0  @4 'CARM17'                ; Vents045A: text_draw_1number  160.0  @4 'NUMBER' @3    ; value000B: @4 += 20.00002: jump ££ModCheck_017:ModCheck_00200D6: if  00038:   @1 ==  2004D: jump_if_false ££ModCheck_003033E: text_draw  20.0  @4 'CARM2'                 ; Spoilers045A: text_draw_1number  160.0  @4 'NUMBER' @3    ; value000B: @4 += 20.00002: jump ££ModCheck_017:ModCheck_00300D6: if  00038:   @1 ==  3004D: jump_if_false ££ModCheck_004033E: text_draw  20.0  @4 'CARM4'                 ; Side Skirts045A: text_draw_1number  160.0  @4 'NUMBER' @3    ; value000B: @4 += 20.00002: jump ££ModCheck_017:ModCheck_00400D6: if  00038:   @1 ==  4004D: jump_if_false ££ModCheck_005033E: text_draw  20.0  @4 'CARM13'                ; Front bullbars045A: text_draw_1number  160.0  @4 'NUMBER' @3    ; value000B: @4 += 20.00002: jump ££ModCheck_017:ModCheck_00500D6: if  00038:   @1 ==  5004D: jump_if_false ££ModCheck_006033E: text_draw  20.0  @4 'CARM14'                ; Rear bullbars045A: text_draw_1number  160.0  @4 'NUMBER' @3    ; value000B: @4 += 20.00002: jump ££ModCheck_017:ModCheck_00600D6: if  00038:   @1 ==  6004D: jump_if_false ££ModCheck_007033E: text_draw  20.0  @4 'CARM9'                 ; Lights045A: text_draw_1number  160.0  @4 'NUMBER' @3    ; value000B: @4 += 20.00002: jump ££ModCheck_017:ModCheck_00700D6: if  00038:   @1 ==  7004D: jump_if_false ££ModCheck_008033E: text_draw  20.0  @4 'CARM10'                ;  Roof045A: text_draw_1number  160.0  @4 'NUMBER' @3    ; value000B: @4 += 20.00002: jump ££ModCheck_017:ModCheck_00800D6: if  00038:   @1 ==  8004D: jump_if_false ££ModCheck_009033E: text_draw  20.0  @4 'CARM6'                 ; Nitro045A: text_draw_1number  160.0  @4 'NUMBER' @3    ; value000B: @4 += 20.00002: jump ££ModCheck_017:ModCheck_00900D6: if  00038:   @1 ==  9004D: jump_if_false ££ModCheck_010033E: text_draw  20.0  @4 'CARM18'                ; Hydraulics045A: text_draw_1number  160.0  @4 'NUMBER' @3    ; value000B: @4 += 20.00002: jump ££ModCheck_017:ModCheck_01000D6: if  00038:   @1 ==  10004D: jump_if_false ££ModCheck_011033E: text_draw  20.0  @4 'CARM16'                ; Car Stereo045A: text_draw_1number  160.0  @4 'NUMBER' @3    ; value000B: @4 += 20.00002: jump ££ModCheck_017:ModCheck_01100D6: if  00038:   @1 ==  11004D: jump_if_false ££ModCheck_0120002: jump ££ModCheck_017:ModCheck_01200D6: if  00038:   @1 ==  12004D: jump_if_false ££ModCheck_013033E: text_draw  20.0  @4 'CARM12'                ; Wheels045A: text_draw_1number  160.0  @4 'NUMBER' @3    ; value000B: @4 += 20.00002: jump ££ModCheck_017:ModCheck_01300D6: if  00038:   @1 ==  13004D: jump_if_false ££ModCheck_014033E: text_draw  20.0  @4 'CARM5'                 ; Exhausts045A: text_draw_1number  160.0  @4 'NUMBER' @3    ; value000B: @4 += 20.00002: jump ££ModCheck_017:ModCheck_01400D6: if  00038:   @1 ==  14004D: jump_if_false ££ModCheck_015033E: text_draw  20.0  @4 'CARM7'                 ; Front Bumper045A: text_draw_1number  160.0  @4 'NUMBER' @3    ; value000B: @4 += 20.00002: jump ££ModCheck_017:ModCheck_01500D6: if  00038:   @1 ==  15004D: jump_if_false ££ModCheck_017033E: text_draw  20.0  @4 'CARM8'                 ; Rear Bumper045A: text_draw_1number  160.0  @4 'NUMBER' @3    ; value000B: @4 += 20.0:ModCheck_0170008: @1 +=  10002: jump ££ModCheck_loop:ModCheck_Keytrap0001: wait  150 ms00D6: if  080E1:    NOT key_pressed  0  4        ; Secondary Fire004D: jump_if_false ££ModCheck_Keytrap:ModCheck_10 0002: jump ££ModCheck;----------------------------------------------------------------------------------

 

Edited by nubbel

Share this post


Link to post
Share on other sites
Demarest
Thats cool, isnt it ?!?

No.

 

 

 

 

 

 

It's VERY cool! catloaf_by_anuj.gif You've answered the cries of many. Good work my friend.

 

Everybody look at the guy and see what you can accomplish when you set your mind to it!

Share this post


Link to post
Share on other sites
Quadropheniac90
Great work, nubbel! I wish I discovered something but how, entering an unknown opcode and let it make a sound if true or something...

Share this post


Link to post
Share on other sites
Demarest

Depends. Just about every unknown I've discovered was fairly straight forward. You see it, you know where it is in game, you think you understand what it does. So you whip up a stripped SCM and test your theories. Once you're certain, post it.

 

For opcodes like the ones nubbel unveiled though, it takes a LOT more digging and patience. He no doubt spent a lot of time on that. cookie.gif

Share this post


Link to post
Share on other sites
nubbel

 

For opcodes like the ones nubbel unveiled though, it takes a LOT more digging and patience. He no doubt spent a lot of time on that. cookie.gif

Thats true. Plus, infact I only found that one out because i got enaugh sleep this time Shifty41s_beerhatsmilie2.gif

 

I spent lots of hours/days reading through the carmod code, trying to understand main parts, following all jumps and stuff.

Share this post


Link to post
Share on other sites
Demarest
Well you'll notice that the people that invest the most time for the sake of others/the community are the most well known. Because you're not JUST creating, you're helping others to create. I'm very proud of you for sticking with it smile.gif

Share this post


Link to post
Share on other sites
superglitch

Yay Carmod saving car parks!!!! Well eventually, great job nubbel.

 

I going to try working on a smaller garage code, becasue the current one is huge.

Share this post


Link to post
Share on other sites
Demarest
This opcode checks if $car has carmod $id.

 

096D: $car $id $retval

 

That makes it sound as if it is a conditional, but it's not. Maybe something like

 

096D: store_car $CAR mod $NUM in $VAL

Share this post


Link to post
Share on other sites
nubbel

Well, its like:

 

 

096D: $veh_mod = get_carmod_from_car $car category $category 

 

 

or something...I dont care about these things tounge.gif

 

$category is a category like Hood, Spoiler, Wheels, etc.

If the $car hasnt got a mod from category $category, then $veh_mod is "-1", else it is the veh_mod id referred to in the "\data\maps\veh_mods\veh_mods.ide" file.

Share this post


Link to post
Share on other sites
Demarest
If you change the order of the variables, you'd also have to change the order in scm.ini. Tis better to just name it in the order hundreds or thousands of Builders are already looking for it.

Share this post


Link to post
Share on other sites
ZAZ

 

What I'm searching for are opcodes for getting a cars mods (like nitro, colors, exhausts, spoilers, etc).

 

What I found from the forum and due to MAIN.SCM search:

 

Aller erst Sahne ! cookie.gif

Whats your aktually playground ? Do you work on stripped main ?

Share this post


Link to post
Share on other sites
Demarest
I would think not if he's hit the barrier already.

Share this post


Link to post
Share on other sites
sueey

many bugs ,when i used,game crashed

Share this post


Link to post
Share on other sites
Demarest
When you used what exactly? If you're talking about his mod display code above, it kind of looks buggy. I imagine he just wanted to throw something together real quick to show off his discovery. Can't blame him for that smile.gif

Share this post


Link to post
Share on other sites
sueey

when i use the code,i get on the BMX.Game Crashed,oh ,my god,i thought that "Jigga what"before~~now,gosh

 

;--------------------------------------------------; Press "Secondary Fire" while in a car; to get the list of present carmods of your car;--------------------------------------------------:ModCheck0004: @1 = 00004: @2 = 00005: @4 = 20.0:ModCheck_10001: wait  0 ms00D6: if  00256:   player $PLAYER_CHAR defined004D: jump_if_false ££ModCheck_100D6: if  100DF:   actor $PLAYER_ACTOR driving00E1:   key_pressed  0  4         ; Secondary Fire004D: jump_if_false ££ModCheck_10811: @0 = actor $PLAYER_ACTOR car 03F0: text_draw_toggle  10001: wait  50 ms03F0: text_draw_toggle  00001: wait  50 ms:ModCheck_loop0001: wait  0 ms00D6: if  0001A:    16 > @1      ; Check Carmods 0 to 15004D: jump_if_false ££ModCheck_10096D: @0  @1  @3      ; @3 = Get Car Mod @100D6: if  00038:    @3 == -1 ; Mod not active... ?004D: jump_if_false ££ModCheck_20004: @3 = 0          ; ...then Output 0:ModCheck_20343: set_text_linewidth  600.0:ModCheck_00000D6: if  00038:   @1 ==  0004D: jump_if_false ££ModCheck_001033E: text_draw  20.0  @4 'CARM3'                ; Hood045A: text_draw_1number  160.0  @4 'NUMBER' @3   ; value000B: @4 += 20.00002: jump ££ModCheck_017:ModCheck_00100D6: if  00038:   @1 ==  1004D: jump_if_false ££ModCheck_002033E: text_draw  20.0  @4 'CARM17'               ; Vents045A: text_draw_1number  160.0  @4 'NUMBER' @3   ; value000B: @4 += 20.00002: jump ££ModCheck_017:ModCheck_00200D6: if  00038:   @1 ==  2004D: jump_if_false ££ModCheck_003033E: text_draw  20.0  @4 'CARM2'                ; Spoilers045A: text_draw_1number  160.0  @4 'NUMBER' @3   ; value000B: @4 += 20.00002: jump ££ModCheck_017:ModCheck_00300D6: if  00038:   @1 ==  3004D: jump_if_false ££ModCheck_004033E: text_draw  20.0  @4 'CARM4'                ; Side Skirts045A: text_draw_1number  160.0  @4 'NUMBER' @3   ; value000B: @4 += 20.00002: jump ££ModCheck_017:ModCheck_00400D6: if  00038:   @1 ==  4004D: jump_if_false ££ModCheck_005033E: text_draw  20.0  @4 'CARM13'               ; Front bullbars045A: text_draw_1number  160.0  @4 'NUMBER' @3   ; value000B: @4 += 20.00002: jump ££ModCheck_017:ModCheck_00500D6: if  00038:   @1 ==  5004D: jump_if_false ££ModCheck_006033E: text_draw  20.0  @4 'CARM14'               ; Rear bullbars045A: text_draw_1number  160.0  @4 'NUMBER' @3   ; value000B: @4 += 20.00002: jump ££ModCheck_017:ModCheck_00600D6: if  00038:   @1 ==  6004D: jump_if_false ££ModCheck_007033E: text_draw  20.0  @4 'CARM9'                ; Lights045A: text_draw_1number  160.0  @4 'NUMBER' @3   ; value000B: @4 += 20.00002: jump ££ModCheck_017:ModCheck_00700D6: if  00038:   @1 ==  7004D: jump_if_false ££ModCheck_008033E: text_draw  20.0  @4 'CARM10'               ;  Roof045A: text_draw_1number  160.0  @4 'NUMBER' @3   ; value000B: @4 += 20.00002: jump ££ModCheck_017:ModCheck_00800D6: if  00038:   @1 ==  8004D: jump_if_false ££ModCheck_009033E: text_draw  20.0  @4 'CARM6'                ; Nitro045A: text_draw_1number  160.0  @4 'NUMBER' @3   ; value000B: @4 += 20.00002: jump ££ModCheck_017:ModCheck_00900D6: if  00038:   @1 ==  9004D: jump_if_false ££ModCheck_010033E: text_draw  20.0  @4 'CARM18'               ; Hydraulics045A: text_draw_1number  160.0  @4 'NUMBER' @3   ; value000B: @4 += 20.00002: jump ££ModCheck_017:ModCheck_01000D6: if  00038:   @1 ==  10004D: jump_if_false ££ModCheck_011033E: text_draw  20.0  @4 'CARM16'               ; Car Stereo045A: text_draw_1number  160.0  @4 'NUMBER' @3   ; value000B: @4 += 20.00002: jump ££ModCheck_017:ModCheck_01100D6: if  00038:   @1 ==  11004D: jump_if_false ££ModCheck_0120002: jump ££ModCheck_017:ModCheck_01200D6: if  00038:   @1 ==  12004D: jump_if_false ££ModCheck_013033E: text_draw  20.0  @4 'CARM12'               ; Wheels045A: text_draw_1number  160.0  @4 'NUMBER' @3   ; value000B: @4 += 20.00002: jump ££ModCheck_017:ModCheck_01300D6: if  00038:   @1 ==  13004D: jump_if_false ££ModCheck_014033E: text_draw  20.0  @4 'CARM5'                ; Exhausts045A: text_draw_1number  160.0  @4 'NUMBER' @3   ; value000B: @4 += 20.00002: jump ££ModCheck_017:ModCheck_01400D6: if  00038:   @1 ==  14004D: jump_if_false ££ModCheck_015033E: text_draw  20.0  @4 'CARM7'                ; Front Bumper045A: text_draw_1number  160.0  @4 'NUMBER' @3   ; value000B: @4 += 20.00002: jump ££ModCheck_017:ModCheck_01500D6: if  00038:   @1 ==  15004D: jump_if_false ££ModCheck_017033E: text_draw  20.0  @4 'CARM8'                ; Rear Bumper045A: text_draw_1number  160.0  @4 'NUMBER' @3   ; value000B: @4 += 20.0:ModCheck_0170008: @1 +=  10002: jump ££ModCheck_loop:ModCheck_Keytrap0001: wait  150 ms00D6: if  080E1:    NOT key_pressed  0  4       ; Secondary Fire004D: jump_if_false ££ModCheck_Keytrap:ModCheck_10 0002: jump ££ModCheck;----------------------------------------------------------------------------------

 

 

Share this post


Link to post
Share on other sites
DaEllum67

 

many bugs ,when i used,game crashed

This isn't a mod. This thread displays newly-discovered opcodes. These opcodes don't have bugs, you're using them incorrectly.

hat code is not intended to be a mod. If you crash 4-5 seconds after you get on the BMX in the start, there aren't any bugs in the code, you've added too many mods & codes to your main.scm, hitting San Andreas's hard coded limits.

Edited by DaEllum67

Share this post


Link to post
Share on other sites
sueey

OH,I see~~~~~~~~~~~ blush.gifblush.gifblush.gif

Share this post


Link to post
Share on other sites
sbn

Very nice discovery. You did an excelent job with this! Here you go have a cookie.gif

Share this post


Link to post
Share on other sites
sueey

Still crashed,i use the Orinigal SCM,but it crashed the SA,man.............. rampage_ani.gif

Share this post


Link to post
Share on other sites
Demarest
Were you trying to use a savegame or something? You can't just walk in and make somebody look incompetent. Post what you did exactly so we can find the real problem, eh?

Share this post


Link to post
Share on other sites
spaceeinstein
Stop using the original SCM. Use a stripped SCM.

Share this post


Link to post
Share on other sites
PatrickW

Nubbel, I like you for what you did with your garage code,

but I love you for finding this... inlove.gif

Please keep investigating, and try to break the barriers...

Share this post


Link to post
Share on other sites
nubbel

Thank you, I'm feeling happy that I was able to find these out and that you now can use it. inlove.gif

Share this post


Link to post
Share on other sites
PatrickW

First of all: congratz on your karma stars, well deserved.. cookie.gifcookie.gif

 

Sparkled by your discoveries, I've done my own research into the carmod1 code,

and here's what I've come up with (excuse the format, but as I always study the R* code in my own privat format (C-like syntax) I also use that to jot down my findings. )

I've been starting from scratch again, mainly for the challenge, and also to be better able to verify your findings. So names might differ, but you get to decide the naming, as you discovered them.. )

 

// generic opcodes used for carmods/clothes/barbers/tatoos/junkfood // mod_id's are defined in shopping.dat075e = set_current_shop( 'CARMOD3' );   // as defined in shopping.dat 075d = set_current_shoptype( 'CARMODS' ); //as defined in shopping.dat075f = get number_of_mods( &num_mods );  // in current shop 0760 = obtain_mod_id( index, &mod_id );      // from current shop 0761 = get_modprice( mod_id, &mod_price ); 078c = get_modname( mod_id, &mod_name ); // carmod specific opcodes// mod_id's are defined in shopping.dat// mod_type, as defined in table of nubbel (1-16)06ec = get_number_of_paintjobs( car, &num_pjobs); 06ed = set_car_paintjob( car, pjob_index ); 0988 = get_car_paintjob( car, &pjob_index );06e9 = load_carmod(mod_id); 06ea = is_carmod_loaded( mod_id ); 06eb = release_carmod(mod_id);06e6 = get_carmodtype( mod_id, &mod_type ); 096d = get_installed_carmod( car, mod_type, &mod_id); 06e7 = install_carmod( car, mod_id, &dummy_var);// the last param of 06e7 is never used in R* code, so I have no idea what it contains// misc. car-related opcodes 097d = get_numer_of_carcolors(car,&num_colors);   (only the result "0" is used in R* code meaning 'no_color', thus some testing needed ) 09b3 = get_door_status( car, &door_status ); 0441 = get_car_type( car, &car_type ); 

 

 

I've not done any testing with this, this is purely based on analysis of the code. It seems to match pretty well with what you found, with some white spots filled in.. and some extra opcodes that are also used in other "shops".

 

If something is unclear/wrong, just say so..

Share this post


Link to post
Share on other sites
nubbel

Good listing. Thanks for that, I didnt know what "06EC" and "097D" was for.

 

Also, did you check "06E5" ?

 

seems to be like:

 

06E5 = can_car_have_mod( car, mod_id, &retval );

 

 

 

 

First of all: congratz on your karma stars, well deserved..

Thank you for your commend tounge.gif

Edited by nubbel

Share this post


Link to post
Share on other sites
PatrickW

 

Also, did you check "06E5" ?

 

seems to be like:

 

06E5 = can_car_have_mod( car, mod_id, &retval );

 

 

I did look into that one, but I was unable to determine its meaning. The main problem is that it is only called once in the entire SCM file (from within a loop).

The problem I see is that neither of the 2nd and 3rd parameter are even initialised before calling this opcode.

This suggests that both are output parameters.

To be continued ( with some testing.. any takers ?)

Share this post


Link to post
Share on other sites
nubbel

For me it was like obvious, because:

 

 

0050: gosub £CARMOD_271200D6: if  08038:   NOT   $10481 ==  0004D: jump_if_false £CARMOD_123

 

 

That is done before all the modshop code is beeing executed, near to check if the player car is a lowrider, what doorstatus the car has, etc.

 

And the sub:

 

:CARMOD_2712...06E5: $10431 $10449($2515,16i) $10465($2515,16i) 00D6: if  08038:   NOT   $10465($2515,16i) == -1004D: jump_if_false £...0008: $10481 +=  1...

 

 

Checks 16 "things" what MUST be the 16 mod categories. ($10431 = player car, 16 categories, -1 = value if mod not available for the car)

 

If the car is allowed to use any of these 16 mods, $10481 will be over 0.

And the following label is jumped to when $10481 is 0, so the car cant have any mods attached to it:

 

 

:CARMOD_12300BC: text_highpriority 'MODNO2'  5000 ms  1 ; ~s~You cannot mod this vehicle.

 

 

tounge.gif

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • 2 Users Currently Viewing
    0 members, 0 Anonymous, 2 Guests

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.