KennyWTWL Posted Monday at 05:45 PM Share Posted Monday at 05:45 PM If this topic is in the wrong place, please put it to where it belong, thanks. So, After I've watched Vadim M's video about the mission Impounded, I said, maybe I should recreate that based on the Defective Edition's leaked source. So, I've got to work, started coding and all of that until I've finished it, however I did used Deezire's (shout-out to him btw) ending for the mission as a placeholder 'cuz I didn't think of how to make the ending play out. I've put it in the main.scm, started the game, and, It worked! kinda. Everything was going fine until, the cutscene ended, after the cutscene ended guess what, IT CRASHED! I made an another attempt and then the same result happened, however, It didn't crash like the first attempt, It just froze right after the cutscene, Just a black screen and a lonely button. I've tried making the mission as a CLEO script just so I won't be wasting valuable time for the mission, and then the same result happened, the one Interesting thing is though is after the cutscene, It showed me a black screen and the zone's name at the bottom left. So I'm really curious, did I do something wrong? and if you noticed I did, please please, please let me know. here's the script, I'm using sanny builder 3.90 beta version btw Spoiler {$CLEO .csi} :CESAR2 script_name 'CESAR2' gosub @CESAR2A if has_deatharrest_been_executed goto_if_false @CESAR2_1 gosub @CESAR2F :CESAR2_1 gosub @CESAR2B terminate_this_script :CESAR2A load_mission_text 'CESAR2' register_mission_given $ONMISSION = 1 load_cutscene 'CESAR2A' :CESAR2_2 if not has_cutscene_loaded goto_if_false @CESAR2_3 wait 0 goto @CESAR2_2 :CESAR2_3 start_cutscene do_fade 1 time 1000 :CESAR2_4 if not has_cutscene_finished goto_if_false @CESAR2_5 wait 0 goto @CESAR2_4 :CESAR2_5 do_fade 0 time 0 :CESAR2_6 if get_fading_status goto_if_false @CESAR2_7 wait 0 goto @CESAR2_6 :CESAR2_7 clear_cutscene load_mission_audio 10207 as 1 load_special_character 'CESAR' as 1 request_model #LAPD1 request_model #COPCARLA request_model #SAVANNA request_vehicle_mod #NTO_B_TW load_all_models_now :CESAR2_8 if or not has_model_loaded #LAPD1 not has_model_loaded #COPCARLA not has_model_loaded #SAVANNA goto_if_false @CESAR2_8B wait 0 goto @CESAR2_8 :CESAR2_8B if or not has_vehicle_mod_loaded #NTO_B_TW not has_mission_audio_loaded 1 not has_special_character_loaded 1 goto_if_false @CESAR2_9 wait 0 goto @CESAR2_8B :CESAR2_9 clear_area 1 at 1538.74 -1646.245 5.39 radius 5.0 create_car $3584 = create_car #SAVANNA at 1544.9288 -1643.4790 5.5100 set_car_heading $3584 Z_angle_to 0.0 set_char_coordinates $PLAYER_ACTOR at 1792.7500 -2119.9809 13.56 set_char_heading $PLAYER_ACTOR Z_angle_to 9.0 clear_area 1 at 1792.7500 -2119.9809 13.56 radius 20.5 create_char $132 = create_actor_pedtype 24 model #SPECIAL01 at 1794.8234 -2120.5268 13.54 set_char_heading $132 Z_angle_to 35.0 set_char_never_targeted $132 untargetable 1 set_char_health $132 health_to 500 set_char_suffers_critical_hits $132 dismemberment_possible 0 get_player_group $PLAYER_GROUP = player $PLAYER_CHAR set_group_member $132 in_group $PLAYER_GROUP set_player_group_recruitment $PLAYER_CHAR gang_recruitment_enabled 0 listen_to_player_group_commands $132 supporting_fire 0 set_player_group_to_follow_always $PLAYER_CHAR group_control_back 1 set_char_signal_after_kill $132 signal_after_kill 0 restore_camera_jumpcut set_camera_behind_player switch_widescreen 0 set_player_control $PLAYER_CHAR can_move 1 print_now 'CES2_01' time 5000 flag 1 // ~s~Head over to the ~y~Impound~s~ to retrive your ~b~car~s~. add_blip_for_coord $BLIPA = create_checkpoint_at 1525.7165 -1671.7780 12.99 $LINEA = 1 :CESAR2CHEAT if is_ps2_keyboard_key_pressed 83 goto_if_false @CESAR2_9B goto @CESAR2B :CESAR2_9B if is_char_dead $132 goto_if_false @CESAR2_10 clear_prints print_now 'SYN5_04' time 7000 flag 1 // ~r~Cesar has been killed! gosub @CESAR2F :CESAR2_10 if is_car_dead $3584 goto_if_false @CESAR2_11 clear_prints print_now 'CES2_16' time 7000 flag 1 // ~r~You're A One Dumb Motherf*cker gosub @CESAR2F :CESAR2_11 wait 10000 if and not locate_char_any_means_3d $PLAYER_ACTOR sphere 0 in_sphere 1525.7165 -1671.7780 12.99 radius 4.0 4.0 2.0 not locate_char_any_means_3d $132 sphere 0 in_sphere 1525.7165 -1671.7780 12.99 radius 4.0 4.0 2.0 goto_if_false @CESAR2_12 if and not is_char_dead $132 not is_car_dead $3584 goto_if_false @CESAR2_12 if and locate_char_any_means_char_3d $PLAYER_ACTOR near_actor $132 radius 60.0 60.0 20.0 sphere 0 $LINEA == 1 goto_if_false @CESAR2_12 play_mission_audio 1 print_now 'CES2_ZA' time 5000 flag 1 // Where to, Smoke? $LINEA = 2 :CESAR2_12 if has_mission_audio_finished 1 goto_if_false @CESAR2_12B if and not locate_char_any_means_3d $PLAYER_ACTOR sphere 0 in_sphere 1525.7165 -1671.7780 12.99 radius 4.0 4.0 2.0 not locate_char_any_means_3d $132 sphere 0 in_sphere 1525.7165 -1671.7780 12.99 radius 4.0 4.0 2.0 goto_if_false @CESAR2_12B if and not is_char_dead $132 not is_car_dead $3584 goto_if_false @CESAR2_12B if and locate_char_any_means_char_3d $PLAYER_ACTOR near_actor $132 radius 60.0 60.0 20.0 sphere 0 $LINEA == 2 goto_if_false @CESAR2_12B clear_mission_audio 1 load_mission_audio 10208 as 1 $LINEA = 3 :CESAR2_12B if has_mission_audio_loaded 1 goto_if_false @CESAR2_13 if and not locate_char_any_means_3d $PLAYER_ACTOR sphere 0 in_sphere 1525.7165 -1671.7780 12.99 radius 4.0 4.0 2.0 not locate_char_any_means_3d $132 sphere 0 in_sphere 1525.7165 -1671.7780 12.99 radius 4.0 4.0 2.0 goto_if_false @CESAR2_13 if and not is_char_dead $132 not is_car_dead $3584 goto_if_false @CESAR2_13 if and locate_char_any_means_char_3d $PLAYER_ACTOR near_actor $132 radius 60.0 60.0 20.0 sphere 0 $LINEA == 3 goto_if_false @CESAR2_13 play_mission_audio 1 print_now 'CES2_ZB' time 5000 flag 1 // Where to, Smoke? $LINEA = 4 :CESAR2_13 if has_mission_audio_finished 1 goto_if_false @CESAR2_13B if and not locate_char_any_means_3d $PLAYER_ACTOR sphere 0 in_sphere 1525.7165 -1671.7780 12.99 radius 4.0 4.0 2.0 not locate_char_any_means_3d $132 sphere 0 in_sphere 1525.7165 -1671.7780 12.99 radius 4.0 4.0 2.0 goto_if_false @CESAR2_13B if and not is_char_dead $132 not is_car_dead $3584 goto_if_false @CESAR2_13B if and locate_char_any_means_char_3d $PLAYER_ACTOR near_actor $132 radius 60.0 60.0 20.0 sphere 0 $LINEA == 4 goto_if_false @CESAR2_13B clear_mission_audio 1 load_mission_audio 10209 as 1 $LINEA = 5 :CESAR2_13B if has_mission_audio_loaded 1 goto_if_false @CESAR2_14 if and not locate_char_any_means_3d $PLAYER_ACTOR sphere 0 in_sphere 1525.7165 -1671.7780 12.99 radius 4.0 4.0 2.0 not locate_char_any_means_3d $132 sphere 0 in_sphere 1525.7165 -1671.7780 12.99 radius 4.0 4.0 2.0 goto_if_false @CESAR2_14 if and not is_char_dead $132 not is_car_dead $3584 goto_if_false @CESAR2_14 if and locate_char_any_means_char_3d $PLAYER_ACTOR near_actor $132 radius 60.0 60.0 20.0 sphere 0 $LINEA == 5 goto_if_false @CESAR2_14 play_mission_audio 1 print_now 'CES2_ZC' time 5000 flag 1 // Where to, Smoke? $LINEA = 6 :CESAR2_14 if has_mission_audio_finished 1 goto_if_false @CESAR2_14B if and not locate_char_any_means_3d $PLAYER_ACTOR sphere 0 in_sphere 1525.7165 -1671.7780 12.99 radius 4.0 4.0 2.0 not locate_char_any_means_3d $132 sphere 0 in_sphere 1525.7165 -1671.7780 12.99 radius 4.0 4.0 2.0 goto_if_false @CESAR2_14B if and not is_char_dead $132 not is_car_dead $3584 goto_if_false @CESAR2_14B if and locate_char_any_means_char_3d $PLAYER_ACTOR near_actor $132 radius 60.0 60.0 20.0 sphere 0 $LINEA == 6 goto_if_false @CESAR2_14B clear_mission_audio 1 load_mission_audio 10210 as 1 $LINEA = 7 :CESAR2_14B if has_mission_audio_loaded 1 goto_if_false @CESAR2_15 if and not locate_char_any_means_3d $PLAYER_ACTOR sphere 0 in_sphere 1525.7165 -1671.7780 12.99 radius 4.0 4.0 2.0 not locate_char_any_means_3d $132 sphere 0 in_sphere 1525.7165 -1671.7780 12.99 radius 4.0 4.0 2.0 goto_if_false @CESAR2_15 if and not is_char_dead $132 not is_car_dead $3584 goto_if_false @CESAR2_15 if and locate_char_any_means_char_3d $PLAYER_ACTOR near_actor $132 radius 60.0 60.0 20.0 sphere 0 $LINEA == 7 goto_if_false @CESAR2_15 play_mission_audio 1 print_now 'CES2_ZD' time 5000 flag 1 // Where to, Smoke? $LINEA = 8 :CESAR2_15 if has_mission_audio_finished 1 goto_if_false @CESAR2_15B if and not locate_char_any_means_3d $PLAYER_ACTOR sphere 0 in_sphere 1525.7165 -1671.7780 12.99 radius 4.0 4.0 2.0 not locate_char_any_means_3d $132 sphere 0 in_sphere 1525.7165 -1671.7780 12.99 radius 4.0 4.0 2.0 goto_if_false @CESAR2_15B if and not is_char_dead $132 not is_car_dead $3584 goto_if_false @CESAR2_15B if and locate_char_any_means_char_3d $PLAYER_ACTOR near_actor $132 radius 60.0 60.0 20.0 sphere 0 $LINEA == 8 goto_if_false @CESAR2_15B clear_mission_audio 1 load_mission_audio 10211 as 1 $LINEA = 9 :CESAR2_15B if has_mission_audio_loaded 1 goto_if_false @CESAR2_16 if and not locate_char_any_means_3d $PLAYER_ACTOR sphere 0 in_sphere 1525.7165 -1671.7780 12.99 radius 4.0 4.0 2.0 not locate_char_any_means_3d $132 sphere 0 in_sphere 1525.7165 -1671.7780 12.99 radius 4.0 4.0 2.0 goto_if_false @CESAR2_16 if and not is_char_dead $132 not is_car_dead $3584 goto_if_false @CESAR2_16 if and locate_char_any_means_char_3d $PLAYER_ACTOR near_actor $132 radius 60.0 60.0 20.0 sphere 0 $LINEA == 9 goto_if_false @CESAR2_16 play_mission_audio 1 print_now 'CES2_ZE' time 5000 flag 1 // Where to, Smoke? $LINEA = 10 :CESAR2_16 if has_mission_audio_finished 1 goto_if_false @CESAR2_16B if and not locate_char_any_means_3d $PLAYER_ACTOR sphere 0 in_sphere 1525.7165 -1671.7780 12.99 radius 4.0 4.0 2.0 not locate_char_any_means_3d $132 sphere 0 in_sphere 1525.7165 -1671.7780 12.99 radius 4.0 4.0 2.0 goto_if_false @CESAR2_16B if and not is_char_dead $132 not is_car_dead $3584 goto_if_false @CESAR2_16B if and locate_char_any_means_char_3d $PLAYER_ACTOR near_actor $132 radius 60.0 60.0 20.0 sphere 0 $LINEA == 10 goto_if_false @CESAR2_16B clear_mission_audio 1 load_mission_audio 10212 as 1 $LINEA = 11 :CESAR2_16B if has_mission_audio_loaded 1 goto_if_false @CESAR2_17 if and not locate_char_any_means_3d $PLAYER_ACTOR sphere 0 in_sphere 1525.7165 -1671.7780 12.99 radius 4.0 4.0 2.0 not locate_char_any_means_3d $132 sphere 0 in_sphere 1525.7165 -1671.7780 12.99 radius 4.0 4.0 2.0 goto_if_false @CESAR2_17 if and not is_char_dead $132 not is_car_dead $3584 goto_if_false @CESAR2_17 if and locate_char_any_means_char_3d $PLAYER_ACTOR near_actor $132 radius 60.0 60.0 20.0 sphere 0 $LINEA == 11 goto_if_false @CESAR2_17 play_mission_audio 1 print_now 'CES2_ZF' time 5000 flag 1 // Where to, Smoke? $LINEA = 12 :CESAR2_17 if has_mission_audio_finished 1 goto_if_false @CESAR2_17B if and not locate_char_any_means_3d $PLAYER_ACTOR sphere 0 in_sphere 1525.7165 -1671.7780 12.99 radius 4.0 4.0 2.0 not locate_char_any_means_3d $132 sphere 0 in_sphere 1525.7165 -1671.7780 12.99 radius 4.0 4.0 2.0 goto_if_false @CESAR2_17B if and not is_char_dead $132 not is_car_dead $3584 goto_if_false @CESAR2_17B if and locate_char_any_means_char_3d $PLAYER_ACTOR near_actor $132 radius 60.0 60.0 20.0 sphere 0 $LINEA == 12 goto_if_false @CESAR2_17B clear_mission_audio 1 load_mission_audio 10213 as 1 $LINEA = 13 :CESAR2_17B if has_mission_audio_loaded 1 goto_if_false @CESAR2_18 if and not locate_char_any_means_3d $PLAYER_ACTOR sphere 0 in_sphere 1525.7165 -1671.7780 12.99 radius 4.0 4.0 2.0 not locate_char_any_means_3d $132 sphere 0 in_sphere 1525.7165 -1671.7780 12.99 radius 4.0 4.0 2.0 goto_if_false @CESAR2_18 if and not is_char_dead $132 not is_car_dead $3584 goto_if_false @CESAR2_18 if and locate_char_any_means_char_3d $PLAYER_ACTOR near_actor $132 radius 60.0 60.0 20.0 sphere 0 $LINEA == 13 goto_if_false @CESAR2_18 play_mission_audio 1 print_now 'CES2_ZG' time 5000 flag 1 // Where to, Smoke? $LINEA = 14 :CESAR2_18 clear_mission_audio 1 generate_random_int_in_range $RANDOMA = random_int_in_ranges 0 4 if $RANDOMA == 0 goto_if_false @CESAR2_19 load_mission_audio 10406 as 1 goto @CESAR2_22 :CESAR2_19 if $RANDOMA == 1 goto_if_false @CESAR2_20 load_mission_audio 10407 as 1 goto @CESAR2_22 :CESAR2_20 if $RANDOMA == 2 goto_if_false @CESAR2_21 load_mission_audio 10408 as 1 goto @CESAR2_22 :CESAR2_21 if $RANDOMA == 3 goto_if_false @CESAR2_22 load_mission_audio 10409 as 1 :CESAR2_22 if not locate_char_any_means_char_3d $PLAYER_ACTOR near_actor $132 radius 60.0 60.0 20.0 sphere 0 goto_if_false @CESAR2_23 if $RANDOMA == 0 goto_if_false @CESAR2_23 play_mission_audio 1 print_now 'CESX_BA' time 5000 flag 1 // Wait up, CJ! goto @CESAR2_26 :CESAR2_23 if $RANDOMA == 1 goto_if_false @CESAR2_24 play_mission_audio 1 print_now 'CESX_BB' time 5000 flag 1 // Hang ten, CJ! goto @CESAR2_26 :CESAR2_24 if $RANDOMA == 2 goto_if_false @CESAR2_25 play_mission_audio 1 print_now 'CESX_BC' time 5000 flag 1 // Hold up, CJ! goto @CESAR2_26 :CESAR2_25 if $RANDOMA == 3 goto_if_false @CESAR2_26 play_mission_audio 1 print_now 'CESX_BD' time 5000 flag 1 // Slow down, Carl! :CESAR2_26 if has_mission_audio_finished 6 goto_if_false @CESAR2_27 if not is_char_dead $132 goto_if_false @CESAR2_27 if not locate_char_any_means_char_3d $PLAYER_ACTOR near_actor $132 radius 60.0 60.0 20.0 sphere 0 goto_if_false @CESAR2_27 remove_blip $BLIPA remove_blip $BLIPB add_blip_for_char $BLIPB = create_marker_above_actor $132 set_blip_as_friendly $BLIPB type_to 1 clear_prints print 'SYN5_10' time 7000 flag 1 // ~s~You have left ~b~Cesar~s~ behind. return :CESAR2_27 if locate_char_any_means_char_3d $PLAYER_ACTOR near_actor $132 radius 60.0 60.0 20.0 sphere 0 goto_if_false @CESAR2_28 remove_blip $BLIPB remove_blip $BLIPA add_blip_for_coord $BLIPA = create_checkpoint_at 1525.7165 -1671.7780 12.99 :CESAR2_28 if and locate_char_any_means_3d $PLAYER_ACTOR sphere 0 in_sphere 1525.7165 -1671.7780 12.99 radius 4.0 4.0 2.0 locate_char_any_means_3d $132 sphere 0 in_sphere 1525.7165 -1671.7780 12.99 radius 4.0 4.0 2.0 goto_if_false @CESAR2_29 clear_mission_audio 1 clear_mission_audio 2 load_mission_audio 37219 as 1 load_mission_audio 10214 as 2 :CESAR2_29 if or not has_mission_audio_loaded 1 not has_mission_audio_loaded 2 goto_if_false @CESAR2_30 wait 0 goto @CESAR2_29 :CESAR2_30 remove_blip $BLIPB remove_blip $BLIPA switch_widescreen 1 set_player_control $PLAYER_CHAR can_move 0 wait 100 play_mission_audio 1 print_now 'STL5_DC' time 4000 flag 1 :CESAR2_31 if has_mission_audio_finished 1 goto_if_false @CESAR2_32 goto @CESAR2_31 :CESAR2_32 remove_char_from_group $132 set_player_group_recruitment $PLAYER_CHAR gang_recruitment_enabled 1 clear_mission_audio 1 play_mission_audio 2 print_now 'CES2_ZH' time 4000 flag 1 :CESAR2_33 if has_mission_audio_finished 2 goto_if_false @CESAR2_34 goto @CESAR2_33 :CESAR2_34 clear_mission_audio 2 do_fade 0 time 1000 :CESAR2_35 if get_fading_status goto_if_false @CESAR2_36 wait 0 goto @CESAR2_35 :CESAR2_36 remove_char_elegantly $132 create_car $133 = create_car #COPCARLA at 1526.5773 -1597.7976 12.9606 set_car_heading $133 Z_angle_to 184.0 create_char_inside_car $134 = create_actor_pedtype 24 model #LAPD1 in_car $133 task_car_drive_to_coord $134 drive_car $133 to 1541.1567 -1626.380 12.9587 speed 15.0 0 model #NULL 0 set_fixed_camera_position 1517.683 -1623.163 21.7968 rotation 0.0 0.0 0.0 point_camera_at_point 1532.852 -1637.15 17.2813 switchstyle 2 request_collision 1532.852 -1637.15 load_scene 1517.683 -1623.163 21.7968 set_char_coordinates $PLAYER_ACTOR at 1522.9 -1617.6 13.5 set_char_heading $PLAYER_ACTOR Z_angle_to 270.0 :CESAR2_37 print_help 'CES2_03' $HELPA = 1 wait 5000 if and $HELPA == 1 locate_char_any_means_3d $134 sphere 0 in_sphere 1541.1567 -1626.380 12.9587 radius 4.0 4.0 2.0 goto_if_false @CESAR2_38 clear_prints print_help 'CES2_04' task_car_drive_to_coord $134 drive_car $133 to 1582.2609 -1628.250 12.9596 speed 15.0 0 model #NULL 0 set_fixed_camera_position 1580.2017 -1620.6673 13.3828 rotation 0.0 0.0 0.0 point_camera_at_car $133 mode 18 switchstyle 2 $HELPA = 2 :CESAR2_38 wait 5000 if and $HELPA == 2 locate_char_any_means_3d $134 sphere 0 in_sphere 1582.2609 -1628.250 12.9596 radius 4.0 4.0 2.0 goto_if_false @CESAR2_39 clear_prints print_help 'CES2_05' task_car_drive_to_coord $134 drive_car $133 to 1594.7054 -1690.4044 5.4903 speed 15.0 0 model #NULL 0 set_fixed_camera_position 1608.2651 -1719.1820 6.2187 rotation 11.33 11.33 11.34 $HELPA = 3 :CESAR2_39 wait 5000 if and $HELPA == 3 locate_char_any_means_3d $134 sphere 0 in_sphere 1594.7054 -1690.4044 5.4903 radius 4.0 4.0 2.0 goto_if_false @CESAR2_40 delete_car $133 remove_char_elegantly $134 clear_prints print_help 'CES2_06' set_fixed_camera_position 1580.2017 -1620.6673 13.3828 rotation 0.0 0.0 0.0 point_camera_at_car $3584 mode 18 switchstyle 2 $HELPA = 4 :CESAR2_40 wait 5000 if $HELPA == 4 goto_if_false @CESAR2_41 if is_char_dead $PLAYER_ACTOR goto_if_false @CESAR2_41 return :CESAR2_41 remove_blip $BLIPD set_camera_behind_player restore_camera_jumpcut switch_widescreen 0 set_player_control $PLAYER_CHAR can_move 1 add_blip_for_car $BLIPC = create_marker_above_car $3584 set_blip_as_friendly $BLIPC type_to 1 print_now 'CES2_02' time 6000 flag 1 return :CESAR2_41B if locate_char_any_means_3d $PLAYER_ACTOR sphere 0 in_sphere 1594.7054 -1690.4044 5.4903 radius 60.0 60.0 60.0 goto_if_false @CESAR2_42 print_now 'CES2_12' time 6000 flag 1 alter_wanted_level_no_drop $PLAYER_CHAR minimum_wanted_level_to 3 :CESAR2_42 if is_player_playing $PLAYER_CHAR goto_if_false @CESAR2_43 if is_wanted_level_greater $PLAYER_CHAR wanted_level > 0 goto_if_false @CESAR2_43 if not is_car_dead $3584 goto_if_false @CESAR2_43 if is_char_in_car $PLAYER_ACTOR in_car $3584 goto_if_false @CESAR2_43 remove_blip $BLIPC :CESAR2_43 if is_player_playing $PLAYER_CHAR goto_if_false @CESAR2_44 if not is_car_dead $3584 goto_if_false @CESAR2_44 if not is_char_in_car $PLAYER_ACTOR in_car $3584 goto_if_false @CESAR2_44 gosub @CESAR2_41 :CESAR2_44 if is_player_playing $PLAYER_CHAR goto_if_false @CESAR2_45 if not is_car_dead $3584 goto_if_false @CESAR2_45 if not is_wanted_level_greater $PLAYER_CHAR wanted_level > 0 goto_if_false @CESAR2_45 if is_char_in_car $PLAYER_ACTOR in_car $3584 goto_if_false @CESAR2_45 remove_blip $BLIPC add_blip_for_coord $BLIPD = create_checkpoint_at $479 $480 $481 :CESAR2_45 if is_player_playing $PLAYER_CHAR goto_if_false @CESAR2_46 if not is_car_dead $3584 goto_if_false @CESAR2_46 if not is_wanted_level_greater $PLAYER_CHAR wanted_level > 0 goto_if_false @CESAR2_46 if locate_char_any_means_3d $PLAYER_ACTOR sphere 1 in_sphere $479 $480 $481 radius 4.0 4.0 3.0 goto_if_false @CESAR2_46 if is_char_in_car $PLAYER_ACTOR in_car $3584 goto_if_false @CESAR2_46 remove_blip $BLIPC remove_blip $BLIPD do_fade 1 time 1000 :CESAR2_46 set_player_control $PLAYER_CHAR can_move 0 do_fade 0 time 1000 :CESAR2_47 if get_fading_status goto_if_false @CESAR2_48 wait 0 goto @CESAR2_47 :CESAR2_48 set_car_density_multiplier 0.0 set_ped_density_multiplier 0.0 warp_char_from_car_to_coord $PLAYER_ACTOR from_car_and_place_at 1803.716 -2120.992 13.5543 set_car_coordinates $3584 at 1793.68 -2128.68 12.55 set_car_heading $3584 Z_angle_to 0.189 create_char_inside_car $132 = create_actor_pedtype 4 model #SPECIAL01 in_car $3584 fix_car $3584 if does_car_have_hydraulics $3584 goto_if_false @CESAR2_49 goto @CESAR2_50 :CESAR2_49 set_car_hydraulics $3584 hydraulics 1 :CESAR2_50 load_mission_audio 37231 as 1 load_mission_audio 19037 as 2 :CESAR2_51 if or not has_mission_audio_loaded 1 not has_mission_audio_loaded 2 goto_if_false @CESAR2_52 wait 0 goto @CESAR2_51 :CESAR2_52 add_vehicle_mod $135 = add_car_component #NTO_B_TW to_car $3584 wait 1000 switch_widescreen 1 clear_area 1 at 1796.0 -2118.0 14.0 radius 15.0 do_fade 1 time 1500 set_fixed_camera_position 1786.331 -2120.066 12.8592 rotation 0.0 0.0 0.0 point_camera_at_point 1787.309 -2120.129 13.0548 switchstyle 2 give_non_player_car_nitro $3584 task_car_drive_to_coord $132 drive_car $3584 to 1809.031 -2115.867 13.0021 speed 20.0 0 model #NULL 2 play_mission_audio 1 print_now 'STL2_FH' time 4000 flag 1 :CESAR2_53 if not has_mission_audio_finished 1 goto_if_false @CESAR2_54 wait 0 goto @CESAR2_53 :CESAR2_54 play_mission_audio 2 print_now 'CES2_GJ' time 2000 flag 1 32@ = 0 :CESAR2_55 if or locate_car_3d $3584 sphere 0 in_sphere 1809.031 -2115.867 13.0021 radius 2.0 2.0 1.0 32@ > 6000 goto_if_false @CESAR2_56 goto @CESAR2_55 :CESAR2_56 wait 0 goto @CESAR2_55 :CESAR2_57 task_leave_car $132 exit_car $3584 task_turn_char_to_face_char $PLAYER_ACTOR rotate_to_actor $132 task_go_straight_to_coord $132 goto_point 1793.68 -2128.68 12.55 mode 4 time 8000 task_look_at_vehicle $PLAYER_ACTOR look_at_car $3584 3000 add_vehicle_mod $135 = add_car_component #NTO_B_TW to_car $3584 wait 3000 clear_mission_audio 1 clear_mission_audio 2 set_camera_behind_player switch_widescreen 0 set_player_control $PLAYER_CHAR can_move 1 restore_camera_jumpcut goto @CESAR2B :CESAR2F print_big 'M_FAIL' time 5000 style 1 // ~r~MISSION FAILED! $ONMISSION = 0 return :CESAR2B print_with_number_big 'M_PASSR' number 5 time 5000 style 1 // MISSION PASSED!~n~~w~RESPECT + clear_wanted_level $PLAYER_CHAR play_mission_passed_tune 1 register_mission_passed 'CESAR_2' // Impounded award_player_mission_respect 5 add_short_range_sprite_blip_for_coord $10993 = create_icon_marker 55 at 1579.6 -1635.398 17.9324 add_short_range_sprite_blip_for_coord $10992 = create_icon_marker 55 at -1617.4 680.573 17.1691 add_short_range_sprite_blip_for_coord $10991 = create_icon_marker 55 at 2268.9 2459.255 10.8203 remove_char_elegantly $132 delete_car $3584 delete_car $133 remove_char_elegantly $134 clear_mission_audio 1 clear_mission_audio 2 remove_blip $BLIPA remove_blip $BLIPB remove_blip $BLIPC remove_blip $BLIPB mark_model_as_no_longer_needed #LAPD1 mark_model_as_no_longer_needed #COPCARLA mark_model_as_no_longer_needed #SAVANNA mark_vehicle_mod_as_no_longer_needed #NTO_B_TW unload_special_character 1 set_car_density_multiplier 1.0 set_ped_density_multiplier 1.0 $ONMISSION = 0 get_game_timer $CURRENT_TIME_IN_MS mission_has_finished restore_camera_jumpcut set_player_control $PLAYER_CHAR can_move 1 switch_widescreen 0 return Link to comment Share on other sites More sharing options...
OrionSR Posted Monday at 09:42 PM Share Posted Monday at 09:42 PM 3 hours ago, KennyWTWL said: So I'm really curious, did I do something wrong? I can't help but cringe at all these global variables. I figure you must have run into issues with limited local variables in a cleo script, compared to a mission, and converted the locals to globals. Did you allocate these globals or just let Sanny stomp all over the standard game variables? What was the source of this script originally? Are the numbered global variables from that version or are they appropriate for mobile? I'm not sure if this script is hopeless just yet, it depends on your answers to those previous questions. But I like the overall idea of converting this mission to mobile, and have a few specialized tools for making conversions - like complete global variable tables for known versions. It should be possible to make a fairly direct conversion from .sc to main.scm or even .csi, complete with high-level constructs and enums as constants. Link to comment Share on other sites More sharing options...
KennyWTWL Posted Monday at 10:12 PM Author Share Posted Monday at 10:12 PM (edited) 30 minutes ago, OrionSR said: I can't help but cringe at all these global variables. I figure you must have run into issues with limited local variables in a cleo script, compared to a mission, and converted the locals to globals. Did you allocate these globals or just let Sanny stomp all over the standard game variables? What was the source of this script originally? Are the numbered global variables from that version or are they appropriate for mobile? I forgot to mention that I'm a beginner so, sorry for making you cringe. For the first question, I honestly don't fully understand what you mean but, I think i did allocate them. And for the second question, I took a template for creating a custom mission from gtamods, I think you know about it, however I knew they might not be appropriate for mobile, so I took some sources from the mission "Fish In A Barrel" from the main scm ('cuz It's short and It's easy for me) and put the sources In the template, and then I've made the rest of the mission on my own. And lastly the third question, I would say they are appropriate for mobile, because like I said, I originally tested it on the main scm first, and it worked very well except of course, after the cutscene. btw thank you for replying, I thought no one would help when I made the post. Edited Monday at 10:14 PM by KennyWTWL Link to comment Share on other sites More sharing options...
OrionSR Posted Monday at 11:29 PM Share Posted Monday at 11:29 PM 24 minutes ago, KennyWTWL said: I honestly don't fully understand what you mean but, I think i did allocate them. Yeah... These two statement don't belong together. You would have needed to edit Sanny's configuration files to allocate the variables, and that makes it difficult to share scripts. This script looks suspiciously clean; no comments, notes, or disabled code segments. Kind of like it was freshly decompiled for posting. I'd much prefer to read an annotated script, if you've got one. Oh wait... Is this decompiled output from the template? (BTW, SB 3.9.1 has just been released, and it includes an update that'll help globals maintain their proper index as the script is converted. Probably worth an update from the beta on this project.) You can't trust a quick test to verify that no global variable corruption has occurred. It's a common mistake of new coders, and can cause problems much later in the game. The basic rule is to never use global variables in cleo scripts, it inevitably leads to a corrupted save. Which isn't entirely true, but you really need to understand what your doing and how it'll affect main.scm. Basically, main.scm "owns" all global variables. I'm not even sure if global variables are your problem; I just can't get past that issue before testing anything else. Fortunately, I think I can offer a... hacky solution. Of the numbered global variables, like $3584 and $132, is it important for any of these variables to be using anything owned by main.scm? Figure $Player_Actor, $Player_Char, and $OnMission need to be controlled by main.scm to work properly. What else? First of all, how many variables to you need? Is it a lot more that 40 (which is likely in the case of converting a mission)? If so, if you use Sanny's Alloc function to specify your first global variable as an out of range variable, something like Alloc($MissionCar,13500) then other named variables should automatically be assigned after that. Note that this range of global variables is beyond the normal variable space, so the data won't be saved, corrupt normal game data, or cause crashes unless you get much above $15000. However, it's not really variable space - it contains object, mission and script definitions that aren't needed anymore by the time a save is loaded and cleo scripts can run, but it's not empty space; write before reading. Link to comment Share on other sites More sharing options...
KennyWTWL Posted Tuesday at 12:35 AM Author Share Posted Tuesday at 12:35 AM 59 minutes ago, OrionSR said: if you use Sanny's Alloc function to specify your first global variable as an out of range variable, something like Alloc($MissionCar,13500) then other named variables should automatically be assigned after that. guess what? https://pasteboard.co/QsrMwXpvugjP.jpg in the beginning, the cutscene had loaded in, and even after the cutscene, everything was working, until it was the line's turn to appear, unfortunately, I think it won't. btw here's the script using the 3.9.1 version (also, I've renamed the variable $3584 to $CAR) Spoiler {$CLEO .csi} Alloc($CAR, 10994) Alloc($LINEA, 10996) Alloc($BLIPA, 10995) Alloc($HELPA, 10999) Alloc($BLIPC, 11001) Alloc($BLIPD, 11000) Alloc($BLIPB, 10998) Alloc($RANDOMA, 10997) Alloc($CURRENT_TIME_IN_MS, 11002) script_name 'CESAR2' gosub @CESAR2_47 if has_deatharrest_been_executed goto_if_false @CESAR2_38 gosub @CESAR2_5624 :CESAR2_38 gosub @CESAR2_5798 terminate_this_script :CESAR2_47 load_mission_text 'CESAR2' register_mission_given $ONMISSION = 1 load_cutscene 'CESAR2A' :CESAR2_78 if not has_cutscene_loaded goto_if_false @CESAR2_102 wait 0 goto @CESAR2_78 :CESAR2_102 start_cutscene do_fade 1 time 1000 :CESAR2_111 if not has_cutscene_finished goto_if_false @CESAR2_135 wait 0 goto @CESAR2_111 :CESAR2_135 do_fade 0 time 0 :CESAR2_141 if get_fading_status goto_if_false @CESAR2_165 wait 0 goto @CESAR2_141 :CESAR2_165 clear_cutscene clear_area 1 at 1538.74 -1646.245 5.39 radius 5.0 clear_area 1 at 1792.75 -2119.981 13.56 radius 20.5 load_mission_audio 10207 as 1 load_special_character 'CESAR' as 1 request_model #LAPD1 request_model #COPCARLA request_model #SAVANNA request_vehicle_mod #NTO_B_TW load_all_models_now :CESAR2_290 if or not has_model_loaded #LAPD1 not has_model_loaded #COPCARLA not has_model_loaded #SAVANNA goto_if_false @CESAR2_327 wait 0 goto @CESAR2_290 :CESAR2_327 if or not has_vehicle_mod_loaded #NTO_B_TW not has_mission_audio_loaded 1 not has_special_character_loaded 1 goto_if_false @CESAR2_362 wait 0 goto @CESAR2_327 :CESAR2_362 switch_widescreen 0 set_player_control $PLAYER_CHAR can_move 1 set_player_group_to_follow_always $PLAYER_CHAR group_control_back 1 set_player_group_recruitment $PLAYER_CHAR gang_recruitment_enabled 0 get_player_group $PLAYER_GROUP = player $PLAYER_CHAR create_car $CAR = create_car #SAVANNA at 1544.929 -1643.479 5.51 set_char_coordinates $PLAYER_ACTOR at 1792.75 -2119.981 13.56 set_char_heading $PLAYER_ACTOR Z_angle_to 9.0 create_char $132 = create_actor_pedtype 24 model #SPECIAL01 at 1794.823 -2120.527 13.54 set_char_heading $132 Z_angle_to 35.0 set_char_never_targeted $132 untargetable 1 set_char_health $132 health_to 500 set_char_suffers_critical_hits $132 dismemberment_possible 0 set_group_member $132 in_group $PLAYER_GROUP listen_to_player_group_commands $132 supporting_fire 0 set_char_signal_after_kill $132 signal_after_kill 0 restore_camera_jumpcut set_camera_behind_player print_now 'CES2_01' time 5000 flag 1 add_blip_for_coord $BLIPA = create_checkpoint_at 1525.717 -1671.778 12.99 $LINEA = 1 do_fade 1 time 500 if is_ps2_keyboard_key_pressed 83 goto_if_false @CESAR2_563 goto @CESAR2_5649 :CESAR2_563 if is_char_dead $132 goto_if_false @CESAR2_604 clear_prints print_now 'SYN5_04' time 7000 flag 1 // ~r~Cesar has been killed! gosub @CESAR2_5624 :CESAR2_604 if is_car_dead $CAR goto_if_false @CESAR2_645 clear_prints print_now 'CES2_16' time 7000 flag 1 gosub @CESAR2_5624 :CESAR2_645 wait 10000 if and not locate_char_any_means_3d $PLAYER_ACTOR sphere 0 in_sphere 1525.717 -1671.778 12.99 radius 4.0 4.0 2.0 not locate_char_any_means_3d $132 sphere 0 in_sphere 1525.717 -1671.778 12.99 radius 4.0 4.0 2.0 goto_if_false @CESAR2_826 if and not is_char_dead $132 not is_car_dead $CAR goto_if_false @CESAR2_826 if and locate_char_any_means_char_3d $PLAYER_ACTOR near_actor $132 radius 60.0 60.0 20.0 sphere 0 $LINEA == 1 goto_if_false @CESAR2_826 play_mission_audio 1 print_now 'CES2_ZA' time 5000 flag 1 // The Los Santos Police precinct is in Pershing Square in Commerce. $LINEA = 2 :CESAR2_826 if has_mission_audio_finished 1 goto_if_false @CESAR2_1008 if and not locate_char_any_means_3d $PLAYER_ACTOR sphere 0 in_sphere 1525.717 -1671.778 12.99 radius 4.0 4.0 2.0 not locate_char_any_means_3d $132 sphere 0 in_sphere 1525.717 -1671.778 12.99 radius 4.0 4.0 2.0 goto_if_false @CESAR2_1008 if and not is_char_dead $132 not is_car_dead $CAR goto_if_false @CESAR2_1008 if and locate_char_any_means_char_3d $PLAYER_ACTOR near_actor $132 radius 60.0 60.0 20.0 sphere 0 $LINEA == 2 goto_if_false @CESAR2_1008 clear_mission_audio 1 load_mission_audio 10208 as 1 $LINEA = 3 :CESAR2_1008 if has_mission_audio_loaded 1 goto_if_false @CESAR2_1199 if and not locate_char_any_means_3d $PLAYER_ACTOR sphere 0 in_sphere 1525.717 -1671.778 12.99 radius 4.0 4.0 2.0 not locate_char_any_means_3d $132 sphere 0 in_sphere 1525.717 -1671.778 12.99 radius 4.0 4.0 2.0 goto_if_false @CESAR2_1199 if and not is_char_dead $132 not is_car_dead $CAR goto_if_false @CESAR2_1199 if and locate_char_any_means_char_3d $PLAYER_ACTOR near_actor $132 radius 60.0 60.0 20.0 sphere 0 $LINEA == 3 goto_if_false @CESAR2_1199 play_mission_audio 1 print_now 'CES2_ZB' time 5000 flag 1 // Yeah, I know Pershing Square... $LINEA = 4 :CESAR2_1199 if has_mission_audio_finished 1 goto_if_false @CESAR2_1381 if and not locate_char_any_means_3d $PLAYER_ACTOR sphere 0 in_sphere 1525.717 -1671.778 12.99 radius 4.0 4.0 2.0 not locate_char_any_means_3d $132 sphere 0 in_sphere 1525.717 -1671.778 12.99 radius 4.0 4.0 2.0 goto_if_false @CESAR2_1381 if and not is_char_dead $132 not is_car_dead $CAR goto_if_false @CESAR2_1381 if and locate_char_any_means_char_3d $PLAYER_ACTOR near_actor $132 radius 60.0 60.0 20.0 sphere 0 $LINEA == 4 goto_if_false @CESAR2_1381 clear_mission_audio 1 load_mission_audio 10209 as 1 $LINEA = 5 :CESAR2_1381 if has_mission_audio_loaded 1 goto_if_false @CESAR2_1572 if and not locate_char_any_means_3d $PLAYER_ACTOR sphere 0 in_sphere 1525.717 -1671.778 12.99 radius 4.0 4.0 2.0 not locate_char_any_means_3d $132 sphere 0 in_sphere 1525.717 -1671.778 12.99 radius 4.0 4.0 2.0 goto_if_false @CESAR2_1572 if and not is_char_dead $132 not is_car_dead $CAR goto_if_false @CESAR2_1572 if and locate_char_any_means_char_3d $PLAYER_ACTOR near_actor $132 radius 60.0 60.0 20.0 sphere 0 $LINEA == 5 goto_if_false @CESAR2_1572 play_mission_audio 1 print_now 'CES2_ZC' time 5000 flag 1 // There's an entrance to the left that leads to the underground carpark. $LINEA = 6 :CESAR2_1572 if has_mission_audio_finished 1 goto_if_false @CESAR2_1754 if and not locate_char_any_means_3d $PLAYER_ACTOR sphere 0 in_sphere 1525.717 -1671.778 12.99 radius 4.0 4.0 2.0 not locate_char_any_means_3d $132 sphere 0 in_sphere 1525.717 -1671.778 12.99 radius 4.0 4.0 2.0 goto_if_false @CESAR2_1754 if and not is_char_dead $132 not is_car_dead $CAR goto_if_false @CESAR2_1754 if and locate_char_any_means_char_3d $PLAYER_ACTOR near_actor $132 radius 60.0 60.0 20.0 sphere 0 $LINEA == 6 goto_if_false @CESAR2_1754 clear_mission_audio 1 load_mission_audio 10210 as 1 $LINEA = 7 :CESAR2_1754 if has_mission_audio_loaded 1 goto_if_false @CESAR2_1945 if and not locate_char_any_means_3d $PLAYER_ACTOR sphere 0 in_sphere 1525.717 -1671.778 12.99 radius 4.0 4.0 2.0 not locate_char_any_means_3d $132 sphere 0 in_sphere 1525.717 -1671.778 12.99 radius 4.0 4.0 2.0 goto_if_false @CESAR2_1945 if and not is_char_dead $132 not is_car_dead $CAR goto_if_false @CESAR2_1945 if and locate_char_any_means_char_3d $PLAYER_ACTOR near_actor $132 radius 60.0 60.0 20.0 sphere 0 $LINEA == 7 goto_if_false @CESAR2_1945 play_mission_audio 1 print_now 'CES2_ZD' time 5000 flag 1 // At the back is a garage that holds the impounded vehicles. $LINEA = 8 :CESAR2_1945 if has_mission_audio_finished 1 goto_if_false @CESAR2_2127 if and not locate_char_any_means_3d $PLAYER_ACTOR sphere 0 in_sphere 1525.717 -1671.778 12.99 radius 4.0 4.0 2.0 not locate_char_any_means_3d $132 sphere 0 in_sphere 1525.717 -1671.778 12.99 radius 4.0 4.0 2.0 goto_if_false @CESAR2_2127 if and not is_char_dead $132 not is_car_dead $CAR goto_if_false @CESAR2_2127 if and locate_char_any_means_char_3d $PLAYER_ACTOR near_actor $132 radius 60.0 60.0 20.0 sphere 0 $LINEA == 8 goto_if_false @CESAR2_2127 clear_mission_audio 1 load_mission_audio 10211 as 1 $LINEA = 9 :CESAR2_2127 if has_mission_audio_loaded 1 goto_if_false @CESAR2_2318 if and not locate_char_any_means_3d $PLAYER_ACTOR sphere 0 in_sphere 1525.717 -1671.778 12.99 radius 4.0 4.0 2.0 not locate_char_any_means_3d $132 sphere 0 in_sphere 1525.717 -1671.778 12.99 radius 4.0 4.0 2.0 goto_if_false @CESAR2_2318 if and not is_char_dead $132 not is_car_dead $CAR goto_if_false @CESAR2_2318 if and locate_char_any_means_char_3d $PLAYER_ACTOR near_actor $132 radius 60.0 60.0 20.0 sphere 0 $LINEA == 9 goto_if_false @CESAR2_2318 play_mission_audio 1 print_now 'CES2_ZE' time 5000 flag 1 // Ah man, this is gonna be crawling with cops! $LINEA = 10 :CESAR2_2318 if has_mission_audio_finished 1 goto_if_false @CESAR2_2500 if and not locate_char_any_means_3d $PLAYER_ACTOR sphere 0 in_sphere 1525.717 -1671.778 12.99 radius 4.0 4.0 2.0 not locate_char_any_means_3d $132 sphere 0 in_sphere 1525.717 -1671.778 12.99 radius 4.0 4.0 2.0 goto_if_false @CESAR2_2500 if and not is_char_dead $132 not is_car_dead $CAR goto_if_false @CESAR2_2500 if and locate_char_any_means_char_3d $PLAYER_ACTOR near_actor $132 radius 60.0 60.0 20.0 sphere 0 $LINEA == 10 goto_if_false @CESAR2_2500 clear_mission_audio 1 load_mission_audio 10212 as 1 $LINEA = 11 :CESAR2_2500 if has_mission_audio_loaded 1 goto_if_false @CESAR2_2691 if and not locate_char_any_means_3d $PLAYER_ACTOR sphere 0 in_sphere 1525.717 -1671.778 12.99 radius 4.0 4.0 2.0 not locate_char_any_means_3d $132 sphere 0 in_sphere 1525.717 -1671.778 12.99 radius 4.0 4.0 2.0 goto_if_false @CESAR2_2691 if and not is_char_dead $132 not is_car_dead $CAR goto_if_false @CESAR2_2691 if and locate_char_any_means_char_3d $PLAYER_ACTOR near_actor $132 radius 60.0 60.0 20.0 sphere 0 $LINEA == 11 goto_if_false @CESAR2_2691 play_mission_audio 1 print_now 'CES2_ZF' time 5000 flag 1 // Yeah I know, but if your prize car is missing when you come back to it, $LINEA = 12 :CESAR2_2691 if has_mission_audio_finished 1 goto_if_false @CESAR2_2873 if and not locate_char_any_means_3d $PLAYER_ACTOR sphere 0 in_sphere 1525.717 -1671.778 12.99 radius 4.0 4.0 2.0 not locate_char_any_means_3d $132 sphere 0 in_sphere 1525.717 -1671.778 12.99 radius 4.0 4.0 2.0 goto_if_false @CESAR2_2873 if and not is_char_dead $132 not is_car_dead $CAR goto_if_false @CESAR2_2873 if and locate_char_any_means_char_3d $PLAYER_ACTOR near_actor $132 radius 60.0 60.0 20.0 sphere 0 $LINEA == 12 goto_if_false @CESAR2_2873 clear_mission_audio 1 load_mission_audio 10213 as 1 $LINEA = 13 :CESAR2_2873 if has_mission_audio_loaded 1 goto_if_false @CESAR2_3064 if and not locate_char_any_means_3d $PLAYER_ACTOR sphere 0 in_sphere 1525.717 -1671.778 12.99 radius 4.0 4.0 2.0 not locate_char_any_means_3d $132 sphere 0 in_sphere 1525.717 -1671.778 12.99 radius 4.0 4.0 2.0 goto_if_false @CESAR2_3064 if and not is_char_dead $132 not is_car_dead $CAR goto_if_false @CESAR2_3064 if and locate_char_any_means_char_3d $PLAYER_ACTOR near_actor $132 radius 60.0 60.0 20.0 sphere 0 $LINEA == 13 goto_if_false @CESAR2_3064 play_mission_audio 1 print_now 'CES2_ZG' time 5000 flag 1 // It's probably been towed. $LINEA = 14 :CESAR2_3064 clear_mission_audio 1 generate_random_int_in_range $RANDOMA = random_int_in_ranges 0 4 if $RANDOMA == 0 goto_if_false @CESAR2_3109 load_mission_audio 10406 as 1 goto @CESAR2_3198 :CESAR2_3109 if $RANDOMA == 1 goto_if_false @CESAR2_3141 load_mission_audio 10407 as 1 goto @CESAR2_3198 :CESAR2_3141 if $RANDOMA == 2 goto_if_false @CESAR2_3173 load_mission_audio 10408 as 1 goto @CESAR2_3198 :CESAR2_3173 if $RANDOMA == 3 goto_if_false @CESAR2_3198 load_mission_audio 10409 as 1 :CESAR2_3198 if not locate_char_any_means_char_3d $PLAYER_ACTOR near_actor $132 radius 60.0 60.0 20.0 sphere 0 goto_if_false @CESAR2_3279 if $RANDOMA == 0 goto_if_false @CESAR2_3279 play_mission_audio 1 print_now 'CESX_BA' time 5000 flag 1 // Wait up, CJ! goto @CESAR2_3407 :CESAR2_3279 if $RANDOMA == 1 goto_if_false @CESAR2_3324 play_mission_audio 1 print_now 'CESX_BB' time 5000 flag 1 // Hang ten, CJ! goto @CESAR2_3407 :CESAR2_3324 if $RANDOMA == 2 goto_if_false @CESAR2_3369 play_mission_audio 1 print_now 'CESX_BC' time 5000 flag 1 // Hold up! goto @CESAR2_3407 :CESAR2_3369 if $RANDOMA == 3 goto_if_false @CESAR2_3407 play_mission_audio 1 print_now 'CESX_BD' time 5000 flag 1 // Slow down, Carl! :CESAR2_3407 if has_mission_audio_finished 6 goto_if_false @CESAR2_3519 if not is_char_dead $132 goto_if_false @CESAR2_3519 if not locate_char_any_means_char_3d $PLAYER_ACTOR near_actor $132 radius 60.0 60.0 20.0 sphere 0 goto_if_false @CESAR2_3519 remove_blip $BLIPA remove_blip $BLIPB add_blip_for_char $BLIPB = create_marker_above_actor $132 set_blip_as_friendly $BLIPB type_to 1 clear_prints print 'SYN5_10' time 7000 flag 1 // ~s~You have left ~b~Cesar~s~ behind. return :CESAR2_3519 if locate_char_any_means_char_3d $PLAYER_ACTOR near_actor $132 radius 60.0 60.0 20.0 sphere 0 goto_if_false @CESAR2_3585 remove_blip $BLIPB remove_blip $BLIPA add_blip_for_coord $BLIPA = create_checkpoint_at 1525.717 -1671.778 12.99 :CESAR2_3585 if and locate_char_any_means_3d $PLAYER_ACTOR sphere 0 in_sphere 1525.717 -1671.778 12.99 radius 4.0 4.0 2.0 locate_char_any_means_3d $132 sphere 0 in_sphere 1525.717 -1671.778 12.99 radius 4.0 4.0 2.0 goto_if_false @CESAR2_3694 clear_mission_audio 1 clear_mission_audio 2 load_mission_audio 37219 as 1 load_mission_audio 10214 as 2 :CESAR2_3694 if or not has_mission_audio_loaded 1 not has_mission_audio_loaded 2 goto_if_false @CESAR2_3724 wait 0 goto @CESAR2_3694 :CESAR2_3724 remove_blip $BLIPB remove_blip $BLIPA switch_widescreen 1 set_player_control $PLAYER_CHAR can_move 0 wait 100 play_mission_audio 1 print_now 'STL5_DC' time 4000 flag 1 :CESAR2_3769 if has_mission_audio_finished 1 goto_if_false @CESAR2_3791 goto @CESAR2_3769 :CESAR2_3791 remove_char_from_group $132 set_player_group_recruitment $PLAYER_CHAR gang_recruitment_enabled 1 clear_mission_audio 1 play_mission_audio 2 print_now 'CES2_ZH' time 4000 flag 1 // A'right man, thanks, I guess I can take it from here. :CESAR2_3827 if has_mission_audio_finished 2 goto_if_false @CESAR2_3849 goto @CESAR2_3827 :CESAR2_3849 clear_mission_audio 2 do_fade 0 time 1000 :CESAR2_3860 if get_fading_status goto_if_false @CESAR2_3884 wait 0 goto @CESAR2_3860 :CESAR2_3884 remove_char_elegantly $132 create_car $133 = create_car #COPCARLA at 1526.577 -1597.798 12.9606 set_car_heading $133 Z_angle_to 184.0 create_char_inside_car $134 = create_actor_pedtype 24 model #LAPD1 in_car $133 task_car_drive_to_coord $134 drive_car $133 to 1541.157 -1626.38 12.9587 speed 15.0 0 model #NULL 0 set_fixed_camera_position 1517.683 -1623.163 21.7968 rotation 0.0 0.0 0.0 point_camera_at_point 1532.852 -1637.15 17.2813 switchstyle 2 request_collision 1532.852 -1637.15 load_scene 1517.683 -1623.163 21.7968 set_char_coordinates $PLAYER_ACTOR at 1522.9 -1617.6 13.5 set_char_heading $PLAYER_ACTOR Z_angle_to 270.0 print_help 'CES2_03' $HELPA = 1 wait 5000 if and $HELPA == 1 locate_char_any_means_3d $134 sphere 0 in_sphere 1541.157 -1626.38 12.9587 radius 4.0 4.0 2.0 goto_if_false @CESAR2_4252 clear_prints print_help 'CES2_04' task_car_drive_to_coord $134 drive_car $133 to 1582.261 -1628.25 12.9596 speed 15.0 0 model #NULL 0 set_fixed_camera_position 1580.202 -1620.667 13.3828 rotation 0.0 0.0 0.0 point_camera_at_car $133 mode 18 switchstyle 2 $HELPA = 2 :CESAR2_4252 wait 5000 if and $HELPA == 2 locate_char_any_means_3d $134 sphere 0 in_sphere 1582.261 -1628.25 12.9596 radius 4.0 4.0 2.0 goto_if_false @CESAR2_4398 clear_prints print_help 'CES2_05' task_car_drive_to_coord $134 drive_car $133 to 1594.705 -1690.404 5.4903 speed 15.0 0 model #NULL 0 set_fixed_camera_position 1608.265 -1719.182 6.2187 rotation 11.33 11.33 11.34 $HELPA = 3 :CESAR2_4398 wait 5000 if and $HELPA == 3 locate_char_any_means_3d $134 sphere 0 in_sphere 1594.705 -1690.404 5.4903 radius 4.0 4.0 2.0 goto_if_false @CESAR2_4529 delete_car $133 remove_char_elegantly $134 clear_prints print_help 'CES2_06' set_fixed_camera_position 1580.202 -1620.667 13.3828 rotation 0.0 0.0 0.0 point_camera_at_car $CAR mode 18 switchstyle 2 $HELPA = 4 :CESAR2_4529 wait 5000 if $HELPA == 4 goto_if_false @CESAR2_4570 if is_char_dead $PLAYER_ACTOR goto_if_false @CESAR2_4570 return :CESAR2_4570 remove_blip $BLIPD set_camera_behind_player restore_camera_jumpcut switch_widescreen 0 set_player_control $PLAYER_CHAR can_move 1 add_blip_for_car $BLIPC = create_marker_above_car $CAR set_blip_as_friendly $BLIPC type_to 1 print_now 'CES2_02' time 6000 flag 1 return if locate_char_any_means_3d $PLAYER_ACTOR sphere 0 in_sphere 1594.705 -1690.404 5.4903 radius 60.0 60.0 60.0 goto_if_false @CESAR2_4694 print_now 'CES2_12' time 6000 flag 1 alter_wanted_level_no_drop $PLAYER_CHAR minimum_wanted_level_to 3 :CESAR2_4694 if is_player_playing $PLAYER_CHAR goto_if_false @CESAR2_4768 if is_wanted_level_greater $PLAYER_CHAR wanted_level > 0 goto_if_false @CESAR2_4768 if not is_car_dead $CAR goto_if_false @CESAR2_4768 if is_char_in_car $PLAYER_ACTOR in_car $CAR goto_if_false @CESAR2_4768 remove_blip $BLIPC :CESAR2_4768 if is_player_playing $PLAYER_CHAR goto_if_false @CESAR2_4826 if not is_car_dead $CAR goto_if_false @CESAR2_4826 if not is_char_in_car $PLAYER_ACTOR in_car $CAR goto_if_false @CESAR2_4826 gosub @CESAR2_4570 :CESAR2_4826 if is_player_playing $PLAYER_CHAR goto_if_false @CESAR2_4914 if not is_car_dead $CAR goto_if_false @CESAR2_4914 if not is_wanted_level_greater $PLAYER_CHAR wanted_level > 0 goto_if_false @CESAR2_4914 if is_char_in_car $PLAYER_ACTOR in_car $CAR goto_if_false @CESAR2_4914 remove_blip $BLIPC add_blip_for_coord $BLIPD = create_checkpoint_at $479 $480 $481 :CESAR2_4914 if is_player_playing $PLAYER_CHAR goto_if_false @CESAR2_5042 if not is_car_dead $CAR goto_if_false @CESAR2_5042 if not is_wanted_level_greater $PLAYER_CHAR wanted_level > 0 goto_if_false @CESAR2_5042 if locate_char_any_means_3d $PLAYER_ACTOR sphere 1 in_sphere $479 $480 $481 radius 4.0 4.0 3.0 goto_if_false @CESAR2_5042 if is_char_in_car $PLAYER_ACTOR in_car $CAR goto_if_false @CESAR2_5042 remove_blip $BLIPC remove_blip $BLIPD do_fade 1 time 1000 :CESAR2_5042 set_player_control $PLAYER_CHAR can_move 0 do_fade 0 time 1000 :CESAR2_5056 if get_fading_status goto_if_false @CESAR2_5080 wait 0 goto @CESAR2_5056 :CESAR2_5080 set_car_density_multiplier 0.0 set_ped_density_multiplier 0.0 warp_char_from_car_to_coord $PLAYER_ACTOR from_car_and_place_at 1803.716 -2120.992 13.5543 set_car_coordinates $CAR at 1793.68 -2128.68 12.55 set_car_heading $CAR Z_angle_to 0.189 create_char_inside_car $132 = create_actor_pedtype 4 model #SPECIAL01 in_car $CAR fix_car $CAR if does_car_have_hydraulics $CAR goto_if_false @CESAR2_5185 goto @CESAR2_5192 :CESAR2_5185 set_car_hydraulics $CAR hydraulics 1 :CESAR2_5192 load_mission_audio 37231 as 1 load_mission_audio 19037 as 2 :CESAR2_5208 if or not has_mission_audio_loaded 1 not has_mission_audio_loaded 2 goto_if_false @CESAR2_5238 wait 0 goto @CESAR2_5208 :CESAR2_5238 add_vehicle_mod $135 = add_car_component #NTO_B_TW to_car $CAR wait 1000 switch_widescreen 1 clear_area 1 at 1796.0 -2118.0 14.0 radius 15.0 do_fade 1 time 1500 set_fixed_camera_position 1786.331 -2120.066 12.8592 rotation 0.0 0.0 0.0 point_camera_at_point 1787.309 -2120.129 13.0548 switchstyle 2 give_non_player_car_nitro $CAR task_car_drive_to_coord $132 drive_car $CAR to 1809.031 -2115.867 13.0021 speed 20.0 0 model #NULL 2 play_mission_audio 1 print_now 'STL2_FH' time 4000 flag 1 // Hey, CJ, watch this ... NITRO! :CESAR2_5399 if not has_mission_audio_finished 1 goto_if_false @CESAR2_5425 wait 0 goto @CESAR2_5399 :CESAR2_5425 play_mission_audio 2 print_now 'CES2_GJ' time 2000 flag 1 32@ = 0 :CESAR2_5452 if or locate_car_3d $CAR sphere 0 in_sphere 1809.031 -2115.867 13.0021 radius 2.0 2.0 1.0 32@ > 6000 goto_if_false @CESAR2_5515 goto @CESAR2_5452 :CESAR2_5515 wait 0 goto @CESAR2_5452 task_leave_car $132 exit_car $CAR task_turn_char_to_face_char $PLAYER_ACTOR rotate_to_actor $132 task_go_straight_to_coord $132 goto_point 1793.68 -2128.68 12.55 mode 4 time 8000 task_look_at_vehicle $PLAYER_ACTOR look_at_car $CAR 3000 add_vehicle_mod $135 = add_car_component #NTO_B_TW to_car $CAR wait 3000 clear_mission_audio 1 clear_mission_audio 2 set_camera_behind_player switch_widescreen 0 set_player_control $PLAYER_CHAR can_move 1 restore_camera_jumpcut goto @CESAR2_5649 :CESAR2_5624 print_big 'M_FAIL' time 5000 style 1 // ~r~MISSION FAILED! $ONMISSION = 0 return :CESAR2_5649 $ONMISSION = 0 get_game_timer $CURRENT_TIME_IN_MS mission_has_finished restore_camera_jumpcut set_player_control $PLAYER_CHAR can_move 1 switch_widescreen 0 print_with_number_big 'M_PASSR' number 5 time 5000 style 1 // MISSION PASSED!~n~~w~RESPECT + clear_wanted_level $PLAYER_CHAR play_mission_passed_tune 1 register_mission_passed 'CESAR_2' // Impounded award_player_mission_respect 5 $456 += 1 add_short_range_sprite_blip_for_coord $10993 = create_icon_marker 55 at 1579.6 -1635.398 17.9324 add_short_range_sprite_blip_for_coord $10992 = create_icon_marker 55 at -1617.4 680.573 17.1691 add_short_range_sprite_blip_for_coord $10991 = create_icon_marker 55 at 2268.9 2459.255 10.8203 :CESAR2_5798 clear_mission_audio 1 clear_mission_audio 2 remove_char_elegantly $132 delete_car $CAR delete_car $133 remove_char_elegantly $134 remove_blip $BLIPA remove_blip $BLIPB remove_blip $BLIPC remove_blip $BLIPB mark_model_as_no_longer_needed #LAPD1 mark_model_as_no_longer_needed #COPCARLA mark_model_as_no_longer_needed #SAVANNA mark_vehicle_mod_as_no_longer_needed #NTO_B_TW unload_special_character 1 set_car_density_multiplier 1.0 set_ped_density_multiplier 1.0 $ONMISSION = 0 get_game_timer $CURRENT_TIME_IN_MS mission_has_finished restore_camera_jumpcut set_player_control $PLAYER_CHAR can_move 1 switch_widescreen 0 return Link to comment Share on other sites More sharing options...
OrionSR Posted Tuesday at 01:44 AM Share Posted Tuesday at 01:44 AM (edited) 1 hour ago, KennyWTWL said: everything was working, until it was the line's turn to appear If it crashes just after displaying that line, then try without mission audio, since those appear to be the only new element appearing before another text is displayed. Go higher with your allocations, last variable used by mobile is v$12299 mobile, so 12303 or higher. Allocate $CURRENT_TIME_IN_MS to 183 for mobile. These are right, you'll want them for Cesar's coord, but... FYI. Alloc($cesarX,479) Alloc($cesarY,480) Alloc($cesarZ,481) BTW, please use code tags (the <> button on the editor) for posting codes. The default formatting double-spaces the text. Spoiler tags are nice too, thanks. May as well move $132, $133 and $134 onto the end of your allocation list, or better yet, use local variables for all of these that don't really need to interact with standard game variables. $132 is correct for Cesar on mobile, btw, but isn't needed. You can name local variables as constants if you'd like. Check Sanny's help files. Despite the issues with global variables, I don't see anything that would cause a crash. There was corruption, it would have messed of important flags for later. Seems better now, but still - use locals because you can. For reference: Here's a link to my GTASA Global Variable Table 2022. I use it to translate between Sanny's CustomVariable.ini, the official R* variable names, and known versions of SA. Edited Tuesday at 01:55 AM by OrionSR Link to comment Share on other sites More sharing options...
KennyWTWL Posted Tuesday at 09:30 AM Author Share Posted Tuesday at 09:30 AM (edited) @OrionSR I've tried what you've recommended me and it worked, however I've ran into 3 problems while testing, the first one is what makes me lose hope, and it is the most Important. (It has nothing to do with the script I made btw) 1. Everytime I enter the zones "COM4" and "PER1" at anytime, (near the Police Precinct) not even during a mission, the game crashes. 2. In the script, after the line text is displayed, the dialogues when cj leaves cesar behind, the first dialogue of the Impound conversation, and the last dialogue of the Impound conversation, gets merged together, and after that the second sequence which gives a tutorial about the Impound is shown. 3. During the second sequence (again) the barrier doesn't open up for the car (COPCARLA) so it break its way through it, which Isn't a huge problem, however, when the car goes to the garage, it doesn't open. so the car keeps driving through it, making it Impossible for the next sequence to happen. I'll try to find a way to fix the first problem, which like i said, Is important, and after I'm done, I'll let you know. Edited Tuesday at 09:30 AM by KennyWTWL Link to comment Share on other sites More sharing options...
OrionSR Posted Tuesday at 10:49 AM Share Posted Tuesday at 10:49 AM It sounds like you might be having conflicts with the impound script - the script that creates and manages the drop bar, garage door, and peds and cars inside of impound garages. This script is launched by the 'IMPND_L' sniffer script whenever CJ gets near an impound garage. Try shutting that script down and see how many problems go away. You might run into new problems, like a need to control drop bars, garage doors and impound peds and cars in your script during your mission, but those types problems are manageable. I couldn't find an elegant way to disable the impound script during a mission. The IMPND_L script can be relaunched at the end of the mission, but we'll need to work out a specific offset if your mission is still a cleo script. Too tired to figure it out tonight though. See if shutting it down helps at all first. Stick this command early in your script: 0459: terminate_all_scripts_with_this_name 'IMPND_L' Link to comment Share on other sites More sharing options...
KennyWTWL Posted Tuesday at 11:03 AM Author Share Posted Tuesday at 11:03 AM It's broad daylight in where I'm from ;), anyways goodnight tho, I'll send you some updates. Link to comment Share on other sites More sharing options...
OrionSR Posted Tuesday at 10:48 PM Share Posted Tuesday at 10:48 PM BTW, some additional details that weren't available when @DeeZire was restoring these scripts for the Thing To Do In San Andreas mod, was how the impound garages actually worked. IIRC, he didn't use the actual impound garage at all, but controlled a mission vehicle safely outside of the garage zone. Care and Feeding of a San Andreas Impound Garage 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