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

Need help with CLEO mission script (game crashes)


serabella
 Share

Recommended Posts

Hello!

I'm back to modding after a long time and need some help. I'm trying to create a cleo mission but I can't get it to work (the game crashes shortly after the mission starts.)

This is the code which is supposed to start the mission:

{$CLEO .cs}thread 'HOMIES' :STARTwait 0 if    Player.Defined($PLAYER_CHAR)jf @STARTif   $ONMISSION == 0 jf @STARTif 00FF:   actor $PLAYER_ACTOR sphere 1 in_sphere 1279.9764 -831.1151 83.1406 radius 2.0 2.0 2.0 on_foot jf @STARTif    Player.Controllable($PLAYER_CHAR)jf @START$ONMISSION = 1 00BA: show_text_styled GXT 'TXT_01' time 3000 style 2 0A94: start_custom_mission "MEETTHEHOMIES"  :CHECKwait 0 if    Player.Defined($PLAYER_CHAR)jf @CHECK if   $ONMISSION == 0 jf @CHECK wait 10000 jump @START

I guess this part of the code works since the mission starts just fine.

This is the mission script:

{$CLEO .cm}thread "HOMIES" gosub @LOAD if wasted_or_busted jf @JUMPTOFAIL gosub @FAIL:JUMPTOFAILgosub @CLEANUP end_thread :LOADincrement_mission_attempts $ONMISSION = 1 Player.WantedLevel($PLAYER_CHAR) = 0Model.Load(#BMOST)Model.Load(#TEC9)Model.Load(#BLADE)023C: load_special_actor 'FORELLI' as 1 // models 290-299 023C: load_special_actor 'ROSE' as 2 // models 290-299 023C: load_special_actor 'SWEET' as 3 // models 290-299 :CHECKwait 0 if and   Model.Available(#BMOST)   Model.Available(#TEC9)   Model.Available(#BLADE)jf @CHECK:SPECACTORSif or823D:   not special_actor 1 loaded 823D:   not special_actor 2 loaded 823D:   not special_actor 3 loaded jf @SPAWNCAR wait 0 023C: load_special_actor 'FORELLI' as 1 // models 290-299 023C: load_special_actor 'ROSE' as 2 // models 290-299023C: load_special_actor 'SWEET' as 3 // models 290-299  jump @SPECACTORS :SPAWNCARActor.StorePos($PLAYER_ACTOR, [email protected], [email protected], [email protected])00A5: [email protected] = create_car #BLADE at 1371.963 -855.7698 42.4129 0175: set_car [email protected] Z_angle_to 210.00186: [email protected] = create_marker_above_car [email protected]: [email protected] = create_asset_radar_marker_with_icon 0 at 1371.963 -855.7698 42.4129   //Bilen man ska köra i början plus ikoner för den.009A: [email protected] = create_actor_pedtype 4 model #SPECIAL01 at 1574.6372 -1335.698 16.48440173: set_actor [email protected] Z_angle_to 315.0   //Dmitri009A: [email protected] = create_actor_pedtype 4 model #SPECIAL02 at 2252.8687 -1031.1582 56.41110173: set_actor [email protected] Z_angle_to 225.0   //Bull Douglas009A: [email protected] = create_actor_pedtype 4 model #SPECIAL03 at 2555.7424 -959.9698 82.68260173: set_actor [email protected] Z_angle_to 185.0    //Langos03BC: [email protected] = create_sphere_at 1582.6256 -1327.9235 16.4844 radius 2.0  //Dmitris hus03BC: [email protected] = create_sphere_at 2267.332 -1042.5715 51.0092 radius 2.0   //Bull Douglas hus03BC: [email protected] = create_sphere_at 2556.5618 -967.0579 82.5945 radius 2.0   //Langos huswait 50000BB: show_text_lowpriority GXT 'TXT_10' time 3000 flag 1 wait 1000:INCARif00DB:   actor $PLAYER_ACTOR in_car [email protected] @INCAR0570: [email protected] = create_asset_radar_marker_with_icon 0 at 1582.6256 -1327.9235 16.4844 //Markör vid Dmitri skapas.00BB: show_text_lowpriority GXT 'TXT_11' time 3000 flag 1 wait 1000:INDMITRISPHEREif 00F1:   actor $PLAYER_ACTOR sphere 0 near_point 1582.6256 -1327.9235 16.4844 radius 2.0 2.0 stopped_in_carjf  @INDMITRISPHERE05D3: AS_actor [email protected] goto_point [email protected] [email protected] [email protected] mode 4 time 3000 ms wait 3000036A: put_actor [email protected] in_car [email protected] 50000BB: show_text_lowpriority GXT 'TXT_12' time 3000 flag 1 wait 300000BB: show_text_lowpriority GXT 'TXT_13' time 3000 flag 1 wait 300000BB: show_text_lowpriority GXT 'TXT_14' time 3000 flag 1 wait 300000BB: show_text_lowpriority GXT 'TXT_15' time 3000 flag 1 wait 300000BB: show_text_lowpriority GXT 'TXT_16' time 3000 flag 1 wait 300000BB: show_text_lowpriority GXT 'TXT_17' time 3000 flag 1 wait 300000BB: show_text_lowpriority GXT 'TXT_18' time 3000 flag 1 wait 300000BB: show_text_lowpriority GXT 'TXT_19' time 3000 flag 1 wait 300000BB: show_text_lowpriority GXT 'TXT_20' time 3000 flag 1 wait 300000BB: show_text_lowpriority GXT 'TXT_21' time 3000 flag 1 wait 3000               //Dmitri går in i bilen och dom konversalerar lite.0570: [email protected] = create_asset_radar_marker_with_icon 0 at 2267.332 -1042.5715 51.0092   //Skapa ikon vid Bull Douglas.:INDOUGLASSPHEREif 00F1:   actor $PLAYER_ACTOR sphere 0 near_point 2267.332 -1042.5715 51.0092 radius 2.0 2.0 stopped_in_carjf  @INDOUGLASSPHERE05D3: AS_actor [email protected] goto_point [email protected] [email protected] [email protected] mode 4 time 3000 ms wait 3000036A: put_actor [email protected] in_car [email protected] 50000BB: show_text_lowpriority GXT 'TXT_22' time 3000 flag 1 wait 300000BB: show_text_lowpriority GXT 'TXT_23' time 3000 flag 1 wait 300000BB: show_text_lowpriority GXT 'TXT_24' time 3000 flag 1 wait 300000BB: show_text_lowpriority GXT 'TXT_25' time 3000 flag 1 wait 300000BB: show_text_lowpriority GXT 'TXT_26' time 3000 flag 1 wait 300000BB: show_text_lowpriority GXT 'TXT_27' time 3000 flag 1 wait 300000BB: show_text_lowpriority GXT 'TXT_28' time 3000 flag 1 wait 300000BB: show_text_lowpriority GXT 'TXT_29' time 3000 flag 1 wait 3000 //Bull Douglas hoppar in i bilen och ytterliggare en konversation.0570: [email protected] = create_asset_radar_marker_with_icon 0 at 2556.5618 -967.0579 82.5945   //Skapa ikon vid Langos.:INLANGOSSPHEREif 00F1:   actor $PLAYER_ACTOR sphere 0 near_point 2267.332 -1042.5715 51.0092 radius 2.0 2.0 stopped_in_carjf  @INLANGOSSPHERE05D3: AS_actor [email protected] goto_point [email protected] [email protected] [email protected] mode 4 time 3000 ms wait 3000036A: put_actor [email protected] in_car [email protected] 50000BB: show_text_lowpriority GXT 'TXT_30' time 3000 flag 1 wait 300000BB: show_text_lowpriority GXT 'TXT_31' time 3000 flag 1 wait 300000BB: show_text_lowpriority GXT 'TXT_32' time 3000 flag 1 wait 300000BB: show_text_lowpriority GXT 'TXT_33' time 3000 flag 1 wait 300000BB: show_text_lowpriority GXT 'TXT_34' time 3000 flag 1 wait 300000BB: show_text_lowpriority GXT 'TXT_35' time 3000 flag 1 wait 300000BB: show_text_lowpriority GXT 'TXT_36' time 3000 flag 1 wait 300000BB: show_text_lowpriority GXT 'TXT_37' time 3000 flag 1 wait 3000 //Langos hoppar in i bilen och ytterliggare en konversation.0570: [email protected] = create_asset_radar_marker_with_icon 0 at 2556.5618 -967.0579 82.5945   //Skapa ikon vid Grove Street.009A: [email protected] = create_actor_pedtype 4 model #BMOST at 2495.3616 -1685.6663 13.51320173: set_actor [email protected] Z_angle_to 356.0 03BC: [email protected] = create_sphere_at 2495.0933 -1682.2645 13.3388 radius 2.0   //Här ska vi hustla!:ATTHEGROVEif 00F1:   actor $PLAYER_ACTOR sphere 0 near_point 2267.332 -1042.5715 51.0092 radius 2.0 2.0 stopped_in_carjf  @ATTHEGROVE00BB: show_text_lowpriority GXT 'TXT_38' time 3000 flag 1 wait 300000BB: show_text_lowpriority GXT 'TXT_39' time 3000 flag 1 wait 5903BC: [email protected] = create_sphere_at 2494.96 -1684.6082 13.5108 radius 1.0   //Sphere precis vid killen vi ska prata med.:THEDEALif 0102:   actor $PLAYER_ACTOR in_sphere 2494.96 -1684.6082 13.5108 radius 1.0 1.0 1.0 sphere 1 stopped_on_footjf  @THEDEAL00BB: show_text_lowpriority GXT 'TXT_01' time 3000 flag 1 wait 300000BB: show_text_lowpriority GXT 'TXT_02' time 3000 flag 1 wait 300000BB: show_text_lowpriority GXT 'TXT_03' time 3000 flag 1 wait 300000BB: show_text_lowpriority GXT 'TXT_04' time 3000 flag 1 wait 300000BB: show_text_lowpriority GXT 'TXT_05' time 3000 flag 1 wait 300000BB: show_text_lowpriority GXT 'TXT_06' time 3000 flag 1 0109: player $PLAYER_CHAR money += 1000wait 300000BC: show_text_highpriority GXT 'TXT_08' time 3000 flag 1 //De pratar och vi säljer droger och får pengar.wait 300000BC: show_text_highpriority GXT 'TXT_40' time 3000 flag 1 //De pratar och vi säljer droger och får pengar.:INCARAGAINif00DB:   actor $PLAYER_ACTOR in_car [email protected] @INCARAGAIN00BB: show_text_lowpriority GXT 'TXT_41' time 3000 flag 1 wait 300000BB: show_text_lowpriority GXT 'TXT_42' time 3000 flag 1 wait 300000BB: show_text_lowpriority GXT 'TXT_43' time 3000 flag 1 wait 30000633: AS_actor [email protected] exit_carwait 5000634: AS_actor [email protected] attack_using_weapon_actor [email protected] flags 4 perform_actions_after_time 20000 chance_of_action 100wait 300005E2: AS_actor [email protected] kill_actor [email protected] 1000:WIN_CHECKifActor.Dead([email protected])jf @WIN_CHECKwait 50jump @PASS:FAIL00BA: show_text_styled GXT 'M_FAIL' time 5000 style 1return :PASS01E3: show_text_1number_styled GXT 'M_PASS' number 100 time 5000 style 1  Player.Money($PLAYER_CHAR) += 100Player.ClearWantedLevel($PLAYER_CHAR)0394: play_music 1 030C: progress_made = 1 return :CLEANUP0296: unload_special_actor 10296: unload_special_actor 20296: unload_special_actor 3009B: destroy_actor [email protected]: destroy_actor [email protected]: destroy_actor [email protected]: destroy_actor [email protected]: destroy_car [email protected]

The mission starts and I can see the text in the beginning and how an Icon is created on the radar but shortly after, the game crashes. Could a kind soul help a fellow modder out? :)

Link to comment
Share on other sites

There're 8 mini loops which need a wait

 

first one:

:INCARwait 0if00DB:   actor $PLAYER_ACTOR in_car [email protected] @INCAR
:INCAR <-- is a "Loop adress"wait 0  <---- need a wait time as following of a "Loop adress"if00DB:   actor $PLAYER_ACTOR in_car [email protected] @INCAR <-- jumps to a previous adress, so :INCAR is a "Loop adress"

second one:

:INDMITRISPHEREwait 0if 00F1:   actor $PLAYER_ACTOR sphere 0 near_point 1582.6256 -1327.9235 16.4844 radius 2.0 2.0 stopped_in_carjf  @INDMITRISPHERE

3th, 4th, 5th, 6th, 7th and 8th do you have to find by yourself

 

and the cleanup block must end with return:

:CLEANUP0296: unload_special_actor 10296: unload_special_actor 20296: unload_special_actor 3009B: destroy_actor [email protected]: destroy_actor [email protected]: destroy_actor [email protected]: destroy_actor [email protected]: destroy_car [email protected]//  <----------------------------- !!!
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.