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

Realistic Car Flip (NEED HELP)


Rocker453
 Share

Recommended Posts

Rocker453

I want to make a new mod with which vehicles do not catch fire when they are flipped. A very simple idea but difficult for me. I made it for the player's own car. Here's what I made:

 

// This file was decompiled using SASCM.INI published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007{$VERSION 3.1.0027}{$CLEO .cs}//-------------MAIN---------------thread 'lol' :lol_11wait 0Player.Defined($PLAYER_ACTOR)if00DF:   actor $PLAYER_ACTOR driving then03C0: [email protected] = actor $PLAYER_ACTOR car0227: [email protected] = car [email protected] health jump @lol_44endjump @lol_11:lol_44wait 0if and01F4:   car [email protected] flipped81F3:   not car [email protected] in_airthen           Car.Health([email protected]) = [email protected]: shake_camera 10 jump @lol_22endjump @lol_11:lol_22wait 0if and01F4:   car [email protected] flipped81F3:   not car [email protected] in_airthen                                  Car.Health([email protected]) = [email protected]: shake_camera 400851: set_actor $PLAYER_ACTOR decrease_health_by 1 flag 1wait 50Car.Health([email protected]) = [email protected] 50Car.Health([email protected]) = [email protected] @lol_22endjump @lol_11

 

 

However this only worked for the player's own car and not for other cars in traffic. For this purpose I tried to create something new to make this work for traffic cars as well. I made a new script but it isnt working and I cant find what Im doing wrong. Here's what I want to get working:

 

 

// This file was decompiled using SASCM.INI published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007{$VERSION 3.1.0027}{$CLEO .cs}//-------------MAIN---------------thread 'lol' :lol_11wait 0Player.Defined($PLAYER_ACTOR)Actor.StorePos($PLAYER_ACTOR, [email protected], [email protected], [email protected])if   0AE2: [email protected] = random_vehicle_near_point [email protected] [email protected] [email protected] in_radius 100000.0 find_next 0 pass_wrecked 1   then   jump @lol_22endjump @lol_11:lol_22wait 0046C: [email protected] = car [email protected] driver0227: [email protected] = car [email protected] health   if and   01F4:   car [email protected] flipped   81F3:   not car [email protected] in_air   then                      Car.Health([email protected]) = [email protected]   0851: set_actor [email protected] decrease_health_by 1 flag 1endjump @lol_33:lol_33wait 0if0118:   actor [email protected] deadthenjump @lol_11endjump @lol_22

 

 

Any help would be appreciated!!

Link to comment
Share on other sites

I want to make a new mod with which vehicles do not catch fire when they are flipped.

 

However this only worked for the player's own car and not for other cars in traffic. For this purpose I tried to create something new to make this work for traffic cars as well. I made a new script but it isnt working and I cant find what Im doing wrong. Here's what I want to get working:

 

 

if   0AE2: [email protected] = random_vehicle_near_point [email protected] [email protected] [email protected] in_radius 100000.0 find_next 0 pass_wrecked 1   then

 

Any help would be appreciated!!

in_radius 100000.0 ?

give the car a marker to see where it is

Link to comment
Share on other sites

Rocker453

The script is making my game crash. As soon as the loading gets finished, the game crashes. So I cant actually see the car even if I add a marker.. The first problem to solve is the crashing.

Edited by Rocker453
Link to comment
Share on other sites

aStiffSausage
The script is making my game crash. As soon as the loading gets finished, the game crashes. So I cant actually see the car even if I add a marker.. The first problem to solve is the crashing.

I tried your script, the second one, with Cleo 4, and it crashed my game when I enter TransFenders (rotates the car somehow maybe) or when I did some jump where I got rotation.

Link to comment
Share on other sites

The script is making my game crash. As soon as the loading gets finished, the game crashes. So I cant actually see the car even if I add a marker.. The first problem to solve is the crashing.

Start with a simple script and get it working.

 

{$CLEO .cs}//-------------MAIN---------------thread 'lol':lol_11wait 0ifPlayer.Defined($PLAYER_ACTOR)jf @lol_11Actor.StorePos($PLAYER_ACTOR, [email protected], [email protected], [email protected])if  0AE2: [email protected] = random_vehicle_near_point [email protected] [email protected] [email protected] in_radius 100000.0 find_next 0 pass_wrecked 1  then  jump @lol_12endjump @lol_11:lol_120186: [email protected] = create_marker_above_car [email protected]:lol_13wait 0if Car.Wrecked([email protected])then0164: disable_marker [email protected]: remove_references_to_car [email protected] // Like turning a car into any random car jump @lol_11endjump @lol_13

 

Link to comment
Share on other sites

I'm very unexperienced in coding, but won't this change every car that is burning (exploding soon) to invincible, instead of setting it to invincible only if it falls over?

Link to comment
Share on other sites

I'm not sure if this helps, but I remembered reading this report in the GTA:SA Opcodes topic.

http://www.gtaforums.com/index.php?showtop...st&p=1059434553

 

 

Holy crap, something new I found!

 

03ED: $car 1

 

Prevents the car from blowing up while flipped over! But one catch: you cannot be inside it! If you are inside the flipped car, it will burn and blow like any other regular cars. Only empty and NPC-driven cars won't blow up while flipped. This also works in GTA3 and VC.

 

Added: In that second code in the first post. First the players X coord is stored in [email protected], and then [email protected] is used in the check to see if the car is flipped or in-air. That probably isn't what was intended.

Edited by OrionSR
Link to comment
Share on other sites

Added: In that second code in the first post. First the players X coord is stored in [email protected], and then [email protected] is used in the check to see if the car is flipped or in-air. That probably isn't what was intended.

Oh yeah, that wasnt intended. Its not like that in the original script I have. I just made this silly mistake in writing it over here. tounge.gif

 

It was supposed to be [email protected] instead of [email protected]

Link to comment
Share on other sites

You should use
03F5: set_car [email protected] apply_damage_rules 1 

The only damage/health related opcode that doesn't let the car explode when it's flipped.

Thanks for that. Ill try using this now.

Link to comment
Share on other sites

 

// This file was decompiled using SASCM.INI published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007{$VERSION 3.1.0027}{$CLEO .cs}//-------------MAIN---------------thread 'lol':FLIP_11wait 0if   Player.Defined($PLAYER_ACTOR)then   04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 1000.0 1000.0 0.0   04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset -1000.0 -1000.0 0.0   053E: [email protected] = get_random_car_with_model -1 in_rectangle_cornerA [email protected] [email protected] cornerB [email protected] [email protected] end   jump @FLIP_22:FLIP_22wait 0if   not Car.Defined([email protected])then   jump @FLIP_11endwait 0    if and  01F4:   car [email protected] flipped  81F3:   not car [email protected] in_airthen                    03F5: set_car [email protected] apply_damage_rules 0  03E5: show_text_box 'RREPAIR'  // Respect can be earned be passing certain missions, killing rival gangs members, gaining territory and tagging.endwait 0Car.RemoveReferences([email protected])wait 1000jump @FLIP_11

 

 

OK, so this is what I have made now after changing a few opcodes. Now, for some reason that I cant find out, this script is not working. All the cars that flip burn like they normally do even when the script is on. I added a text box to appear when the apply_damage_rules opcode is set to 0. But the text box never appears.

 

This means that 03F5: set_car [email protected] apply_damage_rules 0 isnt being used. Does anybody have any idea how to get this to work?

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.