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

VC car bomb CLEO help


goodModsRcool
 Share

Recommended Posts

goodModsRcool

I started putting together this car bomb CLEO and got it pretty much how I want it but there is a bug I can't seem to fix. I need a way for the script to jump to the beginning and remove references from car if Player is wasted or busted. It causes a game crash after being wasted or busted because the references to car are still in memory, I tried many ways but I don't know how to fix this. Here it is.

 

 

{$CLEO .cs}
//-------------MAIN---------------
0000: NOP
:NONAME_6
wait 0
if and
Player.Defined($PLAYER_CHAR)
00E0: player $PLAYER_CHAR driving
847E: not player $PLAYER_CHAR driving_a_motorbike
05EE: key_pressed 45 //VK_insert
else_jump @NONAME_6
03C1: [email protected] = player $PLAYER_CHAR car
03E2: actor $PLAYER_ACTOR exit_car
018C: play_sound 16 at 0.0 0.0 0.0
03E5: text_box 'bombON'
jump @NONAME_59
:NONAME_125
01C3: remove_references_to_car [email protected] // Like turning a car into any random car
jump @NONAME_6
:NONAME_59
wait 0
if
8442: not player $PLAYER_CHAR in_car [email protected]
else_jump @NONAME_59
jump @NONAME_77
:NONAME_77
wait 225
if
00E1: key_pressed 0 4
else_jump @NONAME_77
jump @check
:check
wait 0
if
8112: not wasted_or_busted
else_jump @NONAME_125
jump @NONAME_121
:NONAME_121
wait 0
018C: play_sound 16 at 0.0 0.0 0.0
wait 65
020B: explode_car [email protected]
0407: create_coordinate [email protected] [email protected] [email protected] from_car [email protected] offset 0.0 1.5 0.0
020C: create_explosion_with_radius 2 at [email protected] [email protected] [email protected]
0407: create_coordinate [email protected] [email protected] [email protected] from_car [email protected] offset 0.0 1.5 0.0
wait 30
020C: create_explosion_with_radius 1 at [email protected] [email protected] [email protected]
0407: create_coordinate [email protected] [email protected] [email protected] from_car [email protected] offset 0.0 1.5 0.0
wait 200
020C: create_explosion_with_radius 3 at [email protected] [email protected] [email protected]
0407: create_coordinate [email protected] [email protected] [email protected] from_car [email protected] offset 0.0 1.5 0.0
020C: create_explosion_with_radius 4 at [email protected] [email protected] [email protected]
jump @NONAME_6
Link to comment
Share on other sites

damn it!!!!!

i'm trying to fix it when i finished and if it works i'll show you

Edited by 4sinayousefi
Link to comment
Share on other sites

goodModsRcool

Thanks, the struggle is real HAHA, this is definitely one of the more rediculous bugs I've encountered in a simple script, because you would think there should be a simple way to tell the script to remove references and restart at the beginning if wasted or busted. I was awake until almost sunrise trying to figure this out with no luck. Drove me mad! HAHA

Link to comment
Share on other sites

ummm.......

i'm not good at scripting so much so i should test some strange codes. sorry mate!!!! because my GTA VC crashes because of some mapping edits

Link to comment
Share on other sites

8112: not wasted_or_busted works only in mission scripts, for cleo only in cm files

use Player.Defined($PLAYER_CHAR) in normal threads to check if player died or got arrested, use it always, in every loop

Edited by ZAZ
Link to comment
Share on other sites

goodModsRcool

I have tried Player.Defined($PLAYER_CHAR) to make this work but the bug still existed. It may just be a matter of me not knowing the proper spot to put that check. I tried many variations...seemed no matter where i tried to put the check, the bug still happened.

Edited by goodModsRcool
Link to comment
Share on other sites

You don't need 01c3 opcode. The car is already marked as not needed by the scrypt:

STORE_CAR_PLAYER_IS_IN_NO_SAVE is the command name of the 03c1. Key word is NO_SAVE.


I haven't looked at the rest of the code...

Edited by Jack
Link to comment
Share on other sites

i stripped it a little bit, works for me without bug

 

 

{$CLEO}thread 'CARBOMB'   :CARBOMB_6 wait 0 if   Player.Defined($PLAYER_CHAR)else_jump @CARBOMB_6   if and00E0:   player $PLAYER_CHAR driving847E:   not player $PLAYER_CHAR driving_a_motorbike 05EE:  key_pressed 66// 	b key else_jump @CARBOMB_603C1: [email protected] = player $PLAYER_CHAR car03E2: actor $PLAYER_ACTOR exit_car018C: play_sound 16 at 0.0 0.0 0.0//03E5: text_box 'bombON' 03E5: text_box 'FEM_ON'    :CARBOMB_59wait 0 if   Player.Defined($PLAYER_CHAR)else_jump @CARBOMB_6if8119:   not car [email protected] wreckedelse_jump @CARBOMB_6  if and8442:   not player $PLAYER_CHAR in_car [email protected]:   key_pressed 0 4//  action key /Radio  else_jump @CARBOMB_59   wait 0018C: play_sound 16 at 0.0 0.0 0.0wait 65020B: explode_car [email protected]: create_coordinate [email protected] [email protected] [email protected] from_car [email protected] offset 0.0 1.5 0.0 020C: create_explosion_with_radius 2 at [email protected] [email protected] [email protected]: create_coordinate [email protected] [email protected] [email protected] from_car [email protected] offset 0.0 1.5 0.0wait 30 020C: create_explosion_with_radius 1 at [email protected] [email protected] [email protected]: create_coordinate [email protected] [email protected] [email protected] from_car [email protected] offset 0.0 1.5 0.0wait 200 020C: create_explosion_with_radius 3 at [email protected] [email protected] [email protected]: create_coordinate [email protected] [email protected] [email protected] from_car [email protected] offset 0.0 1.5 0.0 020C: create_explosion_with_radius 4 at [email protected] [email protected] [email protected]  jump @CARBOMB_6
but it's not recommended to create_coordinate from_car after explode_car because the game removes wrecked cars from scriptable state Edited by ZAZ
Link to comment
Share on other sites

goodModsRcool

Is it possible that after being wasted or busted, car [email protected] is destroyed (does not exist anymore), and so on the keypress 0 4 when it jumps to :NONAME_121 it is trying to explode a car that does not exist anymore, and that is what is causing the crash? If so is there a way around this?

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.