Rocker453 Posted May 9, 2011 Share Posted May 9, 2011 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 More sharing options...
ZAZ Posted May 9, 2011 Share Posted May 9, 2011 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 CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
Rocker453 Posted May 9, 2011 Author Share Posted May 9, 2011 (edited) 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 May 9, 2011 by Rocker453 Link to comment Share on other sites More sharing options...
aStiffSausage Posted May 9, 2011 Share Posted May 9, 2011 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 More sharing options...
ZAZ Posted May 9, 2011 Share Posted May 9, 2011 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 CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
lolleroz Posted May 9, 2011 Share Posted May 9, 2011 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 More sharing options...
BnB Posted May 10, 2011 Share Posted May 10, 2011 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. Link to comment Share on other sites More sharing options...
OrionSR Posted May 10, 2011 Share Posted May 10, 2011 (edited) 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 May 10, 2011 by OrionSR Link to comment Share on other sites More sharing options...
Rocker453 Posted May 10, 2011 Author Share Posted May 10, 2011 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. It was supposed to be [email protected] instead of [email protected] Link to comment Share on other sites More sharing options...
Rocker453 Posted May 10, 2011 Author Share Posted May 10, 2011 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 More sharing options...
Rocker453 Posted May 12, 2011 Author Share Posted May 12, 2011 // 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 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