Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. Los Santos Summer Special
      2. The Diamond Casino Heist
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Frontier Pursuits
      2. Find Lobbies & Outlaws
      3. Help & Support
    3. Crews

    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. Grand Theft Auto Series

    2. GTA VI

      1. St. Andrews Cathedral
    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. Guides & Strategies
      2. Help & Support
    6. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
    7. GTA III

      1. Guides & Strategies
      2. 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. 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
    3. Gangs

    1. Announcements

    2. Support

    3. Suggestions

EAZYJ

Cellphone script

Recommended Posts

EAZYJ

Hello,

 

Today I want to make a fonctionnal cellphone script like in the original game.

 

The phone rings

Press TAB to answer

(If not answered he'll call back in 20sec)

Get new missions after

 

But somehow I got the feeling I'm not doing this the right way. There must be some way to put all the phone calls at once in the same thread and activate them simply at some point in the story. Could someone explain me how can I do this? I checked the original main.scm :CELLFON and I don't understand any of this. I have notions though. I just need any help to understand a better way to do this. It'd help me so much in my future scripts.

 

What i've done so far but it crashes the game and I have to copy/past that everytime there's a phone call.

I used gosub for the 1st time and I barely understand what it does? It's supposed to jump and read many labels at the same time?

 

Any help is appreciated.

Thanks.

 :CELLPHthread 'CELLPH' :CELLPH_5if wasted_or_bustedgosub @CELLPH_2914jump @CELLPH_11 :CELLPH_11wait 0 if    Player.Defined($PLAYER_CHAR)else_jump @CELLPH_11if    Player.Controllable($PLAYER_CHAR)else_jump @CELLPH_11  if   $ONMISSION == 0 else_jump @CELLPH_11 if   $INTRODUCTION_PASSED == 1 else_jump @CELLPH_11if   $PHONE_RINGING == 0 else_jump @CELLPH_11if   $ON_PHONE == 0 else_jump @CELLPH_11if   not Actor.Driving($PLAYER_ACTOR)else_jump @CELLPH_11if   Player.WantedLevel($PLAYER_CHAR) > 1 else_jump @CELLPH_11 jump @CELLPH_147 :CELLPH_147wait 003CF: load_wav 23000 as 3Model.Load(#CELLPHONE)054C: use_GXT_table 'MAIN'04ED: load_animation "PED"054C: use_GXT_table 'CASIN10'jump @CELLPH_224 :CELLPH_224wait 0if orModel.Available(#CELLPHONE)83D0:   wav 3 loaded else_jump @CELLPH_147jump @CELLPH_351 :CELLPH_351wait 0$PHONE_RINGING = 103E5: show_text_box 'ANSWER'  // Press ~k~~PED_ANSWER_PHONE~ to answer your cell phone.03D1: play_wav 3gosub @CELLPH_2852jump @CELLPH_403 :CELLPH_403wait 0 if 0735:   is_keyboard_key_pressed 49else_jump @CELLPH_403jump @CELLPH_507 :CELLPH_507wait 0$PHONE_RINGING = 0$ON_PHONE = 103BF: set_player $PLAYER_CHAR ignored_by_everyone 1 01B9: set_actor $PLAYER_ACTOR armed_weapon_to 00729: AS_actor $PLAYER_ACTOR hold_cellphone 1040D: unload_wav 3wait 1500jump @CELLPH_679 :CELLPH_679wait 000BC: show_text_highpriority GXT 'CAS11AA' time 4000 flag 1wait 420000BC: show_text_highpriority GXT 'CAS11AB' time 3000 flag 1wait 320000BC: show_text_highpriority GXT 'CAS11AC' time 6000 flag 1wait 620000BC: show_text_highpriority GXT 'CAS11AD' time 2500 flag 1wait 270000BC: show_text_highpriority GXT 'CAS11BA' time 3000 flag 1                 wait 320000BC: show_text_highpriority GXT 'CAS11BB' time 3000 flag 1wait 3200jump @CELLPH_785 :CELLPH_785wait 003BF: set_player $PLAYER_CHAR ignored_by_everyone 00729: AS_actor $PLAYER_ACTOR hold_cellphone 0wait 1500Model.Destroy(#CELLPHONE)$PHONE_RINGING = 0$ON_PHONE = 0     $ONMISSION = 0  :CELLPH_2852wait 0if and   $PHONE_RINGING == 1  Actor.Driving($PLAYER_ACTOR)else_jump @CELLPH_2852jump @CELLPH_2914 :CELLPH_2914wait 500Model.Destroy(#CELLPHONE)03BF: set_player $PLAYER_CHAR ignored_by_everyone 00729: AS_actor $PLAYER_ACTOR hold_cellphone 0040D: unload_wav 3$PHONE_RINGING = 0$ON_PHONE = 0     $ONMISSION = 0wait 20000jump @CELLPH_11 end_thread  

Share this post


Link to post
Share on other sites
deltaCJ

This is because the phone script is just a VERY BIG, conditional check

 

 

First it makes a jump table:

:CELLFONthread 'CELLFON' $HELP_SKIPCALL_SHOWN = 0 $1411 = 0 $1416 = 0 $CALL_TIME_STORED_FLAG = 0 $CALL_ANSWERED = 0 $RECALL_TIME = 20000 set_wb_check_to 0 end_thread :SUB_GET_CALL_SUBTITLESif   70 > $CELLPHONE_CALL_ID else_jump @CELLFON_13265 0871: init_jump_table $CELLPHONE_CALL_ID total_jumps 67 default_jump 0 @CELLFON_13258 jumps 0 @CELLFON_2776 1 @CELLFON_2966 2 @CELLFON_3024 3 @CELLFON_3170 4 @CELLFON_3316 5 @CELLFON_3550 6 @CELLFON_3718 0872: jump_table_jumps 7 @CELLFON_3886 8 @CELLFON_4208 9 @CELLFON_5466 10 @CELLFON_4574 11 @CELLFON_4896 12 @CELLFON_5108 13 @CELLFON_5320 14 @CELLFON_5766 15 @CELLFON_6044 0872: jump_table_jumps 16 @CELLFON_6388 17 @CELLFON_6534 18 @CELLFON_596 19 @CELLFON_874 20 @CELLFON_1108 21 @CELLFON_1408 22 @CELLFON_1642 23 @CELLFON_1942 24 @CELLFON_2110 0872: jump_table_jumps 25 @CELLFON_2322 29 @CELLFON_11074 30 @CELLFON_11242 31 @CELLFON_11476 32 @CELLFON_11820 33 @CELLFON_12076 34 @CELLFON_6658 35 @CELLFON_6870 36 @CELLFON_7126 0872: jump_table_jumps 37 @CELLFON_7338 38 @CELLFON_7440 39 @CELLFON_7630 40 @CELLFON_7974 41 @CELLFON_8274 42 @CELLFON_8530 43 @CELLFON_8654 44 @CELLFON_8712 45 @CELLFON_8924 0872: jump_table_jumps 46 @CELLFON_9202 47 @CELLFON_9524 48 @CELLFON_9670 49 @CELLFON_9816 50 @CELLFON_9984 51 @CELLFON_10306 52 @CELLFON_10606 53 @CELLFON_10840 54 @CELLFON_12266 0872: jump_table_jumps 55 @CELLFON_12328 56 @CELLFON_12390 57 @CELLFON_12452 58 @CELLFON_12514 59 @CELLFON_12576 60 @CELLFON_12638 61 @CELLFON_12700 62 @CELLFON_12762 63 @CELLFON_12824 0872: jump_table_jumps 64 @CELLFON_12886 65 @CELLFON_12948 66 @CELLFON_13010 67 @CELLFON_13072 68 @CELLFON_13134 69 @CELLFON_13196 -1 @CELLFON_13258 -1 @CELLFON_13258 -1 @CELLFON_13258

This makes the script jump to these threads shown.

 

So it starts off with the first thread, and then when the 1st thread is done, you have to make it jump to the thread with the jump table, in this occasion it's :SUB_GET_CALL_SUBTITLES

 

So first it checks to see if the global variable $CELLPHONE_CALL_ID is less than 70

 

And if it isn't it jumps to a different jump table @CELLFON_13265

 

By the way the "CELLFON" script isn't want makes the missions, and the dialogues it's these:

:MOB_LA1set_wb_check_to 0 thread 'MOB_LA1' :MOB_LA1_15wait 90 if and  $ONMISSION == 0   $CALL_TIME_STORED_FLAG == 0 else_jump @MOB_LA1_56 01BD: $CURRENT_TIME_IN_MS = current_time_in_ms $CALL_TIME_STORED_FLAG = 1 :MOB_LA1_56if   $STAT_UNLOCKED_CITIES_NUMBER > 0 else_jump @MOB_LA1_76 end_thread :MOB_LA1_76gosub @SUB_GET_TIME_FROM_LAST_CALL if    Player.Defined($PLAYER_CHAR)else_jump @MOB_LA1_1712 if   $TIME_FROM_LAST_CALL_GOT_FLAG == 1 else_jump @MOB_LA1_1705 if 001C:   $TIME_FROM_LAST_CALL > $RECALL_TIME // (int) else_jump @MOB_LA1_1705 if   $INTRO_TOTAL_PASSED_MISSIONS > 0 else_jump @MOB_LA1_293 if   2 > $SWEET_TOTAL_PASSED_MISSIONS else_jump @MOB_LA1_293 if   $HELP_GROOVE_SHOWN == 3 else_jump @MOB_LA1_293 if   $1347 == 0 else_jump @MOB_LA1_293 $CELLPHONE_CALL_ID = 19 gosub @SUB_PHONE_RINGING if   $CALL_ANSWERED == 1 else_jump @MOB_LA1_254 gosub @SUB_GET_CALL_SUBTITLES gosub @SUB_PLAY_DIALOG :MOB_LA1_254if   $CALL_ANSWERED == 1 else_jump @MOB_LA1_279 $1347 = 1 :MOB_LA1_279gosub @SUB_END_CALL jump @MOB_LA1_15 :MOB_LA1_293if   $SWEET_TOTAL_PASSED_MISSIONS > 0 else_jump @MOB_LA1_414 if   $1349 == 0 else_jump @MOB_LA1_414 $CELLPHONE_CALL_ID = 9 gosub @SUB_PHONE_RINGING if   $CALL_ANSWERED == 1 else_jump @MOB_LA1_375 gosub @SUB_GET_CALL_SUBTITLES gosub @SUB_PLAY_DIALOG :MOB_LA1_375if   $CALL_ANSWERED == 1 else_jump @MOB_LA1_400 $1349 = 1 :MOB_LA1_400gosub @SUB_END_CALL jump @MOB_LA1_15 :MOB_LA1_414if   $OG_LOC_TOTAL_PASSED_MISSIONS == 4 else_jump @MOB_LA1_568 00BF: $TIME_HOURS = current_time_hours, $TIME_MINS = current_time_minutes if or  $TIME_HOURS >= 20   6 > $TIME_HOURS else_jump @MOB_LA1_568 if   $1342 == 0 else_jump @MOB_LA1_568 $CELLPHONE_CALL_ID = 6 gosub @SUB_PHONE_RINGING if   $CALL_ANSWERED == 1 else_jump @MOB_LA1_529 gosub @SUB_GET_CALL_SUBTITLES gosub @SUB_PLAY_DIALOG :MOB_LA1_529if   $CALL_ANSWERED == 1 else_jump @MOB_LA1_554 $1342 = 1 :MOB_LA1_554gosub @SUB_END_CALL jump @MOB_LA1_15 :MOB_LA1_568if   $SWEET_TOTAL_PASSED_MISSIONS > 2 else_jump @MOB_LA1_1216 if   $1348 == 0 else_jump @MOB_LA1_1216 0653: $STAT_FAT = float_stat 21 if   450.0 > $STAT_FAT else_jump @MOB_LA1_639 $CELLPHONE_CALL_ID = 20 :MOB_LA1_639if   $STAT_FAT >= 450.0 else_jump @MOB_LA1_667 $CELLPHONE_CALL_ID = 21 :MOB_LA1_667gosub @SUB_PHONE_RINGING if   $CALL_ANSWERED == 1 else_jump @MOB_LA1_706 gosub @SUB_GET_CALL_SUBTITLES gosub @SUB_PLAY_DIALOG :MOB_LA1_706if   $CALL_ANSWERED == 1 else_jump @MOB_LA1_1202 $1348 = 1 fade 0 500 :MOB_LA1_738if fading else_jump @MOB_LA1_762 wait 0 jump @MOB_LA1_738 :MOB_LA1_762if    Player.Defined($PLAYER_CHAR)else_jump @MOB_LA1_819 Player.CanMove($PLAYER_CHAR) = FalseActor.StorePos($PLAYER_ACTOR, $TEMPVAR_X_COORD, $TEMPVAR_Y_COORD, $TEMPVAR_Z_COORD)Actor.PutAt($PLAYER_ACTOR, 2228.891, -1737.128, 12.3906):MOB_LA1_81900BE: text_clear_all Camera.SetAtPos(2228.517, -1734.274, 15.744)Marker.Disable($LSGYM_ICON)$LSGYM_ICON = Marker.CreateIconWithoutSphere(54, 2228.0, -1722.811, 12.5543)Camera.SetPosition(2228.094, -1735.179, 15.6865, 0.0, 0.0, 0.0)Camera.PointAt(2228.517, -1734.274, 15.744, 2)wait 500 fade 1 1000 03E5: show_text_box 'GYMHELP'  // If you want to increase your stamina or muscle, OR if you want to learn new moves, check out the gyms around San Andreas.wait 5000 03E5: show_text_box 'DUMBELL'  // Go to the dumbbell icon (displayed on the radar) and check out the gym.03E7: flash_hud_component 8 wait 5000 03E7: flash_hud_component -1 fade 0 500 :MOB_LA1_975if fading else_jump @MOB_LA1_999 wait 0 jump @MOB_LA1_975 :MOB_LA1_999if    Player.Defined($PLAYER_CHAR)else_jump @MOB_LA1_1059 $TEMPVAR_Z_COORD -= 0.5 Actor.PutAt($PLAYER_ACTOR, $TEMPVAR_X_COORD, $TEMPVAR_Y_COORD, $TEMPVAR_Z_COORD)Camera.SetAtPos($TEMPVAR_X_COORD, $TEMPVAR_Y_COORD, $TEMPVAR_Z_COORD)Camera.Restore_WithJumpCutPlayer.CanMove($PLAYER_CHAR) = True:MOB_LA1_105907FB: set_interior 'GYM1' access 1  // Ganton Gym07FB: set_interior 'GYM2' access 1  // Cobra Marital Arts07FB: set_interior 'GYM3' access 1  // Below the Belt GymMarker.Disable($LSGYM_ICON)0570: $LSGYM_ICON = create_asset_radar_marker_with_icon 54 at 2228.0 -1722.811 12.5543 018B: set_marker $LSGYM_ICON radar_mode 2 0570: $SFGYM_ICON = create_asset_radar_marker_with_icon 54 at -2269.4 -155.6 35.3 018B: set_marker $SFGYM_ICON radar_mode 2 0570: $LVGYM_ICON = create_asset_radar_marker_with_icon 54 at 1968.6 2292.1 16.4 018B: set_marker $LVGYM_ICON radar_mode 2 wait 500 fade 1 1000 :MOB_LA1_1202gosub @SUB_END_CALL jump @MOB_LA1_15 :MOB_LA1_1216if   $OG_LOC_TOTAL_PASSED_MISSIONS > 1 else_jump @MOB_LA1_1367 if   $1343 == 0 else_jump @MOB_LA1_1367 $CELLPHONE_CALL_ID = 12 gosub @SUB_PHONE_RINGING if   $CALL_ANSWERED == 1 else_jump @MOB_LA1_1298 gosub @SUB_GET_CALL_SUBTITLES gosub @SUB_PLAY_DIALOG :MOB_LA1_1298if   $CALL_ANSWERED == 1 else_jump @MOB_LA1_1353 $1343 = 1 create_thread @CRASH Marker.Disable($MARKER_CRASH_LS)$MARKER_CRASH_LS = Marker.CreateIconAndSphere($ICON_CRASH, $X_CRASH_LS, $Y_CRASH_LS, $Z_CRASH_LS):MOB_LA1_1353gosub @SUB_END_CALL jump @MOB_LA1_15 :MOB_LA1_1367if   $SWEET_TOTAL_PASSED_MISSIONS > 6 else_jump @MOB_LA1_1525 if   $1344 == 0 else_jump @MOB_LA1_1525 $CELLPHONE_CALL_ID = 7 gosub @SUB_PHONE_RINGING if   $CALL_ANSWERED == 1 else_jump @MOB_LA1_1449 gosub @SUB_GET_CALL_SUBTITLES gosub @SUB_PLAY_DIALOG :MOB_LA1_1449if   $CALL_ANSWERED == 1 else_jump @MOB_LA1_1511 $1344 = 1 create_thread @CESAR Marker.Disable($MARKER_CESAR_LS)$MARKER_CESAR_LS = Marker.CreateIconAndSphere($ICON_CESAR, $X_CESAR_HOUSE, $Y_CESAR_HOUSE, $Z_CESAR_HOUSE)018B: set_marker $MARKER_CESAR_LS radar_mode 2 :MOB_LA1_1511gosub @SUB_END_CALL jump @MOB_LA1_15 :MOB_LA1_1525if   $SWEET_TOTAL_PASSED_MISSIONS > 6 else_jump @MOB_LA1_1705 if   $CRASH_LS_TOTAL_PASSED_MISSIONS > 0 else_jump @MOB_LA1_1705 if   $1346 == 0 else_jump @MOB_LA1_1705 $CELLPHONE_CALL_ID = 18 gosub @SUB_PHONE_RINGING if   $CALL_ANSWERED == 1 else_jump @MOB_LA1_1625 gosub @SUB_GET_CALL_SUBTITLES gosub @SUB_PLAY_DIALOG :MOB_LA1_1625if   $CALL_ANSWERED == 1 else_jump @MOB_LA1_1691 $1346 = 1 07FB: set_interior 'AMMUN1' access 0  // Ammu-NationMarker.Disable($MARKER_SWEET_HOUSE)$MARKER_SWEET_HOUSE = Marker.CreateIconAndSphere($ICON_SWEET, 1365.251, -1280.12, 12.5469):MOB_LA1_1691gosub @SUB_END_CALL jump @MOB_LA1_15 :MOB_LA1_1705jump @MOB_LA1_1719 :MOB_LA1_1712$PHONE_RINGING_FLAG = 0 :MOB_LA1_1719jump @MOB_LA1_15 :MOB_CATset_wb_check_to 0 thread 'MOB_CAT' :MOB_CAT_15wait 120 if and  $ONMISSION == 0   $CALL_TIME_STORED_FLAG == 0 else_jump @MOB_CAT_56 01BD: $CURRENT_TIME_IN_MS = current_time_in_ms $CALL_TIME_STORED_FLAG = 1 :MOB_CAT_56if   $1411 == 1 else_jump @MOB_CAT_76 end_thread :MOB_CAT_76gosub @SUB_GET_TIME_FROM_LAST_CALL if    Player.Defined($PLAYER_CHAR)else_jump @MOB_CAT_1215 if   $TIME_FROM_LAST_CALL_GOT_FLAG == 1 else_jump @MOB_CAT_1208 if 001C:   $TIME_FROM_LAST_CALL > $RECALL_TIME // (int) else_jump @MOB_CAT_1208 if   $MISSION_BADLANDS_PASSED > 0 else_jump @MOB_CAT_286 if   $1356 == 0 else_jump @MOB_CAT_286 $CELLPHONE_CALL_ID = 8 gosub @SUB_PHONE_RINGING if   $CALL_ANSWERED == 1 else_jump @MOB_CAT_218 gosub @SUB_GET_CALL_SUBTITLES gosub @SUB_PLAY_DIALOG :MOB_CAT_218if   $CALL_ANSWERED == 1 else_jump @MOB_CAT_272 $1356 = 1 create_thread @CAT Marker.Disable($MARKER_CATALINA)$MARKER_CATALINA = Marker.CreateIconAndSphere(37, $X_MEETING_CATALINA, $Y_MEETING_CATALINA, $Z_MEETING_CATALINA):MOB_CAT_272gosub @SUB_END_CALL jump @MOB_CAT_15 :MOB_CAT_286if   $MISSION_BADLANDS_PASSED > 0 else_jump @MOB_CAT_407 if   $1359 == 0 else_jump @MOB_CAT_407 $CELLPHONE_CALL_ID = 24 gosub @SUB_PHONE_RINGING if   $CALL_ANSWERED == 1 else_jump @MOB_CAT_368 gosub @SUB_GET_CALL_SUBTITLES gosub @SUB_PLAY_DIALOG :MOB_CAT_368if   $CALL_ANSWERED == 1 else_jump @MOB_CAT_393 $1359 = 1 :MOB_CAT_393gosub @SUB_END_CALL jump @MOB_CAT_15 :MOB_CAT_407if and  $TRUTH_TOTAL_PASSED_MISSIONS == 0   $CATALINA_TOTAL_PASSED_MISSIONS == 1 else_jump @MOB_CAT_565 if   $1357 == 0 else_jump @MOB_CAT_565 $CELLPHONE_CALL_ID = 15 gosub @SUB_PHONE_RINGING if   $CALL_ANSWERED == 1 else_jump @MOB_CAT_496 gosub @SUB_GET_CALL_SUBTITLES gosub @SUB_PLAY_DIALOG :MOB_CAT_496if   $CALL_ANSWERED == 1 else_jump @MOB_CAT_551 $1357 = 1 create_thread @TRU Marker.Disable($MARKER_TRUTH_FARM)$MARKER_TRUTH_FARM = Marker.CreateIconAndSphere($ICON_TRUTH, $X_ANGEL_PINE_MOTEL, $Y_ANGEL_PINE_MOTEL, $Z_ANGEL_PINE_MOTEL):MOB_CAT_551gosub @SUB_END_CALL jump @MOB_CAT_15 :MOB_CAT_565if   $CATALINA_TOTAL_PASSED_MISSIONS == 3 else_jump @MOB_CAT_866 if   $1361 == 0 else_jump @MOB_CAT_866 $CELLPHONE_CALL_ID = 0 gosub @SUB_PHONE_RINGING if   $CALL_ANSWERED == 1 else_jump @MOB_CAT_647 gosub @SUB_GET_CALL_SUBTITLES gosub @SUB_PLAY_DIALOG :MOB_CAT_647if   $CALL_ANSWERED == 1 else_jump @MOB_CAT_852 $1361 = 1 076C: set_zone 'ELCO1' gang 2 density_to 40 076C: set_zone 'ELCO2' gang 2 density_to 40 076C: set_zone 'ELCO1' gang 7 density_to 0 076C: set_zone 'ELCO2' gang 7 density_to 0 076C: set_zone 'ELCO1' gang 1 density_to 0 076C: set_zone 'ELCO2' gang 1 density_to 0 076C: set_zone 'LMEX1A' gang 2 density_to 30 076C: set_zone 'LMEX1B' gang 2 density_to 30 076C: set_zone 'LMEX1A' gang 7 density_to 0 076C: set_zone 'LMEX1B' gang 7 density_to 0 076C: set_zone 'LMEX1A' gang 1 density_to 0 076C: set_zone 'LMEX1B' gang 1 density_to 0 :MOB_CAT_852gosub @SUB_END_CALL jump @MOB_CAT_15 :MOB_CAT_866if and  $CATALINA_TOTAL_PASSED_MISSIONS > 1   $CESAR_TOTAL_PASSED_MISSIONS == 0 else_jump @MOB_CAT_1047 if   $1362 == 0 else_jump @MOB_CAT_1047 $CELLPHONE_CALL_ID = 10 gosub @SUB_PHONE_RINGING if   $CALL_ANSWERED == 1 else_jump @MOB_CAT_955 gosub @SUB_GET_CALL_SUBTITLES gosub @SUB_PLAY_DIALOG :MOB_CAT_955if   $CALL_ANSWERED == 1 else_jump @MOB_CAT_1033 $1362 = 1 create_thread @BCESAR Marker.Disable($MARKER_CESAR_MONTGOMERY)$MARKER_CESAR_MONTGOMERY = Marker.CreateIconAndSphere($ICON_CESAR, $X_MONTGOMERY, $Y_MONTGOMERY, $Z_MONTGOMERY)018B: set_marker $MARKER_CESAR_MONTGOMERY radar_mode 2 00BB: show_text_lowpriority GXT 'BC4_1' time 8000 flag 1  // ~s~Find a car to race and meet up with ~b~Cesar~s~ at the race start.:MOB_CAT_1033gosub @SUB_END_CALL jump @MOB_CAT_15 :MOB_CAT_1047if and  $CATALINA_TOTAL_PASSED_MISSIONS > 3   $CESAR_TOTAL_PASSED_MISSIONS > 9 else_jump @MOB_CAT_1208 if   $1363 == 0 else_jump @MOB_CAT_1208 $CELLPHONE_CALL_ID = 16 gosub @SUB_PHONE_RINGING if   $CALL_ANSWERED == 1 else_jump @MOB_CAT_1136 gosub @SUB_GET_CALL_SUBTITLES gosub @SUB_PLAY_DIALOG :MOB_CAT_1136if   $CALL_ANSWERED == 1 else_jump @MOB_CAT_1194 $1363 = 1 Marker.Disable($MARKER_TRUTH_FARM)$MARKER_TRUTH_FARM = Marker.CreateIconAndSphere($ICON_TRUTH, $X_TRUTH_FARM, $Y_TRUTH_FARM, $Z_TRUTH_FARM)01F0: set_max_wanted_level_to 5 $1411 = 1 :MOB_CAT_1194gosub @SUB_END_CALL jump @MOB_CAT_15 :MOB_CAT_1208jump @MOB_CAT_1222 :MOB_CAT_1215$PHONE_RINGING_FLAG = 0 :MOB_CAT_1222jump @MOB_CAT_15 :MOB_SFset_wb_check_to 0 thread 'MOB_SF' :MOB_SF_15wait 150 if and  $ONMISSION == 0   $CALL_TIME_STORED_FLAG == 0 else_jump @MOB_SF_57 01BD: $CURRENT_TIME_IN_MS = current_time_in_ms $CALL_TIME_STORED_FLAG = 1 :MOB_SF_57if   $1403 == 1 else_jump @MOB_SF_131 if   $1399 == 1 else_jump @MOB_SF_131 if   $1398 == 1 else_jump @MOB_SF_131 if   $1396 == 1 else_jump @MOB_SF_131 end_thread :MOB_SF_131gosub @SUB_GET_TIME_FROM_LAST_CALL if    Player.Defined($PLAYER_CHAR)else_jump @MOB_SF_2048 if   $TIME_FROM_LAST_CALL_GOT_FLAG == 1 else_jump @MOB_SF_2041 if 001C:   $TIME_FROM_LAST_CALL > $RECALL_TIME // (int) else_jump @MOB_SF_2041 if   $SYNDICATE_TOTAL_PASSED_MISSIONS > 2 else_jump @MOB_SF_342 if   $1401 == 0 else_jump @MOB_SF_342 $CELLPHONE_CALL_ID = 34 gosub @SUB_PHONE_RINGING if   $CALL_ANSWERED == 1 else_jump @MOB_SF_273 gosub @SUB_GET_CALL_SUBTITLES gosub @SUB_PLAY_DIALOG :MOB_SF_273if   $CALL_ANSWERED == 1 else_jump @MOB_SF_328 $1401 = 1 create_thread @WUZI Marker.Disable($524)$524 = Marker.CreateIconAndSphere($ICON_WOOZIE, $X_WOOZIE_HOUSE, $Y_WOOZIE_HOUSE, $Z_WOOZIE_HOUSE):MOB_SF_328gosub @SUB_END_CALL jump @MOB_SF_15 :MOB_SF_342if   $GARAGE_TOTAL_PASSED_MISSIONS > 0 else_jump @MOB_SF_499 if   $1395 == 0 else_jump @MOB_SF_499 $CELLPHONE_CALL_ID = 29 gosub @SUB_PHONE_RINGING if   $CALL_ANSWERED == 1 else_jump @MOB_SF_424 gosub @SUB_GET_CALL_SUBTITLES gosub @SUB_PLAY_DIALOG :MOB_SF_424if   $CALL_ANSWERED == 1 else_jump @MOB_SF_485 $1395 = 1 create_thread @BUY2 Marker.Disable($527)$527 = Marker.CreateIconAndSphere(47, $X_PROPERTY_TO_BUY[1], $Y_PROPERTY_TO_BUY[1], $Z_PROPERTY_TO_BUY[1])018B: set_marker $527 radar_mode 2 :MOB_SF_485gosub @SUB_END_CALL jump @MOB_SF_15 :MOB_SF_499if and  $GARAGE_TOTAL_PASSED_MISSIONS > 0   $ZERO_RCSHOP_BOUGHT == 1 else_jump @MOB_SF_657 if   $1396 == 0 else_jump @MOB_SF_657 $CELLPHONE_CALL_ID = 30 gosub @SUB_PHONE_RINGING if   $CALL_ANSWERED == 1 else_jump @MOB_SF_588 gosub @SUB_GET_CALL_SUBTITLES gosub @SUB_PLAY_DIALOG :MOB_SF_588if   $CALL_ANSWERED == 1 else_jump @MOB_SF_643 $1396 = 1 create_thread @ZERO Marker.Disable($527)$527 = Marker.CreateIconAndSphere($ICON_ZERO, $X_ZERO_RC_SHOP, $Y_ZERO_RC_SHOP, $Z_ZERO_RC_SHOP):MOB_SF_643gosub @SUB_END_CALL jump @MOB_SF_15 :MOB_SF_657if   $GARAGE_TOTAL_PASSED_MISSIONS > 1 else_jump @MOB_SF_881 if   $1397 == 0 else_jump @MOB_SF_881 $CELLPHONE_CALL_ID = 31 gosub @SUB_PHONE_RINGING if   $CALL_ANSWERED == 1 else_jump @MOB_SF_739 gosub @SUB_GET_CALL_SUBTITLES gosub @SUB_PLAY_DIALOG :MOB_SF_739if   $CALL_ANSWERED == 1 else_jump @MOB_SF_867 $1397 = 1 create_thread @TRACE $596 = Marker.CreateIconAndSphere(36, $X_DRIVING_SCHOOL, $Y_DRIVING_SCHOOL, $Z_DRIVING_SCHOOL)018B: set_marker $596 radar_mode 2 create_thread @BSCHOO Marker.Disable($630)0570: $630 = create_asset_radar_marker_with_icon 36 at $2367 $2368 $2369 018B: set_marker $630 radar_mode 2 create_thread @BIKES Marker.Disable($632)0570: $632 = create_asset_radar_marker_with_icon 36 at $2370 $2371 $2372 018B: set_marker $632 radar_mode 2 :MOB_SF_867gosub @SUB_END_CALL jump @MOB_SF_15 :MOB_SF_881if and  $MISSION_BACK_TO_SCHOOL_PASSED == 1   $TORENO_TOTAL_PASSED_MISSIONS > 3 else_jump @MOB_SF_1093 if   $1398 == 0 else_jump @MOB_SF_1093 $CELLPHONE_CALL_ID = 32 gosub @SUB_PHONE_RINGING if   $CALL_ANSWERED == 1 else_jump @MOB_SF_970 gosub @SUB_GET_CALL_SUBTITLES gosub @SUB_PLAY_DIALOG :MOB_SF_970if   $CALL_ANSWERED == 1 else_jump @MOB_SF_1079 $1398 = 1 Marker.Disable($528)Marker.Disable($529)Marker.Disable($530)Marker.Disable($531)0570: $528 = create_asset_radar_marker_with_icon 53 at $X_RACE_TOURNAMENT_POINT[0] $Y_RACE_TOURNAMENT_POINT[0] $Z_RACE_TOURNAMENT_POINT[0] 0570: $529 = create_asset_radar_marker_with_icon 53 at $X_RACE_TOURNAMENT_POINT[1] $Y_RACE_TOURNAMENT_POINT[1] $Z_RACE_TOURNAMENT_POINT[1] 0570: $530 = create_asset_radar_marker_with_icon 53 at $X_RACE_TOURNAMENT_POINT[2] $Y_RACE_TOURNAMENT_POINT[2] $Z_RACE_TOURNAMENT_POINT[2] 0570: $531 = create_asset_radar_marker_with_icon 53 at $X_RACE_TOURNAMENT_POINT[3] $Y_RACE_TOURNAMENT_POINT[3] $Z_RACE_TOURNAMENT_POINT[3] :MOB_SF_1079gosub @SUB_END_CALL jump @MOB_SF_15 :MOB_SF_1093if and  $1404 == 1   $MISSION_BACK_TO_SCHOOL_PASSED == 1 else_jump @MOB_SF_1257 if   $1399 == 0 else_jump @MOB_SF_1257 $CELLPHONE_CALL_ID = 33 gosub @SUB_PHONE_RINGING if   $CALL_ANSWERED == 1 else_jump @MOB_SF_1182 gosub @SUB_GET_CALL_SUBTITLES gosub @SUB_PLAY_DIALOG :MOB_SF_1182if   $CALL_ANSWERED == 1 else_jump @MOB_SF_1243 $1399 = 1 create_thread @BUY1 Marker.Disable($MARKER_WANG_CARS)$MARKER_WANG_CARS = Marker.CreateIconAndSphere(13, $X_PROPERTY_TO_BUY[0], $Y_PROPERTY_TO_BUY[0], $Z_PROPERTY_TO_BUY[0])018B: set_marker $MARKER_WANG_CARS radar_mode 2 :MOB_SF_1243gosub @SUB_END_CALL jump @MOB_SF_15 :MOB_SF_1257if   $SYNDICATE_TOTAL_PASSED_MISSIONS == 10 else_jump @MOB_SF_1465 if   $1404 == 0 else_jump @MOB_SF_1465 $CELLPHONE_CALL_ID = 41 gosub @SUB_PHONE_RINGING if   $CALL_ANSWERED == 1 else_jump @MOB_SF_1339 gosub @SUB_GET_CALL_SUBTITLES gosub @SUB_PLAY_DIALOG :MOB_SF_1339if   $CALL_ANSWERED == 1 else_jump @MOB_SF_1451 $1404 = 1 create_thread @DESERT Marker.Disable($1733)Pickup.Destroy($SAVE_PICKUPS[16])$SAVE_PICKUPS[16] = Pickup.Create(#PICKUPSAVE, 3, $SAVE_PICKUPS_X[16], $SAVE_PICKUPS_Y[16], $SAVE_PICKUPS_Z[16])$TOTAL_AVAILABLE_SAVE_PICKUPS = 17 0570: $1733 = create_asset_radar_marker_with_icon 35 at $SAVE_PICKUPS_X[16] $SAVE_PICKUPS_Y[16] $SAVE_PICKUPS_Z[16] 018B: set_marker $1733 radar_mode 2 Marker.Disable($580)$580 = Marker.CreateIconAndSphere(37, $X_TIERRA_ROBADA_RANCH, $Y_TIERRA_ROBADA_RANCH, $Z_TIERRA_ROBADA_RANCH):MOB_SF_1451gosub @SUB_END_CALL jump @MOB_SF_15 :MOB_SF_1465if   $TORENO_TOTAL_PASSED_MISSIONS > 0 else_jump @MOB_SF_1607 if   $1400 == 0 else_jump @MOB_SF_1607 $CELLPHONE_CALL_ID = 42 gosub @SUB_PHONE_RINGING if   $CALL_ANSWERED == 1 else_jump @MOB_SF_1547 gosub @SUB_GET_CALL_SUBTITLES gosub @SUB_PLAY_DIALOG :MOB_SF_1547if   $CALL_ANSWERED == 1 else_jump @MOB_SF_1593 $1400 = 1 Marker.Disable($580)$580 = Marker.CreateIconAndSphere(37, $X_TIERRA_ROBADA_RANCH, $Y_TIERRA_ROBADA_RANCH, $Z_TIERRA_ROBADA_RANCH):MOB_SF_1593gosub @SUB_END_CALL jump @MOB_SF_15 :MOB_SF_1607if   $TORENO_TOTAL_PASSED_MISSIONS > 1 else_jump @MOB_SF_1750 if   $1402 == 0 else_jump @MOB_SF_1750 $CELLPHONE_CALL_ID = 43 gosub @SUB_PHONE_RINGING if   $CALL_ANSWERED == 1 else_jump @MOB_SF_1689 gosub @SUB_GET_CALL_SUBTITLES gosub @SUB_PLAY_DIALOG :MOB_SF_1689if   $CALL_ANSWERED == 1 else_jump @MOB_SF_1736 $1402 = 1 Marker.Disable($580)$580 = Marker.CreateIconAndSphere($ICON_TORENO, $X_TIERRA_ROBADA_RANCH, $Y_TIERRA_ROBADA_RANCH, $Z_TIERRA_ROBADA_RANCH):MOB_SF_1736gosub @SUB_END_CALL jump @MOB_SF_15 :MOB_SF_1750if   $MISSION_LEARNING_TO_FLY_PASSED > 0 else_jump @MOB_SF_2041 if   $1403 == 0 else_jump @MOB_SF_2041 $CELLPHONE_CALL_ID = 35 gosub @SUB_PHONE_RINGING if   $CALL_ANSWERED == 1 else_jump @MOB_SF_1832 gosub @SUB_GET_CALL_SUBTITLES gosub @SUB_PLAY_DIALOG :MOB_SF_1832if   $CALL_ANSWERED == 1 else_jump @MOB_SF_2027 $1403 = 1 end_thread_named 'MOB_VEG' create_thread @MOB_VEG create_thread @CASINO Pickup.Destroy($SAVE_PICKUPS[17])$SAVE_PICKUPS[17] = Pickup.Create(#PICKUPSAVE, 3, $SAVE_PICKUPS_X[17], $SAVE_PICKUPS_Y[17], $SAVE_PICKUPS_Z[17])$TOTAL_AVAILABLE_SAVE_PICKUPS = 18 0570: $1734 = create_asset_radar_marker_with_icon 35 at $SAVE_PICKUPS_X[17] $SAVE_PICKUPS_Y[17] $SAVE_PICKUPS_Z[17] 018B: set_marker $1734 radar_mode 2 Marker.Disable($582)$582 = Marker.CreateIconAndSphere($ICON_TRIADS_CASINO, $X_THE_FOUR_DRAGONS_CASINO, $Y_THE_FOUR_DRAGONS_CASINO, $Z_THE_FOUR_DRAGONS_CASINO)08DC: create_interior_marker $582 at 2026.603 1007.735 radius 20.0 Garage.Activate('VECMOD')$2590 = Marker.CreateIconWithoutSphere(27, 2382.2, 1044.0, 9.8)0629: change_integer_stat 327 to 1 create_thread @LITCAS :MOB_SF_2027gosub @SUB_END_CALL jump @MOB_SF_15 :MOB_SF_2041jump @MOB_SF_2055 :MOB_SF_2048$PHONE_RINGING_FLAG = 0 :MOB_SF_2055jump @MOB_SF_15 :MOB_VEGset_wb_check_to 0 thread 'MOB_VEG' :MOB_VEG_15wait 180 if and  $ONMISSION == 0   $CALL_TIME_STORED_FLAG == 0 else_jump @MOB_VEG_57 01BD: $CURRENT_TIME_IN_MS = current_time_in_ms $CALL_TIME_STORED_FLAG = 1 :MOB_VEG_57if   $1386 == 1 else_jump @MOB_VEG_95 if   $1382 == 1 else_jump @MOB_VEG_95 end_thread :MOB_VEG_95gosub @SUB_GET_TIME_FROM_LAST_CALL if    Player.Defined($PLAYER_CHAR)else_jump @MOB_VEG_2293 if   $TIME_FROM_LAST_CALL_GOT_FLAG == 1 else_jump @MOB_VEG_2286 if 001C:   $TIME_FROM_LAST_CALL > $RECALL_TIME // (int) else_jump @MOB_VEG_2286 if   $TORENO_TOTAL_PASSED_MISSIONS > 7 else_jump @MOB_VEG_298 if   $1389 == 0 else_jump @MOB_VEG_298 $CELLPHONE_CALL_ID = 17 gosub @SUB_PHONE_RINGING if   $CALL_ANSWERED == 1 else_jump @MOB_VEG_237 gosub @SUB_GET_CALL_SUBTITLES gosub @SUB_PLAY_DIALOG :MOB_VEG_237if   $CALL_ANSWERED == 1 else_jump @MOB_VEG_284 $1389 = 1 Marker.Disable($581)$581 = Marker.CreateIconAndSphere($ICON_AIRYARD, $X_OLD_AIRPORT, $Y_OLD_AIRPORT, $Z_OLD_AIRPORT):MOB_VEG_284gosub @SUB_END_CALL jump @MOB_VEG_15 :MOB_VEG_298if and  $598 > 0   $CASINO_TOTAL_PASSED_MISSIONS > 7 else_jump @MOB_VEG_454 if   $1378 == 0 else_jump @MOB_VEG_454 $CELLPHONE_CALL_ID = 13 gosub @SUB_PHONE_RINGING if   $CALL_ANSWERED == 1 else_jump @MOB_VEG_387 gosub @SUB_GET_CALL_SUBTITLES gosub @SUB_PLAY_DIALOG :MOB_VEG_387if   $CALL_ANSWERED == 1 else_jump @MOB_VEG_440 $1378 = 1 Marker.Disable($583)$583 = Marker.CreateIconAndSphere($ICON_CRASH, -378.7596, 2235.859, 41.4288):MOB_VEG_440gosub @SUB_END_CALL jump @MOB_VEG_15 :MOB_VEG_454if   $CASINO_TOTAL_PASSED_MISSIONS > 3 else_jump @MOB_VEG_617 if   $1380 == 0 else_jump @MOB_VEG_617 $CELLPHONE_CALL_ID = 47 gosub @SUB_PHONE_RINGING if   $CALL_ANSWERED == 1 else_jump @MOB_VEG_536 gosub @SUB_GET_CALL_SUBTITLES gosub @SUB_PLAY_DIALOG :MOB_VEG_536if   $CALL_ANSWERED == 1 else_jump @MOB_VEG_603 $1380 = 1 Marker.Disable($582)$582 = Marker.CreateIconAndSphere($ICON_MAFIA_CASINO, $X_CALIGULA_PALACE, $Y_CALIGULA_PALACE, $Z_CALIGULA_PALACE)08DC: create_interior_marker $582 at 2187.286 1678.461 radius 20.0 :MOB_VEG_603gosub @SUB_END_CALL jump @MOB_VEG_15 :MOB_VEG_617if   $CASINO_TOTAL_PASSED_MISSIONS > 6 else_jump @MOB_VEG_780 if   $1381 == 0 else_jump @MOB_VEG_780 $CELLPHONE_CALL_ID = 48 gosub @SUB_PHONE_RINGING if   $CALL_ANSWERED == 1 else_jump @MOB_VEG_699 gosub @SUB_GET_CALL_SUBTITLES gosub @SUB_PLAY_DIALOG :MOB_VEG_699if   $CALL_ANSWERED == 1 else_jump @MOB_VEG_766 $1381 = 1 Marker.Disable($582)$582 = Marker.CreateIconAndSphere($ICON_MAFIA_CASINO, $X_CALIGULA_PALACE, $Y_CALIGULA_PALACE, $Z_CALIGULA_PALACE)08DC: create_interior_marker $582 at 2187.286 1678.461 radius 20.0 :MOB_VEG_766gosub @SUB_END_CALL jump @MOB_VEG_15 :MOB_VEG_780if   $CASINO_TOTAL_PASSED_MISSIONS > 7 else_jump @MOB_VEG_997 if   $598 > 1 else_jump @MOB_VEG_997 if   $599 > 0 else_jump @MOB_VEG_997 if   $TORENO_TOTAL_PASSED_MISSIONS > 8 else_jump @MOB_VEG_997 if   $1382 == 0 else_jump @MOB_VEG_997 $CELLPHONE_CALL_ID = 49 gosub @SUB_PHONE_RINGING if   $CALL_ANSWERED == 1 else_jump @MOB_VEG_916 gosub @SUB_GET_CALL_SUBTITLES gosub @SUB_PLAY_DIALOG :MOB_VEG_916if   $CALL_ANSWERED == 1 else_jump @MOB_VEG_983 $1382 = 1 Marker.Disable($582)$582 = Marker.CreateIconAndSphere($ICON_MAFIA_CASINO, $X_CALIGULA_PALACE, $Y_CALIGULA_PALACE, $Z_CALIGULA_PALACE)08DC: create_interior_marker $582 at 2187.286 1678.461 radius 20.0 :MOB_VEG_983gosub @SUB_END_CALL jump @MOB_VEG_15 :MOB_VEG_997if   $HEIST_TOTAL_PASSED_MISSIONS > 1 else_jump @MOB_VEG_1245 if 88B4:   not test $390 bit 1 else_jump @MOB_VEG_1245 0652: $STAT_PROGRESS_WITH_MILLIE = integer_stat 257 if   $STAT_PROGRESS_WITH_MILLIE >= 35 else_jump @MOB_VEG_1245 if   $1379 == 0 else_jump @MOB_VEG_1245 $CELLPHONE_CALL_ID = 53 gosub @SUB_PHONE_RINGING if   $CALL_ANSWERED == 1 else_jump @MOB_VEG_1123 gosub @SUB_GET_CALL_SUBTITLES gosub @SUB_PLAY_DIALOG :MOB_VEG_1123if   $CALL_ANSWERED == 1 else_jump @MOB_VEG_1231 $PICKUP_KEYCARD = Pickup.Create(#KEYCARD, 3, 348.7857, 306.1048, 998.6557)create_thread @KEYCARD Marker.Disable($1415)$1415 = Marker.CreateIconAndSphere($ICON_CASH, 2037.349, 2723.971, 9.8281)018B: set_marker $1415 radar_mode 2 00BC: show_text_highpriority GXT 'GOODKEY' time 6000 flag 1  // ~s~You can now pick up the keycard from Millie's place.$1379 = 1 :MOB_VEG_1231gosub @SUB_END_CALL jump @MOB_VEG_15 :MOB_VEG_1245if   $HEIST_TOTAL_PASSED_MISSIONS > 1 else_jump @MOB_VEG_1537 if 88B4:   not test $390 bit 1 else_jump @MOB_VEG_1537 if or  $GIRL_PROGRESS[5] == -100   $GIRL_PROGRESS[5] == -999 else_jump @MOB_VEG_1537 if   $1379 == 0 else_jump @MOB_VEG_1537 if   $GIRL_PROGRESS[5] == -999 else_jump @MOB_VEG_1351 $CELLPHONE_CALL_ID = 40 :MOB_VEG_1351if   $GIRL_PROGRESS[5] == -100 else_jump @MOB_VEG_1376 $CELLPHONE_CALL_ID = 39 :MOB_VEG_1376gosub @SUB_PHONE_RINGING if   $CALL_ANSWERED == 1 else_jump @MOB_VEG_1415 gosub @SUB_GET_CALL_SUBTITLES gosub @SUB_PLAY_DIALOG :MOB_VEG_1415if   $CALL_ANSWERED == 1 else_jump @MOB_VEG_1523 $PICKUP_KEYCARD = Pickup.Create(#KEYCARD, 3, 348.7857, 306.1048, 998.6557)create_thread @KEYCARD Marker.Disable($1415)$1415 = Marker.CreateIconAndSphere($ICON_CASH, 2037.349, 2723.971, 9.8281)018B: set_marker $1415 radar_mode 2 00BC: show_text_highpriority GXT 'BADKEY' time 6000 flag 1  // ~s~You will need to steal the keycard from Millie's place.$1379 = 1 :MOB_VEG_1523gosub @SUB_END_CALL jump @MOB_VEG_15 :MOB_VEG_1537if and  $HEIST_TOTAL_PASSED_MISSIONS > 4   $37 == 0   $1384 == 0 else_jump @MOB_VEG_1672 if   $1383 == 0 else_jump @MOB_VEG_1672 $CELLPHONE_CALL_ID = 36 gosub @SUB_PHONE_RINGING if   $CALL_ANSWERED == 1 else_jump @MOB_VEG_1633 gosub @SUB_GET_CALL_SUBTITLES gosub @SUB_PLAY_DIALOG :MOB_VEG_1633if   $CALL_ANSWERED == 1 else_jump @MOB_VEG_1658 $1383 = 1 :MOB_VEG_1658gosub @SUB_END_CALL jump @MOB_VEG_15 :MOB_VEG_1672if and  $CASINO_TOTAL_PASSED_MISSIONS > 8    not $HEIST_TOTAL_PASSED_MISSIONS == 6 else_jump @MOB_VEG_1800 if   $1385 == 0 else_jump @MOB_VEG_1800 $CELLPHONE_CALL_ID = 51 gosub @SUB_PHONE_RINGING if   $CALL_ANSWERED == 1 else_jump @MOB_VEG_1761 gosub @SUB_GET_CALL_SUBTITLES gosub @SUB_PLAY_DIALOG :MOB_VEG_1761if   $CALL_ANSWERED == 1 else_jump @MOB_VEG_1786 $1385 = 1 :MOB_VEG_1786gosub @SUB_END_CALL jump @MOB_VEG_15 :MOB_VEG_1800if and  $CASINO_TOTAL_PASSED_MISSIONS > 8   $1384 == 0 else_jump @MOB_VEG_1995 if   $1390 == 0 else_jump @MOB_VEG_1995 $CELLPHONE_CALL_ID = 38 gosub @SUB_PHONE_RINGING if   $CALL_ANSWERED == 1 else_jump @MOB_VEG_1889 gosub @SUB_GET_CALL_SUBTITLES gosub @SUB_PLAY_DIALOG :MOB_VEG_1889if   $CALL_ANSWERED == 1 else_jump @MOB_VEG_1981 $1390 = 1 if   $37 == 1 else_jump @MOB_VEG_1981 Marker.Disable($595)$595 = Marker.CreateIconAndSphere($ICON_CASH, $X_THE_FOUR_DRAGONS_CASINO_2, $Y_THE_FOUR_DRAGONS_CASINO_2, $Z_THE_FOUR_DRAGONS_CASINO_2)08DC: create_interior_marker $595 at 2024.39 1008.62 radius 20.0 $1384 = 1 :MOB_VEG_1981gosub @SUB_END_CALL jump @MOB_VEG_15 :MOB_VEG_1995if and  $CASINO_TOTAL_PASSED_MISSIONS > 8   $37 == 1 else_jump @MOB_VEG_2165 if   $1384 == 0 else_jump @MOB_VEG_2165 $CELLPHONE_CALL_ID = 37 gosub @SUB_PHONE_RINGING if   $CALL_ANSWERED == 1 else_jump @MOB_VEG_2084 gosub @SUB_GET_CALL_SUBTITLES gosub @SUB_PLAY_DIALOG :MOB_VEG_2084if   $CALL_ANSWERED == 1 else_jump @MOB_VEG_2151 $1384 = 1 Marker.Disable($595)$595 = Marker.CreateIconAndSphere($ICON_CASH, $X_THE_FOUR_DRAGONS_CASINO_2, $Y_THE_FOUR_DRAGONS_CASINO_2, $Z_THE_FOUR_DRAGONS_CASINO_2)08DC: create_interior_marker $595 at 2024.39 1008.62 radius 20.0 :MOB_VEG_2151gosub @SUB_END_CALL jump @MOB_VEG_15 :MOB_VEG_2165if   $HEIST_TOTAL_PASSED_MISSIONS > 5 else_jump @MOB_VEG_2286 if   $1386 == 0 else_jump @MOB_VEG_2286 $CELLPHONE_CALL_ID = 52 gosub @SUB_PHONE_RINGING if   $CALL_ANSWERED == 1 else_jump @MOB_VEG_2247 gosub @SUB_GET_CALL_SUBTITLES gosub @SUB_PLAY_DIALOG :MOB_VEG_2247if   $CALL_ANSWERED == 1 else_jump @MOB_VEG_2272 $1386 = 1 :MOB_VEG_2272gosub @SUB_END_CALL jump @MOB_VEG_15 :MOB_VEG_2286jump @MOB_VEG_2300 :MOB_VEG_2293$PHONE_RINGING_FLAG = 0 :MOB_VEG_2300jump @MOB_VEG_15 :MOB_LA2set_wb_check_to 0 thread 'MOB_LA2' :MOB_LA2_15wait 250 if and  $ONMISSION == 0   $CALL_TIME_STORED_FLAG == 0 else_jump @MOB_LA2_57 01BD: $CURRENT_TIME_IN_MS = current_time_in_ms $CALL_TIME_STORED_FLAG = 1 :MOB_LA2_57if   $1354 == 1 else_jump @MOB_LA2_77 end_thread :MOB_LA2_77gosub @SUB_GET_TIME_FROM_LAST_CALL if    Player.Defined($PLAYER_CHAR)else_jump @MOB_LA2_763 if   $TIME_FROM_LAST_CALL_GOT_FLAG == 1 else_jump @MOB_LA2_756 if 001C:   $TIME_FROM_LAST_CALL > $RECALL_TIME // (int) else_jump @MOB_LA2_756 if   $MANSION_TOTAL_PASSED_MISSIONS > 0 else_jump @MOB_LA2_280 if   $1352 == 0 else_jump @MOB_LA2_280 $CELLPHONE_CALL_ID = 50 gosub @SUB_PHONE_RINGING if   $CALL_ANSWERED == 1 else_jump @MOB_LA2_219 gosub @SUB_GET_CALL_SUBTITLES gosub @SUB_PLAY_DIALOG :MOB_LA2_219if   $CALL_ANSWERED == 1 else_jump @MOB_LA2_266 $1352 = 1 Marker.Disable($622)$622 = Marker.CreateIconAndSphere($ICON_CJ_2, $X_MADD_DOGG_CRIB, $Y_MADD_DOGG_CRIB, $Z_MADD_DOGG_CRIB):MOB_LA2_266gosub @SUB_END_CALL jump @MOB_LA2_15 :MOB_LA2_280if and  $CASINO_TOTAL_PASSED_MISSIONS > 2   2 > $MANSION_TOTAL_PASSED_MISSIONS else_jump @MOB_LA2_408 if   $1353 == 0 else_jump @MOB_LA2_408 $CELLPHONE_CALL_ID = 25 gosub @SUB_PHONE_RINGING if   $CALL_ANSWERED == 1 else_jump @MOB_LA2_369 gosub @SUB_GET_CALL_SUBTITLES gosub @SUB_PLAY_DIALOG :MOB_LA2_369if   $CALL_ANSWERED == 1 else_jump @MOB_LA2_394 $1353 = 1 :MOB_LA2_394gosub @SUB_END_CALL jump @MOB_LA2_15 :MOB_LA2_408if   $RIOT_TOTAL_PASSED_MISSIONS > 1 else_jump @MOB_LA2_590 if   $1355 == 0 else_jump @MOB_LA2_590 $CELLPHONE_CALL_ID = 22 gosub @SUB_PHONE_RINGING if   $CALL_ANSWERED == 1 else_jump @MOB_LA2_490 gosub @SUB_GET_CALL_SUBTITLES gosub @SUB_PLAY_DIALOG :MOB_LA2_490if   $CALL_ANSWERED == 1 else_jump @MOB_LA2_537 Marker.Disable($MARKER_SWEET_HOUSE)$MARKER_SWEET_HOUSE = Marker.CreateIconAndSphere($ICON_SWEET, $X_SWEET_HOUSE, $Y_SWEET_HOUSE, $Z_SWEET_HOUSE)$1355 = 1 :MOB_LA2_537gosub @SUB_END_CALL 08E2: $GS_GANG_TURF_CONTROLLED = territories_controlled_percentage if   34 >= $GS_GANG_TURF_CONTROLLED else_jump @MOB_LA2_583 00BC: show_text_highpriority GXT 'MORTURF' time 12000 flag 1  // ~s~You need to take over more gang territories around Los Santos!:MOB_LA2_583jump @MOB_LA2_15 :MOB_LA2_590if   $RIOT_TOTAL_PASSED_MISSIONS > 1 else_jump @MOB_LA2_756 08E2: $GS_GANG_TURF_CONTROLLED = territories_controlled_percentage if   $GS_GANG_TURF_CONTROLLED > 34 else_jump @MOB_LA2_756 if   $1354 == 0 else_jump @MOB_LA2_756 $CELLPHONE_CALL_ID = 23 gosub @SUB_PHONE_RINGING if   $CALL_ANSWERED == 1 else_jump @MOB_LA2_695 gosub @SUB_GET_CALL_SUBTITLES gosub @SUB_PLAY_DIALOG :MOB_LA2_695if   $CALL_ANSWERED == 1 else_jump @MOB_LA2_742 Marker.Disable($MARKER_SWEET_HOUSE)$MARKER_SWEET_HOUSE = Marker.CreateIconAndSphere($ICON_SWEET, $X_SWEET_HOUSE, $Y_SWEET_HOUSE, $Z_SWEET_HOUSE)$1354 = 1 :MOB_LA2_742gosub @SUB_END_CALL jump @MOB_LA2_15 :MOB_LA2_756jump @MOB_LA2_770 :MOB_LA2_763$PHONE_RINGING_FLAG = 0 :MOB_LA2_770jump @MOB_LA2_15 :MOB_RANset_wb_check_to 0 thread 'MOB_RAN' :MOB_RAN_15wait 1000 if and  $ONMISSION == 0   $CALL_TIME_STORED_FLAG == 0 else_jump @MOB_RAN_57 01BD: $CURRENT_TIME_IN_MS = current_time_in_ms $CALL_TIME_STORED_FLAG = 1 :MOB_RAN_57gosub @SUB_GET_TIME_FROM_LAST_CALL if    Player.Defined($PLAYER_CHAR)else_jump @MOB_RAN_2260 if   $TIME_FROM_LAST_CALL_GOT_FLAG == 1 else_jump @MOB_RAN_2253 if   $TIME_FROM_LAST_CALL > 60000 else_jump @MOB_RAN_2253 if and  $1846 == 1   $MISSION_LOWRIDER_PASSED == 0 else_jump @MOB_RAN_247 if   $1371 == 0 else_jump @MOB_RAN_247 $CELLPHONE_CALL_ID = 11 gosub @SUB_PHONE_RINGING if   $CALL_ANSWERED == 1 else_jump @MOB_RAN_208 gosub @SUB_GET_CALL_SUBTITLES gosub @SUB_PLAY_DIALOG :MOB_RAN_208if   $CALL_ANSWERED == 1 else_jump @MOB_RAN_233 $1371 = 1 :MOB_RAN_233gosub @SUB_END_CALL jump @MOB_RAN_15 :MOB_RAN_247if and  $MISSION_RUNNING_DOG_FAILED == 1   $SMOKE_TOTAL_PASSED_MISSIONS == 1 else_jump @MOB_RAN_403 0653: $STAT_FAT = float_stat 21 if   $STAT_FAT >= 500.0 else_jump @MOB_RAN_403 if   $1372 == 0 else_jump @MOB_RAN_403 $CELLPHONE_CALL_ID = 14 gosub @SUB_PHONE_RINGING if   $CALL_ANSWERED == 1 else_jump @MOB_RAN_364 gosub @SUB_GET_CALL_SUBTITLES gosub @SUB_PLAY_DIALOG :MOB_RAN_364if   $CALL_ANSWERED == 1 else_jump @MOB_RAN_389 $1372 = 1 :MOB_RAN_389gosub @SUB_END_CALL jump @MOB_RAN_15 :MOB_RAN_403if   $WUZIMU_TOTAL_PASSED_MISSIONS > 1 else_jump @MOB_RAN_524 if   $1366 == 0 else_jump @MOB_RAN_524 $CELLPHONE_CALL_ID = 1 gosub @SUB_PHONE_RINGING if   $CALL_ANSWERED == 1 else_jump @MOB_RAN_485 gosub @SUB_GET_CALL_SUBTITLES gosub @SUB_PLAY_DIALOG :MOB_RAN_485if   $CALL_ANSWERED == 1 else_jump @MOB_RAN_510 $1366 = 1 :MOB_RAN_510gosub @SUB_END_CALL jump @MOB_RAN_15 :MOB_RAN_524if   $TORENO_TOTAL_PASSED_MISSIONS > 5 else_jump @MOB_RAN_645 if   $1367 == 0 else_jump @MOB_RAN_645 $CELLPHONE_CALL_ID = 2 gosub @SUB_PHONE_RINGING if   $CALL_ANSWERED == 1 else_jump @MOB_RAN_606 gosub @SUB_GET_CALL_SUBTITLES gosub @SUB_PLAY_DIALOG :MOB_RAN_606if   $CALL_ANSWERED == 1 else_jump @MOB_RAN_631 $1367 = 1 :MOB_RAN_631gosub @SUB_END_CALL jump @MOB_RAN_15 :MOB_RAN_645if   $CASINO_TOTAL_PASSED_MISSIONS > 5 else_jump @MOB_RAN_766 if   $1368 == 0 else_jump @MOB_RAN_766 $CELLPHONE_CALL_ID = 3 gosub @SUB_PHONE_RINGING if   $CALL_ANSWERED == 1 else_jump @MOB_RAN_727 gosub @SUB_GET_CALL_SUBTITLES gosub @SUB_PLAY_DIALOG :MOB_RAN_727if   $CALL_ANSWERED == 1 else_jump @MOB_RAN_752 $1368 = 1 :MOB_RAN_752gosub @SUB_END_CALL jump @MOB_RAN_15 :MOB_RAN_766if   $MANSION_TOTAL_PASSED_MISSIONS > 2 else_jump @MOB_RAN_887 if   $1369 == 0 else_jump @MOB_RAN_887 $CELLPHONE_CALL_ID = 4 gosub @SUB_PHONE_RINGING if   $CALL_ANSWERED == 1 else_jump @MOB_RAN_848 gosub @SUB_GET_CALL_SUBTITLES gosub @SUB_PLAY_DIALOG :MOB_RAN_848if   $CALL_ANSWERED == 1 else_jump @MOB_RAN_873 $1369 = 1 :MOB_RAN_873gosub @SUB_END_CALL jump @MOB_RAN_15 :MOB_RAN_887if   $RIOT_TOTAL_PASSED_MISSIONS > 4 else_jump @MOB_RAN_1008 if   $1370 == 0 else_jump @MOB_RAN_1008 $CELLPHONE_CALL_ID = 5 gosub @SUB_PHONE_RINGING if   $CALL_ANSWERED == 1 else_jump @MOB_RAN_969 gosub @SUB_GET_CALL_SUBTITLES gosub @SUB_PLAY_DIALOG :MOB_RAN_969if   $CALL_ANSWERED == 1 else_jump @MOB_RAN_994 $1370 = 1 :MOB_RAN_994gosub @SUB_END_CALL jump @MOB_RAN_15 :MOB_RAN_1008if and  $FLIGHT_SCHOOL_BRIEF_PLAYED == 1   $MISSION_LEARNING_TO_FLY_PASSED == 0 else_jump @MOB_RAN_1136 if   $1373 == 0 else_jump @MOB_RAN_1136 $CELLPHONE_CALL_ID = 44 gosub @SUB_PHONE_RINGING if   $CALL_ANSWERED == 1 else_jump @MOB_RAN_1097 gosub @SUB_GET_CALL_SUBTITLES gosub @SUB_PLAY_DIALOG :MOB_RAN_1097if   $CALL_ANSWERED == 1 else_jump @MOB_RAN_1122 $1373 = 1 :MOB_RAN_1122gosub @SUB_END_CALL jump @MOB_RAN_15 :MOB_RAN_1136if and  $FLIGHT_SCHOOL_BRIEF_PLAYED == 1   $MISSION_LEARNING_TO_FLY_PASSED == 0   $1373 == 1 else_jump @MOB_RAN_1271 if   $1374 == 0 else_jump @MOB_RAN_1271 $CELLPHONE_CALL_ID = 45 gosub @SUB_PHONE_RINGING if   $CALL_ANSWERED == 1 else_jump @MOB_RAN_1232 gosub @SUB_GET_CALL_SUBTITLES gosub @SUB_PLAY_DIALOG :MOB_RAN_1232if   $CALL_ANSWERED == 1 else_jump @MOB_RAN_1257 $1374 = 1 :MOB_RAN_1257gosub @SUB_END_CALL jump @MOB_RAN_15 :MOB_RAN_1271if and  $FLIGHT_SCHOOL_BRIEF_PLAYED == 1   $MISSION_LEARNING_TO_FLY_PASSED == 0   $1374 == 1 else_jump @MOB_RAN_1406 if   $1375 == 0 else_jump @MOB_RAN_1406 $CELLPHONE_CALL_ID = 46 gosub @SUB_PHONE_RINGING if   $CALL_ANSWERED == 1 else_jump @MOB_RAN_1367 gosub @SUB_GET_CALL_SUBTITLES gosub @SUB_PLAY_DIALOG :MOB_RAN_1367if   $CALL_ANSWERED == 1 else_jump @MOB_RAN_1392 $1375 = 1 :MOB_RAN_1392gosub @SUB_END_CALL jump @MOB_RAN_15 :MOB_RAN_14060926: $SCRIPT_STATUS = external_script_status 76 (DEBT) if 04A3:   $CURRENT_TOWN_NUMBER == 3 // == constant else_jump @MOB_RAN_2253 if    not Player.Money($PLAYER_CHAR) > -499else_jump @MOB_RAN_2253 if   $SCRIPT_STATUS == 0 else_jump @MOB_RAN_2253 if   $1376 == 0 else_jump @MOB_RAN_1834 if   $1407 == 7 else_jump @MOB_RAN_1518 $CELLPHONE_CALL_ID = 61 $1407 = 0 :MOB_RAN_1518if   $1407 == 6 else_jump @MOB_RAN_1550 $CELLPHONE_CALL_ID = 60 $1407 = 7 :MOB_RAN_1550if   $1407 == 5 else_jump @MOB_RAN_1582 $CELLPHONE_CALL_ID = 59 $1407 = 6 :MOB_RAN_1582if   $1407 == 4 else_jump @MOB_RAN_1614 $CELLPHONE_CALL_ID = 58 $1407 = 5 :MOB_RAN_1614if   $1407 == 3 else_jump @MOB_RAN_1646 $CELLPHONE_CALL_ID = 57 $1407 = 4 :MOB_RAN_1646if   $1407 == 2 else_jump @MOB_RAN_1678 $CELLPHONE_CALL_ID = 56 $1407 = 3 :MOB_RAN_1678if   $1407 == 1 else_jump @MOB_RAN_1710 $CELLPHONE_CALL_ID = 55 $1407 = 2 :MOB_RAN_1710if   $1407 == 0 else_jump @MOB_RAN_1742 $CELLPHONE_CALL_ID = 54 $1407 = 1 :MOB_RAN_1742gosub @SUB_PHONE_RINGING if   $CALL_ANSWERED == 1 else_jump @MOB_RAN_1781 gosub @SUB_GET_CALL_SUBTITLES gosub @SUB_PLAY_DIALOG :MOB_RAN_1781if   $CALL_ANSWERED == 1 else_jump @MOB_RAN_1820 $1376 = 1 $1377 = 0 $1411 = 1 :MOB_RAN_1820gosub @SUB_END_CALL jump @MOB_RAN_15 :MOB_RAN_1834if   $1376 == 1 else_jump @MOB_RAN_2211 if   $1377 == 0 else_jump @MOB_RAN_2211 if   $1408 == 7 else_jump @MOB_RAN_1902 $CELLPHONE_CALL_ID = 69 $1408 = 0 :MOB_RAN_1902if   $1408 == 6 else_jump @MOB_RAN_1934 $CELLPHONE_CALL_ID = 68 $1408 = 7 :MOB_RAN_1934if   $1408 == 5 else_jump @MOB_RAN_1966 $CELLPHONE_CALL_ID = 67 $1408 = 6 :MOB_RAN_1966if   $1408 == 4 else_jump @MOB_RAN_1998 $CELLPHONE_CALL_ID = 66 $1408 = 5 :MOB_RAN_1998if   $1408 == 3 else_jump @MOB_RAN_2030 $CELLPHONE_CALL_ID = 65 $1408 = 4 :MOB_RAN_2030if   $1408 == 2 else_jump @MOB_RAN_2062 $CELLPHONE_CALL_ID = 64 $1408 = 3 :MOB_RAN_2062if   $1408 == 1 else_jump @MOB_RAN_2094 $CELLPHONE_CALL_ID = 63 $1408 = 2 :MOB_RAN_2094if   $1408 == 0 else_jump @MOB_RAN_2126 $CELLPHONE_CALL_ID = 62 $1408 = 1 :MOB_RAN_2126gosub @SUB_PHONE_RINGING if   $CALL_ANSWERED == 1 else_jump @MOB_RAN_2165 gosub @SUB_GET_CALL_SUBTITLES gosub @SUB_PLAY_DIALOG :MOB_RAN_2165if   $CALL_ANSWERED == 1 else_jump @MOB_RAN_2197 $1377 = 1 $1411 = 1 :MOB_RAN_2197gosub @SUB_END_CALL jump @MOB_RAN_15 :MOB_RAN_2211if   $1377 == 1 else_jump @MOB_RAN_2253 08A9: load_external_script 76 (DEBT) if 08AB:   external_script 76 (DEBT) loaded else_jump @MOB_RAN_2253 0913: run_external_script 76 (DEBT)  :MOB_RAN_2253jump @MOB_RAN_2267 :MOB_RAN_2260$PHONE_RINGING_FLAG = 0 :MOB_RAN_2267jump @MOB_RAN_15 :GIRLFRIEND_CALLINGthread 'MOB_GF' set_wb_check_to 0 08BA: set $391 bit 11 08C0: clear $391 bit 10 0209: [email protected] = random_int_in_ranges 0 8 :MOB_GF_38wait 150 gosub @SUB_GET_TIME_FROM_LAST_CALL if    Player.Defined($PLAYER_CHAR)else_jump @MOB_GF_1073 if   $TIME_FROM_LAST_CALL_GOT_FLAG == 1 else_jump @MOB_GF_1050 if 001C:   $TIME_FROM_LAST_CALL > $RECALL_TIME // (int) else_jump @MOB_GF_1043 if   [email protected] == 0 else_jump @MOB_GF_264 if   [email protected] == 1 else_jump @MOB_GF_186 $CELLPHONE_CALL_ID = 70 005E: $CELLPHONE_CALL_ID += [email protected] // (int) if   $CELLPHONE_CALL_ID > 77 else_jump @MOB_GF_179 $CELLPHONE_CALL_ID = 77 :MOB_GF_179jump @MOB_GF_194 :MOB_GF_186$CELLPHONE_CALL_ID = 130 :MOB_GF_194gosub @SUB_PHONE_RINGING if   $CALL_ANSWERED == 1 else_jump @MOB_GF_248 08BA: set $391 bit 10 08BC: set $391 bit [email protected] gosub @SUB_GET_CALL_SUBTITLES gosub @SUB_PLAY_DIALOG :MOB_GF_24808C0: clear $391 bit 11 gosub @SUB_END_CALL end_thread :MOB_GF_264if   [email protected] == 1 else_jump @MOB_GF_417 if   [email protected] == 1 else_jump @MOB_GF_347 $CELLPHONE_CALL_ID = 80 005E: $CELLPHONE_CALL_ID += [email protected] // (int) if   $CELLPHONE_CALL_ID > 87 else_jump @MOB_GF_340 $CELLPHONE_CALL_ID = 87 :MOB_GF_340jump @MOB_GF_355 :MOB_GF_347$CELLPHONE_CALL_ID = 131 :MOB_GF_355gosub @SUB_PHONE_RINGING if   $CALL_ANSWERED == 1 else_jump @MOB_GF_401 08BA: set $391 bit 10 gosub @SUB_GET_CALL_SUBTITLES gosub @SUB_PLAY_DIALOG :MOB_GF_40108C0: clear $391 bit 11 gosub @SUB_END_CALL end_thread :MOB_GF_417if   [email protected] == 2 else_jump @MOB_GF_570 if   [email protected] == 1 else_jump @MOB_GF_500 $CELLPHONE_CALL_ID = 90 005E: $CELLPHONE_CALL_ID += [email protected] // (int) if   $CELLPHONE_CALL_ID > 97 else_jump @MOB_GF_493 $CELLPHONE_CALL_ID = 97 :MOB_GF_493jump @MOB_GF_508 :MOB_GF_500$CELLPHONE_CALL_ID = 132 :MOB_GF_508gosub @SUB_PHONE_RINGING if   $CALL_ANSWERED == 1 else_jump @MOB_GF_554 08BA: set $391 bit 10 gosub @SUB_GET_CALL_SUBTITLES gosub @SUB_PLAY_DIALOG :MOB_GF_55408C0: clear $391 bit 11 gosub @SUB_END_CALL end_thread :MOB_GF_570if   [email protected] == 3 else_jump @MOB_GF_730 if   [email protected] == 1 else_jump @MOB_GF_653 $CELLPHONE_CALL_ID = 100 005E: $CELLPHONE_CALL_ID += [email protected] // (int) if   $CELLPHONE_CALL_ID > 107 else_jump @MOB_GF_646 $CELLPHONE_CALL_ID = 107 :MOB_GF_646jump @MOB_GF_661 :MOB_GF_653$CELLPHONE_CALL_ID = 133 :MOB_GF_661gosub @SUB_PHONE_RINGING if   $CALL_ANSWERED == 1 else_jump @MOB_GF_714 08BA: set $391 bit 10 gosub @SUB_GET_CALL_SUBTITLES gosub @SUB_PLAY_DIALOG 08BA: set $391 bit 10 :MOB_GF_71408C0: clear $391 bit 11 gosub @SUB_END_CALL end_thread :MOB_GF_730if   [email protected] == 4 else_jump @MOB_GF_890 if   [email protected] == 1 else_jump @MOB_GF_813 $CELLPHONE_CALL_ID = 110 005E: $CELLPHONE_CALL_ID += [email protected] // (int) if   $CELLPHONE_CALL_ID > 117 else_jump @MOB_GF_806 $CELLPHONE_CALL_ID = 117 :MOB_GF_806jump @MOB_GF_821 :MOB_GF_813$CELLPHONE_CALL_ID = 134 :MOB_GF_821gosub @SUB_PHONE_RINGING if   $CALL_ANSWERED == 1 else_jump @MOB_GF_874 08BA: set $391 bit 10 gosub @SUB_GET_CALL_SUBTITLES gosub @SUB_PLAY_DIALOG 08BA: set $391 bit 10 :MOB_GF_87408C0: clear $391 bit 11 gosub @SUB_END_CALL end_thread :MOB_GF_890if   [email protected] == 5 else_jump @MOB_GF_1043 if   [email protected] == 1 else_jump @MOB_GF_973 $CELLPHONE_CALL_ID = 120 005E: $CELLPHONE_CALL_ID += [email protected] // (int) if   $CELLPHONE_CALL_ID > 127 else_jump @MOB_GF_966 $CELLPHONE_CALL_ID = 127 :MOB_GF_966jump @MOB_GF_981 :MOB_GF_973$CELLPHONE_CALL_ID = 135 :MOB_GF_981gosub @SUB_PHONE_RINGING if   $CALL_ANSWERED == 1 else_jump @MOB_GF_1027 08BA: set $391 bit 10 gosub @SUB_GET_CALL_SUBTITLES gosub @SUB_PLAY_DIALOG :MOB_GF_102708C0: clear $391 bit 11 gosub @SUB_END_CALL end_thread :MOB_GF_1043jump @MOB_GF_1066 :MOB_GF_105008C0: clear $391 bit 11 gosub @SUB_END_CALL end_thread :MOB_GF_1066jump @MOB_GF_1080 :MOB_GF_1073$PHONE_RINGING_FLAG = 0 :MOB_GF_1080jump @MOB_GF_38 :SUB_PHONE_RINGING$1409 = 0 $ONMISSION = 1 $PHONE_RINGING_FLAG = 1 $DIALOG_WAV_ID = 1 03CF: load_wav 23000 as 3 $1417 = 0 0871: init_jump_table $CELLPHONE_CALL_ID total_jumps 12 default_jump 1 @MOB_GF_1479 jumps 70 @MOB_GF_1263 80 @MOB_GF_1281 90 @MOB_GF_1299 100 @MOB_GF_1317 110 @MOB_GF_1335 120 @MOB_GF_1353 130 @MOB_GF_1371 0872: jump_table_jumps 131 @MOB_GF_1389 132 @MOB_GF_1407 133 @MOB_GF_1425 134 @MOB_GF_1443 135 @MOB_GF_1461 -1 @MOB_GF_1497 -1 @MOB_GF_1497 -1 @MOB_GF_1497 -1 @MOB_GF_1497 :MOB_GF_126303E5: show_text_box 'ANSWER0'  // It's a call from Denise. Press ~k~~PED_ANSWER_PHONE~ to answer your cell phone.jump @MOB_GF_1497 :MOB_GF_128103E5: show_text_box 'ANSWER1'  // It's a call from Michelle. Press ~k~~PED_ANSWER_PHONE~ to answer your cell phone.jump @MOB_GF_1497 :MOB_GF_129903E5: show_text_box 'ANSWER2'  // It's a call from Helena. Press ~k~~PED_ANSWER_PHONE~ to answer your cell phone.jump @MOB_GF_1497 :MOB_GF_131703E5: show_text_box 'ANSWER3'  // It's a call from Barbara. Press ~k~~PED_ANSWER_PHONE~ to answer your cell phone.jump @MOB_GF_1497 :MOB_GF_133503E5: show_text_box 'ANSWER4'  // It's a call from Katie. Press ~k~~PED_ANSWER_PHONE~ to answer your cell phone.jump @MOB_GF_1497 :MOB_GF_135303E5: show_text_box 'ANSWER5'  // It's a call from Millie. Press ~k~~PED_ANSWER_PHONE~ to answer your cell phone.jump @MOB_GF_1497 :MOB_GF_137103E5: show_text_box 'ANSWER0'  // It's a call from Denise. Press ~k~~PED_ANSWER_PHONE~ to answer your cell phone.jump @MOB_GF_1497 :MOB_GF_138903E5: show_text_box 'ANSWER1'  // It's a call from Michelle. Press ~k~~PED_ANSWER_PHONE~ to answer your cell phone.jump @MOB_GF_1497 :MOB_GF_140703E5: show_text_box 'ANSWER2'  // It's a call from Helena. Press ~k~~PED_ANSWER_PHONE~ to answer your cell phone.jump @MOB_GF_1497 :MOB_GF_142503E5: show_text_box 'ANSWER3'  // It's a call from Barbara. Press ~k~~PED_ANSWER_PHONE~ to answer your cell phone.jump @MOB_GF_1497 :MOB_GF_144303E5: show_text_box 'ANSWER4'  // It's a call from Katie. Press ~k~~PED_ANSWER_PHONE~ to answer your cell phone.jump @MOB_GF_1497 :MOB_GF_146103E5: show_text_box 'ANSWER5'  // It's a call from Millie. Press ~k~~PED_ANSWER_PHONE~ to answer your cell phone.jump @MOB_GF_1497 :MOB_GF_147903E5: show_text_box 'ANSWER'  // Press ~k~~PED_ANSWER_PHONE~ to answer your cell phone.jump @MOB_GF_1497 :MOB_GF_1497if and  7 > $1409   2 > $CALL_ANSWERED else_jump @MOB_GF_2068 wait 0 0871: init_jump_table $CELLPHONE_CALL_ID total_jumps 12 default_jump 1 @MOB_GF_1876 jumps 70 @MOB_GF_1660 80 @MOB_GF_1678 90 @MOB_GF_1696 100 @MOB_GF_1714 110 @MOB_GF_1732 120 @MOB_GF_1750 130 @MOB_GF_1768 0872: jump_table_jumps 131 @MOB_GF_1786 132 @MOB_GF_1804 133 @MOB_GF_1822 134 @MOB_GF_1840 135 @MOB_GF_1858 -1 @MOB_GF_1894 -1 @MOB_GF_1894 -1 @MOB_GF_1894 -1 @MOB_GF_1894 :MOB_GF_16600512: show_permanent_text_box 'ANSWER0'  // It's a call from Denise. Press ~k~~PED_ANSWER_PHONE~ to answer your cell phone.jump @MOB_GF_1894 :MOB_GF_16780512: show_permanent_text_box 'ANSWER1'  // It's a call from Michelle. Press ~k~~PED_ANSWER_PHONE~ to answer your cell phone.jump @MOB_GF_1894 :MOB_GF_16960512: show_permanent_text_box 'ANSWER2'  // It's a call from Helena. Press ~k~~PED_ANSWER_PHONE~ to answer your cell phone.jump @MOB_GF_1894 :MOB_GF_17140512: show_permanent_text_box 'ANSWER3'  // It's a call from Barbara. Press ~k~~PED_ANSWER_PHONE~ to answer your cell phone.jump @MOB_GF_1894 :MOB_GF_17320512: show_permanent_text_box 'ANSWER4'  // It's a call from Katie. Press ~k~~PED_ANSWER_PHONE~ to answer your cell phone.jump @MOB_GF_1894 :MOB_GF_17500512: show_permanent_text_box 'ANSWER5'  // It's a call from Millie. Press ~k~~PED_ANSWER_PHONE~ to answer your cell phone.jump @MOB_GF_1894 :MOB_GF_17680512: show_permanent_text_box 'ANSWER0'  // It's a call from Denise. Press ~k~~PED_ANSWER_PHONE~ to answer your cell phone.jump @MOB_GF_1894 :MOB_GF_17860512: show_permanent_text_box 'ANSWER1'  // It's a call from Michelle. Press ~k~~PED_ANSWER_PHONE~ to answer your cell phone.jump @MOB_GF_1894 :MOB_GF_18040512: show_permanent_text_box 'ANSWER2'  // It's a call from Helena. Press ~k~~PED_ANSWER_PHONE~ to answer your cell phone.jump @MOB_GF_1894 :MOB_GF_18220512: show_permanent_text_box 'ANSWER3'  // It's a call from Barbara. Press ~k~~PED_ANSWER_PHONE~ to answer your cell phone.jump @MOB_GF_1894 :MOB_GF_18400512: show_permanent_text_box 'ANSWER4'  // It's a call from Katie. Press ~k~~PED_ANSWER_PHONE~ to answer your cell phone.jump @MOB_GF_1894 :MOB_GF_18580512: show_permanent_text_box 'ANSWER5'  // It's a call from Millie. Press ~k~~PED_ANSWER_PHONE~ to answer your cell phone.jump @MOB_GF_1894 :MOB_GF_18760512: show_permanent_text_box 'ANSWER'  // Press ~k~~PED_ANSWER_PHONE~ to answer your cell phone.jump @MOB_GF_1894 :MOB_GF_1894$DIALOG_WAV_ID = 3 gosub @MOB_GF_2311 $1409 += 1 if and  $CALL_ANSWERED == 1   $1409 > 0 else_jump @MOB_GF_1947 jump @MOB_GF_2075 :MOB_GF_1947gosub @MOB_GF_2625 if and  $CALL_ANSWERED == 1   $1409 > 0 else_jump @MOB_GF_1986 jump @MOB_GF_2075 :MOB_GF_1986$1410 = 0 :MOB_GF_1993if   40 > $1410 else_jump @MOB_GF_2061 wait 0 gosub @MOB_GF_2902 if   $CALL_ANSWERED == 1 else_jump @MOB_GF_2047 jump @MOB_GF_2075 :MOB_GF_2047$1410 += 1 jump @MOB_GF_1993 :MOB_GF_2061jump @MOB_GF_1497 :MOB_GF_206801BD: $CURRENT_TIME_IN_MS = current_time_in_ms return :MOB_GF_2075$1417 = 1 01BD: $CURRENT_TIME_IN_MS = current_time_in_ms :MOB_GF_2087if 00E1:   player 0 pressed_key 4 else_jump @MOB_GF_2140 wait 0 if    not Player.Defined($PLAYER_CHAR)else_jump @MOB_GF_2133 $CALL_ANSWERED = 2 return :MOB_GF_2133jump @MOB_GF_2087 :MOB_GF_214003E6: remove_text_box 040D: unload_wav 1 if    Player.Defined($PLAYER_CHAR)else_jump @MOB_GF_2309 03BF: set_player $PLAYER_CHAR ignored_by_everyone 1 0489: set_actor $PLAYER_ACTOR muted 1 Model.Load(#CELLPHONE):MOB_GF_2181if    not Model.Available(#CELLPHONE)else_jump @MOB_GF_2208 wait 0 jump @MOB_GF_2181 :MOB_GF_2208gosub @MOB_GF_2902 if   $CALL_ANSWERED == 2 else_jump @MOB_GF_2240 Model.Destroy(#CELLPHONE)return :MOB_GF_22400729: AS_actor $PLAYER_ACTOR hold_cellphone 1 [email protected] = 0 :MOB_GF_2254if   2000 > [email protected] else_jump @MOB_GF_2309 wait 0 if    not Player.Defined($PLAYER_CHAR)else_jump @MOB_GF_2302 $CALL_ANSWERED = 2 return :MOB_GF_2302jump @MOB_GF_2254 :MOB_GF_2309return :MOB_GF_2311if 83D0:   not wav $DIALOG_WAV_ID loaded else_jump @MOB_GF_2602 wait 0 if    not Player.Defined($PLAYER_CHAR)else_jump @MOB_GF_2363 $CALL_ANSWERED = 2 return jump @MOB_GF_2595 :MOB_GF_2363if or04AD:   actor $PLAYER_ACTOR in_water 02E0:   actor $PLAYER_ACTOR firing_weapon 844B:   not actor $PLAYER_ACTOR on_foot   $ONMISSION == 0    not $ACTIVE_INTERIOR == 0    not $FREEFALL_STAGE == 0 else_jump @MOB_GF_2421 $CALL_ANSWERED = 2 03E6: remove_text_box return :MOB_GF_2421if or0A03:   unknown_gang_war_in_progress 0A0C:   player $PLAYER_CHAR on_jetpack 09BE:   are_text_boxes_locked_to_any_thread else_jump @MOB_GF_2452 $CALL_ANSWERED = 2 03E6: remove_text_box return :MOB_GF_2452if and  $CALL_ANSWERED == 0   $1409 > 0 else_jump @MOB_GF_2524 if 82E0:   not actor $PLAYER_ACTOR firing_weapon else_jump @MOB_GF_2524 if and00E1:   player 0 pressed_key 4    Player.Controllable($PLAYER_CHAR)else_jump @MOB_GF_2524 $CALL_ANSWERED = 1 return :MOB_GF_2524if   $1417 == 1 else_jump @MOB_GF_2568 if 00E1:   player 0 pressed_key 15 else_jump @MOB_GF_2568 $1417 = 2 return :MOB_GF_2568if   $ONMISSION == 0 else_jump @MOB_GF_2595 $CALL_ANSWERED = 2 return :MOB_GF_2595jump @MOB_GF_2311 :MOB_GF_2602if 84AD:   not actor $PLAYER_ACTOR in_water else_jump @MOB_GF_2623 03D1: play_wav $DIALOG_WAV_ID :MOB_GF_2623return :MOB_GF_2625if 83D2:   not wav $DIALOG_WAV_ID ended else_jump @MOB_GF_2900 wait 0 if    not Player.Defined($PLAYER_CHAR)else_jump @MOB_GF_2677 $CALL_ANSWERED = 2 return jump @MOB_GF_2893 :MOB_GF_2677if or04AD:   actor $PLAYER_ACTOR in_water 02E0:   actor $PLAYER_ACTOR firing_weapon 844B:   not actor $PLAYER_ACTOR on_foot   $ONMISSION == 0    not $ACTIVE_INTERIOR == 0    not $FREEFALL_STAGE == 0 else_jump @MOB_GF_2735 $CALL_ANSWERED = 2 03E6: remove_text_box return :MOB_GF_2735if or0A03:   unknown_gang_war_in_progress 0A0C:   player $PLAYER_CHAR on_jetpack 09BE:   are_text_boxes_locked_to_any_thread else_jump @MOB_GF_2766 $CALL_ANSWERED = 2 03E6: remove_text_box return :MOB_GF_2766if and  $CALL_ANSWERED == 0   $1409 > 0 else_jump @MOB_GF_2822 if and00E1:   player 0 pressed_key 4    Player.Controllable($PLAYER_CHAR)else_jump @MOB_GF_2822 $CALL_ANSWERED = 1 return :MOB_GF_2822if   $1417 == 1 else_jump @MOB_GF_2866 if 00E1:   player 0 pressed_key 15 else_jump @MOB_GF_2866 $1417 = 2 return :MOB_GF_2866if   $ONMISSION == 0 else_jump @MOB_GF_2893 $CALL_ANSWERED = 2 return :MOB_GF_2893jump @MOB_GF_2625 :MOB_GF_2900return :MOB_GF_2902if    not Player.Defined($PLAYER_CHAR)else_jump @MOB_GF_2934 $CALL_ANSWERED = 2 return jump @MOB_GF_3166 :MOB_GF_2934if or04AD:   actor $PLAYER_ACTOR in_water 02E0:   actor $PLAYER_ACTOR firing_weapon 844B:   not actor $PLAYER_ACTOR on_foot   $ONMISSION == 0    not $ACTIVE_INTERIOR == 0    not $FREEFALL_STAGE == 0 else_jump @MOB_GF_2992 $CALL_ANSWERED = 2 03E6: remove_text_box return :MOB_GF_2992if or0A03:   unknown_gang_war_in_progress 0A0C:   player $PLAYER_CHAR on_jetpack 09BE:   are_text_boxes_locked_to_any_thread else_jump @MOB_GF_3023 $CALL_ANSWERED = 2 03E6: remove_text_box return :MOB_GF_3023if and  $CALL_ANSWERED == 0   $1409 > 0 else_jump @MOB_GF_3095 if 82E0:   not actor $PLAYER_ACTOR firing_weapon else_jump @MOB_GF_3095 if and00E1:   player 0 pressed_key 4    Player.Controllable($PLAYER_CHAR)else_jump @MOB_GF_3095 $CALL_ANSWERED = 1 return :MOB_GF_3095if   $1417 == 1 else_jump @MOB_GF_3139 if 00E1:   player 0 pressed_key 15 else_jump @MOB_GF_3139 $1417 = 2 return :MOB_GF_3139if   $ONMISSION == 0 else_jump @MOB_GF_3166 $CALL_ANSWERED = 2 return :MOB_GF_3166return :SUB_END_CALL$PHONE_RINGING_FLAG = 0 040D: unload_wav 1 040D: unload_wav 2 040D: unload_wav 3 $CALL_ANSWERED = 0 $CALL_TIME_STORED_FLAG = 0 if    Player.Defined($PLAYER_CHAR)else_jump @MOB_GF_3245 0729: AS_actor $PLAYER_ACTOR hold_cellphone 0 Player.CanMove($PLAYER_CHAR) = True03BF: set_player $PLAYER_CHAR ignored_by_everyone 0 0489: set_actor $PLAYER_ACTOR muted 0 :MOB_GF_324501BD: $CURRENT_TIME_IN_MS = current_time_in_ms $TIME_FROM_LAST_CALL = 0 01BD: $TEMPVAR_CALL_TIME = current_time_in_ms 0084: $TIME_FROM_LAST_CALL = $TEMPVAR_CALL_TIME // (int) 0060: $TIME_FROM_LAST_CALL -= $CURRENT_TIME_IN_MS // (int) 00BE: text_clear_all if   $1416 == 0 else_jump @MOB_GF_3307 03E6: remove_text_box jump @MOB_GF_3314 :MOB_GF_3307$1416 = 0 :MOB_GF_3314Model.Destroy(#CELLPHONE)$ONMISSION = 0 return :SUB_PLAY_DIALOG$DIALOG_INDEX = 0 :MOB_GF_333503CF: load_wav $DIALOG_WAV($DIALOG_INDEX,20i) as 1 $DIALOG_INDEX += 1 if 002C:   $DIALOG_ARRAY_SIZE >= $DIALOG_INDEX // (int) else_jump @MOB_GF_3383 03CF: load_wav $DIALOG_WAV($DIALOG_INDEX,20i) as 2 :MOB_GF_3383$DIALOG_INDEX -= 1 $DIALOG_WAV_ID = 1 gosub @MOB_GF_2311 00BC: show_text_highpriority GXT $DIALOG_SUBTITLES($DIALOG_INDEX,20s) time 10000 flag 1 gosub @MOB_GF_2625 if   $1417 == 2 else_jump @MOB_GF_3445 return :MOB_GF_3445$DIALOG_INDEX += 1 if 002C:   $DIALOG_ARRAY_SIZE >= $DIALOG_INDEX // (int) else_jump @MOB_GF_3513 $DIALOG_WAV_ID = 2 gosub @MOB_GF_2311 00BC: show_text_highpriority GXT $DIALOG_SUBTITLES($DIALOG_INDEX,20s) time 10000 flag 1 gosub @MOB_GF_2625 jump @MOB_GF_3520 :MOB_GF_3513$DIALOG_INDEX -= 1 :MOB_GF_3520if   $1417 == 2 else_jump @MOB_GF_3540 return :MOB_GF_3540$DIALOG_INDEX += 1 if   $HELP_SKIPCALL_SHOWN == 0 else_jump @MOB_GF_3583 03E5: show_text_box 'CELSKIP'  // ~k~~VEHICLE_ENTER_EXIT~ To skip a cellphone call.$HELP_SKIPCALL_SHOWN = 1 :MOB_GF_3583if 002C:   $DIALOG_ARRAY_SIZE >= $DIALOG_INDEX // (int) else_jump @MOB_GF_3609 jump @MOB_GF_3335 :MOB_GF_360900BE: text_clear_all return 

I will cook up a script in a minute, just let me finish something :)

Edited by deltaCJ
  • Like 1

Share this post


Link to post
Share on other sites
EAZYJ

Ok man, I'm waiting (and trying to learn more about jump table at the same time.) :)

Edited by EAZYJ
  • Like 1

Share this post


Link to post
Share on other sites
madleg

imo best way to do things like this is to use combination of "starter" and "mission"

 

annoying phone:

 

 

1st one is "starter"; it will be loaded by game. Second one is "mission"; it will be loaded and terminated by "starter" or end itself

{$CLEO .cs}0000:// main cyclewhile true    wait 0    if and        Player.Defined($PLAYER_CHAR)        $ONMISSION == 0        then        if and            $ON_PHONE == 0            $PHONE_RINGING == 0             not Actor.Driving($PLAYER_ACTOR)            810F:   player $PLAYER_CHAR wanted_level > 0 // not > 0            then                        // all conditions checked, we're free to call player; load files first                        03CF: load_wav 23000 as 3            Model.Load(#CELLPHONE)                        repeat                wait 0                if and                    Model.Available(#CELLPHONE)                    03D0:   wav 3 loaded                    then                    break // break this cycle files ready                end            until false                        // phone ringing            03E5: show_text_box 'ANSWER'            03D1: play_wav 3            $PHONE_RINGING = 1            $ONMISSION = 1                        // phone cycle                        while true                wait 0                if or                    Actor.Driving($PLAYER_ACTOR)                    010F:   player $PLAYER_CHAR wanted_level > 0                    then                    $PHONE_RINGING = 0                    break // break phone cycle (ringing atm)                end                            if                    03D2:   wav 3 ended                    then                    03E5: show_text_box 'ANSWER'                    03D1: play_wav 3 // play sound and show tip again if ended                end                if and                    not wasted_or_busted                    00E1: key_pressed 0 4  // ~k~~PED_ANSWER_PHONE~/ ~k~~PED_FIREWEAPON_ALT~                    then                    $ON_PHONE = 1                    $PHONE_RINGING = 0                    0729: AS_actor $PLAYER_ACTOR hold_cellphone 1                    01B9: set_actor $PLAYER_ACTOR armed_weapon_to 0                    0A92: create_custom_thread "conversation.sd"                    wait 0                                        03E5: show_text_box 'CELSKIP'                                        // conversation cycle                                        while true                        wait 0                        0AAA: [email protected] = thread 'CNVN01' pointer                           if or                            [email protected] == 0                // thread not found (our dialogue thread has been ened)                            00E1: key_pressed 0 15 // ~k~~VEHICLE_ENTER_EXIT~                            then                                                        // hang down                                                        $ON_PHONE = 0                            0729: AS_actor $PLAYER_ACTOR hold_cellphone 0                            if                                [email protected] <> 0  // dialogue thread exists - terminate it                                then                                0ABA: end_custom_thread_named 'CNVN01'                            end                            break                        end                        if                            wasted_or_busted                            then                            $ON_PHONE = 0                            0ABA: end_custom_thread_named 'CNVN01'                            break // break conversation cycle                        end                      end                    wait 3000 // wait animations                    break // conversation ended, break phone cycle                end            end                        $ONMISSION = 0            040D: unload_wav 3            Model.Destroy(#CELLPHONE)            wait 1000        end    endend
{$CLEO .sd}0000:thread 'CNVN01'wait 5000ACE: show_formatted_text_box "THIS"wait 5000ACE: show_formatted_text_box "IS"wait 5000ACE: show_formatted_text_box "SPARTA"wait 50000ACE: show_formatted_text_box "thread has been not interrupted"end_thread 

 

 

Edited by madleg

Share this post


Link to post
Share on other sites
deltaCJ

imo best way to do things like this is to use combination of "starter" and "mission"

 

anoying phone:

 

1st one is "starter"; it will be loaded by game. Second one is "mission"; it will be loaded and terminated by "starter" or end itself

{$CLEO .cs}0000:// main cyclewhile true    wait 0    if and        Player.Defined($PLAYER_CHAR)        $ONMISSION == 0        then        if and            $ON_PHONE == 0            $PHONE_RINGING == 0             not Actor.Driving($PLAYER_ACTOR)            810F:   player $PLAYER_CHAR wanted_level > 0 // not > 0            then                        // all conditions checked, we're free to call player; load files first                        03CF: load_wav 23000 as 3            Model.Load(#CELLPHONE)                        repeat                wait 0                if and                    Model.Available(#CELLPHONE)                    03D0:   wav 3 loaded                    then                    break // break this cycle files ready                end            until false                        // phone ringing            03E5: show_text_box 'ANSWER'            03D1: play_wav 3            $PHONE_RINGING = 1            $ONMISSION = 1                        // phone cycle                        while true                wait 0                if or                    Actor.Driving($PLAYER_ACTOR)                    010F:   player $PLAYER_CHAR wanted_level > 0                    then                    $PHONE_RINGING = 0                    break // break phone cycle (ringing atm)                end                            if                    03D2:   wav 3 ended                    then                    03E5: show_text_box 'ANSWER'                    03D1: play_wav 3 // play sound and show tip again if ended                end                if and                    not wasted_or_busted                    00E1: key_pressed 0 4  // ~k~~PED_ANSWER_PHONE~/ ~k~~PED_FIREWEAPON_ALT~                    then                    $ON_PHONE = 1                    $PHONE_RINGING = 0                    0729: AS_actor $PLAYER_ACTOR hold_cellphone 1                    01B9: set_actor $PLAYER_ACTOR armed_weapon_to 0                    0A92: create_custom_thread "conversation.sd"                                        // conversation logic                                        03E5: show_text_box 'CELSKIP'                                        // conversation cycle                                        while true                        wait 0                        0AAA: [email protected] = thread 'CNVN01' pointer                           if or                            [email protected] == 0                // thread not found (our dialogue thread has been ened)                            00E1: key_pressed 0 15 // ~k~~VEHICLE_ENTER_EXIT~                            then                                                        // hang down                                                        $ON_PHONE = 0                            0729: AS_actor $PLAYER_ACTOR hold_cellphone 0                            if                                [email protected] <> 0  // dialogue thread exists - terminate it                                then                                end_thread_named 'CNVN01'                            end                            break                        end                        if                            wasted_or_busted                            then                            $ON_PHONE = 0                            break // break conversation cycle                        end                      end                    wait 3000 // wait animations                    break // conversation ended, break phone cycle                end            end                        $ONMISSION = 0            040D: unload_wav 3            Model.Destroy(#CELLPHONE)            wait 1000        end    endend
{$CLEO .sd}0000:thread 'CNVN01'wait 5000ACE: show_formatted_text_box "THIS"wait 5000ACE: show_formatted_text_box "IS"wait 5000ACE: show_formatted_text_box "SPARTA"wait 50000ACE: show_formatted_text_box "thread has been not interrupted"end_thread 

 

 

 

 

This could, be helpful but the phone calls happen before the mission starts, and sometimes even unlocks other missions, than just one, and can even unlock other stuff, like clothes, gym, stuff like that.

Share this post


Link to post
Share on other sites
EAZYJ

Thank you but I don't want to make a cleo, I want to make a complete new game from start, will this work in the main.scm ?

Share this post


Link to post
Share on other sites
deltaCJ

Thank you but I don't want to make a cleo, I want to make a complete new game from start, will this work in the main.scm ?

Yes, it will work, but you'll have to make a sniffer thread.

Share this post


Link to post
Share on other sites
ZAZ

You're using gosub in wrong way and therefor the crash.
Also this first conditional check is wrong here

:CELLPH_5if wasted_or_bustedgosub @CELLPH_2914jump @CELLPH_11

because wasted_or_busted condition works only in valid mission scripts

please don't try to write real mission script, it's not needed in your case as long as don't write very big script or want to spawn a lot of stuff

Learn coding by writing small and simple scripts, called thread in case of main.scm editing, that are placed in the main part of the main.scm

read more here: GTA SA Main.scm coding Tutorial

About gosub:
The gosub command leads the reading process to a "subscript"
This "subscript" must be finished with 0051: return

0051: returnorreturn

read more here

  • Like 1

Share this post


Link to post
Share on other sites
deltaCJ

I was able to make this script, it's not very good, and not perfected, and doesn't have a call back feature, but it works here:

DEFINE MISSIONS 1//DEFINE MISSION {ID} 0 AT {LABEL} @ \DEFINE MISSION 0 AT @CELLFONDEFINE EXTERNAL_SCRIPTS 0 // Use -1 in order not to compile AAA script//DEFINE SCRIPT {NAME}  AT {LABEL} @DEFINE UNKNOWN_EMPTY_SEGMENT 0DEFINE UNKNOWN_THREADS_MEMORY 0//-------------MAIN---------------03A4: name_thread 'MAIN'016A: fade  0 ()  0 ms01F0: set_max_wanted_level_to  600C0: set_current_time  10  0$SpawnX = 0.0$SpawnY = 0.0$SpawnZ = 5.004E4: unknown_refresh_game_renderer_at  $SpawnX $SpawnY03CB: set_camera  $SpawnX $SpawnY $SpawnZ062A: change_stat  165 (energy) to  999.0  ; float062A: change_stat  23 (muscle) to  250.0  ; float062A: change_stat  21 (fat) to  0.0  ; float062A: change_stat  163 (health) to  999.0  ; float062A: change_stat  160 (driving skill) to  999.0  ; float062A: change_stat  229 (bike skill) to  999.0  ; float062A: change_stat  223 (flying skill) to  999.0  ; float062A: change_stat  230 (cicle skill) to  999.0  ; float0629: change_stat  181 (islands unlocked) to  4  ; integer see statdisp.dat0629: change_stat  68 () to  0  ; integer see statdisp.dat0053: $PLAYER_CHAR = create_player #NULL at  $SpawnX $SpawnY $SpawnZ07AF: $PLAYER_GROUP = player $PLAYER_CHAR group01F5: $PLAYER_ACTOR = create_emulated_actor_from_player $PLAYER_CHAR0373: set_camera_directly_behind_player0173: set_actor $PLAYER_ACTOR z_angle_to  262.001B6: set_weather  1087B: set_player $PLAYER_CHAR clothes "bballjackrstar" "bbjack"  0087B: set_player $PLAYER_CHAR clothes "JEANSDENIM" "JEANS"  2087B: set_player $PLAYER_CHAR clothes "SNEAKERBINCBLK" "SNEAKER"  3087B: set_player $PLAYER_CHAR clothes "PLAYER_FACE" "HEAD"  1077E: get_active_interior_to $ACTIVE_INTERIOR04BB: select_interior  00180: set_on_mission_flag_to $ONMISSION // Note: your missions have to use the variable defined here 01B7: release_weather016C: restart_if_wasted at  $SpawnX $SpawnY $SpawnZ angle  0.0 unknown  0070D: rebuild_player $PLAYER_CHAR016A: fade  1 ()  1000 ms0001: wait  100 ms03E6: remove_text_boxcreate_thread @SNIFFcreate_thread @CALLMEPLS:MAIN_1wait 0$DEFAULT_WAIT_TIME = 250$TEST = 0$MARKER_TESTX = 3.7401$MARKER_TESTY = 6.7105$MARKER_TESTZ = 3.1096 end_thread:SNIFFthread "SNIFF"$MARKER = Marker.CreateIconAndSphere(42, 2.5767, 14.3447, 3.1172)repeat wait $DEFAULT_WAIT_TIME  if and   player.Defined($PLAYER_CHAR)   $ONMISSION == 0  then   if and     00FF:   actor $PLAYER_ACTOR sphere 1 in_sphere 2.5767 14.3447 3.1172 radius 2.0 2.0 2.0 on_foot      Player.Controllable($PLAYER_CHAR)     $TEST == 0   then     $ONMISSION = 1     00BA: show_text_styled GXT 'INTRO_1' time 1000 style 2      start_mission 0     end  enduntil $TEST == 1marker.Disable($MARKER)end_thread:SUB_GET_TIME_FROM_LAST_CALLwait 0if    Player.Defined($PLAYER_CHAR)else_jump @NONAME_449if   $ONMISSION == 0 else_jump @NONAME_449if   $ACTIVE_INTERIOR == 0 else_jump @NONAME_449if 89BE:   not are_text_boxes_locked_to_any_thread else_jump @NONAME_449if    Player.Controllable($PLAYER_CHAR)else_jump @NONAME_449 if 044B:   actor $PLAYER_ACTOR on_foot else_jump @NONAME_449if    not Player.WantedLevel($PLAYER_CHAR) > 0else_jump @NONAME_449 jump @NONAME_449:NONAME_449return:CALLMESTARTwait 90 if  $ONMISSION == 0else_jump @CALLMESTART_2 01BD: $CURRENT_TIME_IN_MS = current_time_in_ms:CALLMESTART_2wait 0end_thread :CALLMEPLSthread "CALLMEPLS"wait 0if    $TEST == 1else_jump @CALLMEPLSif    $ONMISSION == 0else_jump @CALLMEPLSif    player.Defined($PLAYER_CHAR)else_jump @CALLMEPLSwait 2500model.Load(#CELLPHONE)038B: load_requested_models$CALL_IGNORED = 0$ONMISSION = 1 $PHONE_RINGING_FLAG = 1 03CF: load_wav 23000 as 303D1: play_wav 303E5: show_text_box 'ANSWER'  // Respect can be earned be passing certain missions, killing rival gangs members, gaining territory and tagging.jump @CALLMEPLS_2:CALLMEPLS_IGNOREwait 003D5: remove_text 'ANSWER'  // Press ~k~~TOGGLE_SUBMISSIONS~ to toggle taxi missions on or off.$CALL_IGNORED += 1gosub @SUB_GET_TIME_FROM_LAST_CALL:SUB_END_CALLwait 0if    Player.Defined($PLAYER_CHAR)else_jump @SUB_END_CALL0729: AS_actor $PLAYER_ACTOR hold_cellphone 0wait 4000Model.Destroy(#CELLPHONE)$ONMISSION = 0 return :CALLMEPLS_RETURNwait 0if     $CALL_IGNORED >= 0else_jump @CALLMEPLS_IGNOREif   $TIME_FROM_LAST_CALL >= 34else_jump @CALLMEPLS_IGNOREjump @CALLMEPLS:CALLMEPLS_2wait 0if    model.Available(#CELLPHONE)else_jump @CALLMEPLS_2if       00E1:   player 0 pressed_key 4  else_jump @CALLMEPLS_203D5: remove_text 'ANSWER'0729: AS_actor $PLAYER_ACTOR hold_cellphone 1//DISPLAY TEXT HERE//DISPLAY TEXT HERE//DISPLAY TEXT HERE//DISPLAY TEXT HERE//DISPLAY TEXT HERE//DISPLAY TEXT HERE//DISPLAY TEXT HERE//DISPLAY TEXT HEREwait 5000gosub @SUB_END_CALL:CALLMEPLS_ENDTHREADend_thread:CELLFONthread 'CELLFON'gosub @CELLFON_40ifwasted_or_bustedjf @CELLFON_38gosub @CELLFON_18145:CELLFON_38$ONMISSION = 0mission_cleanupend_thread:CELLFON_40increment_mission_attempts$ONMISSION = 1wait 3000:CELLFON_181000318: set_latest_mission_passed 'INTRO_1'0998: add_respect 3Player.Money($PLAYER_CHAR) += 100Player.ClearWantedLevel($PLAYER_CHAR)$TEST = 1return:CELLFON_18140 //if PLAYER_ACTOR wasted or bustedreturn:CELLFON_1814500BA: text_styled 'M_FAIL' 5000 ms 1return     

Replace this in a different main and test it out.

Share this post


Link to post
Share on other sites
EAZYJ

So a phone call is considered as a mission? It could make sense since most things are disabled when ONMISSION.

 

I replaced your script with MISSION 26 on my stripped main since I can't add more than there already are, for some reason.

 

"A jump to zero offset found" :/

Share this post


Link to post
Share on other sites
deltaCJ

So a phone call is considered as a mission? It could make sense since most things are disabled when ONMISSION.

 

I replaced your script with MISSION 26 on my stripped main since I can't add more than there already are, for some reason.

 

"A jump to zero offset found" :/

nononon it's not a misssion

 

I made the CELLFON thing a mission to trigger the sniffer and cellphone call thread

Share this post


Link to post
Share on other sites
EAZYJ

What does the SNIFF do ?

 

I'd like to make a script that when I mention somewhere in the main.scm: $PHONE_CALL_ID = 1, the cellphone script triggers, with the dialogs 1 during the call.

 

So should I do something like.

 

> $PHONE_CALL_ID = [email protected] (memorise the number [email protected]) so a variable, I guess. Local? Global?

 

> triggers the cellphone script, phone ringing.

 

> Use the dialogs from $PHONE_CALL_ID = [email protected] (exemple [email protected] = 3)

 

dialogs 3

"Hey man, meet me at the store"

"Ok, I'm coming"

 

> phone hangup

 

(If wasted or busted of course call stops and players is called back 20s after)

 

then later, the script encounters a $PHONE_CALL_ID = 4

 

do the same things with dialogs 4

 

I'm not asking you to do it for me, but I'd like some advices. :) I know it must be too hard for an apprentice like me.

 

Thanks

Edited by EAZYJ

Share this post


Link to post
Share on other sites
deltaCJ

Ah, ok

 

First, Sniffer checks how many mission passed and stuff

 

You would make the $PHONE_CALL_ID = to the ID of the phone call

the jump table will take that number and just jump to the label that is associated with it (I'll explain later, i am currently busy)

 

So then you'd appoint the label from the jumptable and carry on the conversation there.

 

Honestly, The call back feature is kinda hard for me to wrap my head around, as there is no time opcode

 

But yeah, you could possible try to attempt, it but i'm not able to sadly :(

Edited by deltaCJ

Share this post


Link to post
Share on other sites
EAZYJ

Ok I made some progress (I think, I haven't tested it yet)

 

Please tell me if I have done something wrong.

And what should I do next to link them all now?

 :CELLFONthread 'CELLFON'$CALL_ANSWERED = 0$RECALL_TIME = 20000 :SUB_PHONE_RINGING // when the phone ringswait 0if    $ONMISSION == 0 else_jump @SUB_PHONE_RINGINGif    Player.Defined($PLAYER_CHAR)else_jump @SUB_PHONE_RINGINGif    Player.Controllable($PLAYER_CHAR)else_jump @SUB_PHONE_RINGINGif    not Player.WantedLevel($PLAYER_CHAR) > 1else_jump @SUB_PHONE_RINGINGwait 1000{Model.Load(#CELLPHONE)038B: load_requested_models}03CF: load_wav 23000 as 3wait 500 $ONMISSION = 1 $PHONE_RINGING_FLAG = 1 wait 50003D1: play_wav 303E5: show_text_box 'ANSWER'  :SUB_END_CALL  // when the call ends$PHONE_RINGING_FLAG = 0 040D: unload_wav 1 040D: unload_wav 2 040D: unload_wav 3 $CALL_ANSWERED = 0 $CALL_TIME_STORED_FLAG = 0 0729: AS_actor $PLAYER_ACTOR hold_cellphone 0 Player.CanMove($PLAYER_CHAR) = True03BF: set_player $PLAYER_CHAR ignored_by_everyone 0 0489: set_actor $PLAYER_ACTOR muted 0  :SUB_GET_CALL_SUBTITLES   // jump table to get the dialog specific to each call number0871: init_jump_table $CELLPHONE_CALL_ID total_jumps 1 default_jump 0 @CELLFON_10158 jumps 0 @CELLFON_10241 1 @CELLFON_10347 2 @CELLFON_10417 3 @CELLFON_10550 4 @CELLFON_10670 5 @CELLFON_10789 6 @CELLFON_10834 7  :CELLFON_10158  // first call from the game, so $CELLPHONE_CALL_ID = 0 gives these lines when phone answered.wait 000BC: show_text_highpriority GXT 'CAS11AA' time 4000 flag 1wait 420000BC: show_text_highpriority GXT 'CAS11AB' time 3000 flag 1wait 320000BC: show_text_highpriority GXT 'CAS11AC' time 6000 flag 1wait 620000BC: show_text_highpriority GXT 'CAS11AD' time 2500 flag 1wait 270000BC: show_text_highpriority GXT 'CAS11BA' time 3000 flag 1                 wait 320000BC: show_text_highpriority GXT 'CAS11BB' time 3000 flag 1wait 3200jump @CELLFON_30044 :CELLFON_10241jump @CELLFON_30044 :CELLFON_10347jump @CELLFON_30044 :CELLFON_10417jump @CELLFON_30044 :CELLFON_10550jump @CELLFON_30044 :CELLFON_10670jump @CELLFON_30044 :CELLFON_10789jump @CELLFON_30044 :CELLFON_10834jump @CELLFON_30044 :CELLFON_30044jump @CELLFON_38052 :CELLFON_38052return  
Edited by EAZYJ

Share this post


Link to post
Share on other sites
deltaCJ

The jump table is incorrect, and you are jumping to a thread that doesn't exist??

Share this post


Link to post
Share on other sites
EAZYJ

Ah yes, mistake at the jump table it should be 8 to total_jumps and 7 at the end.

 

 

you are jumping to a thread that doesn't exist??

 

Where do you see that?

 

EDIT: Ah no, I wanted to put a subroutine so it doesn't jump.

Edited by EAZYJ

Share this post


Link to post
Share on other sites
deltaCJ

Other than that it looks fine :)

Share this post


Link to post
Share on other sites
EAZYJ

It looks fine but it crashes the game !!!!

 

Here's the deal, there's a phone call after the short introduction. Intro works but a few seconds after intro the game crashes

 

 

 :CELLFONthread 'CELLFON' $CALL_ANSWERED = 0 $RECALL_TIME = 20000  :SUB_PHONE_RINGING // when the phone ringswait 0if    $ONMISSION == 0 else_jump @SUB_PHONE_RINGINGif    Player.Defined($PLAYER_CHAR)else_jump @SUB_PHONE_RINGINGif    Player.Controllable($PLAYER_CHAR)else_jump @SUB_PHONE_RINGINGif    not Player.WantedLevel($PLAYER_CHAR) > 1else_jump @SUB_PHONE_RINGINGwait 1000{Model.Load(#CELLPHONE)038B: load_requested_models}03CF: load_wav 23000 as 3wait 500 $ONMISSION = 1 $PHONE_RINGING_FLAG = 1 wait 50003D1: play_wav 303E5: show_text_box 'ANSWER'jump @CELLFON_466  :SUB_END_CALL  // when the call ends$PHONE_RINGING_FLAG = 0 040D: unload_wav 1 040D: unload_wav 2 040D: unload_wav 3 $CALL_ANSWERED = 0 $CALL_TIME_STORED_FLAG = 0 0729: AS_actor $PLAYER_ACTOR hold_cellphone 0 Player.CanMove($PLAYER_CHAR) = True03BF: set_player $PLAYER_CHAR ignored_by_everyone 0 0489: set_actor $PLAYER_ACTOR muted 0jump @CELLFON_466   :CELLFON_2100871: init_jump_table $CELLPHONE_CALL_ID total_jumps 8 default_jump 0 @CELLFON_273 jumps 0 @CELLFON_410 1 @CELLFON_417 2 @CELLFON_424 3 @CELLFON_431 4 @CELLFON_438 5 @CELLFON_445 6 @CELLFON_452 7 :CELLFON_273wait 0 00BC: show_text_highpriority GXT 'CAS11AA' time 4000 flag 1  // ~z~Alright, you guys better get out of Las Venturas, fast!wait 4200 00BC: show_text_highpriority GXT 'CAS11AB' time 3000 flag 1  // ~z~I'll be in touch.wait 3200 00BC: show_text_highpriority GXT 'CAS11AC' time 6000 flag 1  // ~z~What about your backup, man, will you be a'right without us?wait 6200 00BC: show_text_highpriority GXT 'CAS11AD' time 2500 flag 1  // ~z~Of course he will, you f*cking moron, come on!wait 2700 00BC: show_text_highpriority GXT 'CAS11BA' time 3000 flag 1  // ~z~This is private flight CJ101 on approach to Liberty, over.wait 3200 00BC: show_text_highpriority GXT 'CAS11BB' time 3000 flag 1  // ~z~Flight CJ101, we have you on our scope.wait 3200gosub @SUB_END_CALL jump @CELLFON_459  :CELLFON_410jump @CELLFON_459  :CELLFON_417jump @CELLFON_459  :CELLFON_424jump @CELLFON_459  :CELLFON_431jump @CELLFON_459  :CELLFON_438jump @CELLFON_459  :CELLFON_445jump @CELLFON_459  :CELLFON_452jump @CELLFON_459  :CELLFON_459jump @CELLFON_466  :CELLFON_466return end_thread  thread 'VEHICULE_TAR' jump @VEHICULE_TAR_26  :VEHICULE_TAR_26Model.Load(#SULTAN)038B: load_requested_models 054C: use_GXT_table 'SWEET1' jump @VEHICULE_TAR_51  :VEHICULE_TAR_51wait 0 if    Player.Defined($PLAYER_CHAR)else_jump @VEHICULE_TAR_51 if   [email protected] == 0 else_jump @VEHICULE_TAR_51 if   $INTRODUCTION_PASSED == 1 else_jump @VEHICULE_TAR_51 if 00EC:   actor $PLAYER_ACTOR sphere 0 near_point 1354.295 -629.085 radius 109.13 100.0 else_jump @VEHICULE_TAR_51 jump @VEHICULE_TAR_152  :VEHICULE_TAR_152wait 0 if    Model.Available(#SULTAN)else_jump @VEHICULE_TAR_152 jump @VEHICULE_TAR_179  :VEHICULE_TAR_179wait 0 [email protected] = Car.Create(#SULTAN, 1357.991, -620.9749, 108.761)Car.Angle([email protected]) = 19.110229: set_car [email protected] primary_color_to 118 secondary_color_to 118 [email protected] = 1 jump @VEHICULE_TAR_239  :VEHICULE_TAR_239wait 0 if    Car.Wrecked([email protected])else_jump @VEHICULE_TAR_239 wait 10000 Car.Destroy([email protected])wait 10000 [email protected] = 0 03E5: show_text_box 'SWE1_S'  // ~s~Get back in ~b~Sweet's car!Player.Money($PLAYER_CHAR) += -100wait 6000 03E6: remove_text_box jump @VEHICULE_TAR_51 end_thread  :INTRODUCTIONthread 'INTRODUCTION' jump @INTRODUCTION_26  :INTRODUCTION_26if    Player.Defined($PLAYER_CHAR)else_jump @INTRODUCTION_26 if   $INTRODUCTION_PASSED == 0 else_jump @INTRODUCTION_26 jump @INTRODUCTION_67  :INTRODUCTION_67wait 0 fade 0 0 02A3: enable_widescreen 1 03BF: set_player $PLAYER_CHAR ignored_by_everyone 1 01B9: set_actor $PLAYER_ACTOR armed_weapon_to 0 Model.Load(#CEHOLLYHIL03)Model.Load(#CE_SAFEGROUND)Model.Load(#GEN_DOOREXT15)Model.Load(#c*ntE_HOLLYHIL9)Model.Load(#HILLHOUSE13_LA)Model.Load(#SULTAN)Model.Load(#CIGAR)054C: use_GXT_table 'SWEET1' 04ED: load_animation "SMOKING" 038B: load_requested_models 0952: load_soundtrack 9$ONMISSION = 1 jump @INTRODUCTION_164  :INTRODUCTION_164wait 0 if or   Model.Available(#CEHOLLYHIL03)   Model.Available(#CE_SAFEGROUND)   Model.Available(#GEN_DOOREXT15)   Model.Available(#c*ntE_HOLLYHIL9)   Model.Available(#HILLHOUSE13_LA)   Model.Available(#SULTAN)   Model.Available(#CIGAR)84EE:   not animation "SMOKING" loaded else_jump @INTRODUCTION_67 if    Player.Controllable($PLAYER_CHAR)else_jump @INTRODUCTION_67 jump @INTRODUCTION_247  :INTRODUCTION_247wait 0 [email protected] = Car.Create(#SULTAN, 1357.991, -620.9749, 108.761)Car.Angle([email protected]) = [email protected] = Object.Create(#CIGAR, 1334.674, -627.3568, 109.1349)0229: set_car [email protected] primary_color_to 118 secondary_color_to 118 jump @INTRODUCTION_322  :INTRODUCTION_322wait 0 0954: start_playing_loaded_soundtrack 0925: restore_camera_to_user_defined fade 1 500 Player.CanMove($PLAYER_CHAR) = False0936: set_camera 1314.485 -595.1082 101.1887 position_to 1314.644 -595.3785 134.9994 time 5700 smooth_transition 1 0920: point_camera 1333.108 -632.343 112.0725 transverse_to 1332.91 -631.8947 109.1349 time 3700 smooth_transition 1 070A: AS_actor $PLAYER_ACTOR attach_to_object [email protected] offset 0.04 0.1 -0.02 on_bone 5 16 perform_animation "M_SMKSTND_LOOP" IFP_file "SMOKING" time 1 00BC: show_text_highpriority GXT 'SWE1_BQ' time 8000 flag 1  // ~z~I'm kinda short, you know.092F: lock_camera_target_point 1 0930: lock_camera_position 1 wait 5700 jump @INTRODUCTION_508  :INTRODUCTION_508wait 0 0936: set_camera 1361.265 -594.0705 128.0118 position_to 1297.019 -618.9809 130.6665 time 5400 smooth_transition 1 0920: point_camera 1334.543 -630.555 109.1349 transverse_to 1326.743 -632.9979 109.1349 time 3400 smooth_transition 1 0605: actor $PLAYER_ACTOR perform_animation "M_SMKSTND_LOOP" IFP "SMOKING" framedelta 4.0 loop 1 lockX 0 lockY 0 lockF 0 time -1 00BC: show_text_highpriority GXT 'SWE1_CA' time 8000 flag 1  // ~z~There's another two Balla tags in the hood.092F: lock_camera_target_point 1 0930: lock_camera_position 1 wait 5400 jump @INTRODUCTION_667  :INTRODUCTION_667wait 0 0936: set_camera 1341.021 -681.1744 134.3229 position_to 1366.758 -664.8303 134.5622 time 5500 smooth_transition 1 0920: point_camera 1335.074 -652.0664 108.2632 transverse_to 1337.141 -648.4432 108.2632 time 3500 smooth_transition 1 00BC: show_text_highpriority GXT 'SWE1_BX' time 8000 flag 1  // ~z~C.R.A.S.H. took all my paper, man, left me with nothing but small change...092F: lock_camera_target_point 1 0930: lock_camera_position 1 wait 5500 jump @INTRODUCTION_781  :INTRODUCTION_781wait 0 0936: set_camera 1333.431 -625.676 110.7648 position_to 1333.431 -625.676 110.7648 time 8000 smooth_transition 1 0920: point_camera 1335.71 -629.6918 109.1349 transverse_to 1335.71 -629.6918 109.1349 time 6000 smooth_transition 1 00BA: show_text_styled GXT 'SWE1_BU' time 14000 style 2  // ~z~I'll catch up with you.092F: lock_camera_target_point 1 0930: lock_camera_position 1 wait 8000 0955: end_playing_loaded_soundtrack 0925: restore_camera_to_user_defined 04EF: release_animation "SMOKING" wait 0 jump @INTRODUCTION_914  :INTRODUCTION_914wait 0$ONMISSION = 0 $INTRODUCTION_PASSED = 1 0952: load_soundtrack 9 Car.Destroy([email protected])Object.Destroy([email protected])Player.CanMove($PLAYER_CHAR) = TrueCamera.Restore_WithJumpCutCamera.SetBehindPlayer02A3: enable_widescreen 0 03BF: set_player $PLAYER_CHAR ignored_by_everyone 0  :INTRODUCTION_961if   $TOTAL_MISSION_PASSED == 0 else_jump @INTRODUCTION_961 $CELLPHONE_CALL_ID = 1gosub @SUB_PHONE_RINGING  gosub @CELLFON_210 end_thread   
Edited by EAZYJ

Share this post


Link to post
Share on other sites
deltaCJ

first, remove these brackets:

{Model.Load(#CELLPHONE)038B: load_requested_models}

Also,

 

Why are you loading map objects?

Model.Load(#CEHOLLYHIL03)Model.Load(#CE_SAFEGROUND)Model.Load(#GEN_DOOREXT15)Model.Load(#c*ntE_HOLLYHIL9)Model.Load(#HILLHOUSE13_LA)

Also, when does it crash?

 

After the introduction when the phone rings, or during the introduction?

 

Are you able to answer phone?

 

Or does it ring and just crash?

Edited by deltaCJ

Share this post


Link to post
Share on other sites
EAZYJ

Brackets removed, still the same.

 

I load map objects cause the new game starts with a cutscene I made and the main objects we see are these. So it loads quickly, no distance display problem.

 

Introduction works fine. It crashes when the phone is supposed to ring. It means a few seconds after the introduction. I swear I heard the ring for 0,1 sec before it shows me error message and stops.

Edited by EAZYJ

Share this post


Link to post
Share on other sites
deltaCJ

It's because you make it jump to a thread where i makes it return (a.k.a end the gosub) and it then proceeds to the next gosub which makes it go to the jump table, but no keypress is activated to activate the phone call.

 

There is no hold_cellphone opcode (which makes player go on phone) and there is no player 0 press key 4 opcode (which means if player pressed tab)

 

This script just displays a text box and static text....

 

Use my script, and just edit it.

 

Once again, send me your main script.

Edited by deltaCJ

Share this post


Link to post
Share on other sites
deltaCJ

Here I'll just show you what to do:

// This is my main, with a working cellphone script...create_thread @SNIFFcreate_thread @CALLMEPLS:MAIN_1wait 0$DEFAULT_WAIT_TIME = 250$TEST = 0$MARKER_TESTX = 3.7401$MARKER_TESTY = 6.7105$MARKER_TESTZ = 3.1096 end_thread:SNIFFthread "SNIFF"$MARKER = Marker.CreateIconAndSphere(42, 2.5767, 14.3447, 3.1172)repeat wait $DEFAULT_WAIT_TIME  if and   player.Defined($PLAYER_CHAR)   $ONMISSION == 0  then   if and     00FF:   actor $PLAYER_ACTOR sphere 1 in_sphere 2.5767 14.3447 3.1172 radius 2.0 2.0 2.0 on_foot      Player.Controllable($PLAYER_CHAR)     $TEST == 0   then     $ONMISSION = 1     00BA: show_text_styled GXT 'INTRO_1' time 1000 style 2      start_mission 0     end  enduntil $TEST == 1marker.Disable($MARKER)end_thread:SUB_GET_TIME_FROM_LAST_CALLwait 0if    Player.Defined($PLAYER_CHAR)else_jump @NONAME_449if   $ONMISSION == 0 else_jump @NONAME_449if   $ACTIVE_INTERIOR == 0 else_jump @NONAME_449if 89BE:   not are_text_boxes_locked_to_any_thread else_jump @NONAME_449if    Player.Controllable($PLAYER_CHAR)else_jump @NONAME_449 if 044B:   actor $PLAYER_ACTOR on_foot else_jump @NONAME_449if    not Player.WantedLevel($PLAYER_CHAR) > 0else_jump @NONAME_449 jump @NONAME_449:NONAME_449return:CALLMESTARTwait 90 if  $ONMISSION == 0else_jump @CALLMESTART_2 01BD: $CURRENT_TIME_IN_MS = current_time_in_ms:CALLMESTART_2wait 0end_thread :CALLMEPLSthread "CALLMEPLS"wait 0if    $TEST == 1else_jump @CALLMEPLSif    $ONMISSION == 0else_jump @CALLMEPLSif    player.Defined($PLAYER_CHAR)else_jump @CALLMEPLSwait 2500model.Load(#CELLPHONE)038B: load_requested_models$CALL_IGNORED = 0$ONMISSION = 1 $PHONE_RINGING_FLAG = 1 03CF: load_wav 23000 as 303D1: play_wav 303E5: show_text_box 'ANSWER'  // Respect can be earned be passing certain missions, killing rival gangs members, gaining territory and tagging.jump @CALLMEPLS_2:CALLMEPLS_IGNOREwait 003D5: remove_text 'ANSWER'  // Press ~k~~TOGGLE_SUBMISSIONS~ to toggle taxi missions on or off.$CALL_IGNORED += 1gosub @SUB_GET_TIME_FROM_LAST_CALL:SUB_END_CALLwait 0if    Player.Defined($PLAYER_CHAR)else_jump @SUB_END_CALL0729: AS_actor $PLAYER_ACTOR hold_cellphone 0wait 4000Model.Destroy(#CELLPHONE)$ONMISSION = 0 return :CALLMEPLS_RETURNwait 0if     $CALL_IGNORED >= 0else_jump @CALLMEPLS_IGNOREif   $TIME_FROM_LAST_CALL >= 34else_jump @CALLMEPLS_IGNOREjump @CALLMEPLS:CALLMEPLS_2wait 0if    model.Available(#CELLPHONE)else_jump @CALLMEPLS_2if       00E1:   player 0 pressed_key 4  else_jump @CALLMEPLS_203D5: remove_text 'ANSWER'0729: AS_actor $PLAYER_ACTOR hold_cellphone 1//DISPLAY TEXT HERE//DISPLAY TEXT HERE//DISPLAY TEXT HERE//DISPLAY TEXT HERE//DISPLAY TEXT HERE//DISPLAY TEXT HERE//DISPLAY TEXT HERE//DISPLAY TEXT HEREwait 5000gosub @SUB_END_CALL:CALLMEPLS_ENDTHREADend_thread:CELLFONthread 'CELLFON'gosub @CELLFON_40ifwasted_or_bustedjf @CELLFON_38gosub @CELLFON_18145:CELLFON_38$ONMISSION = 0mission_cleanupend_thread:CELLFON_40increment_mission_attempts$ONMISSION = 1wait 3000:CELLFON_181000318: set_latest_mission_passed 'INTRO_1'0998: add_respect 3Player.Money($PLAYER_CHAR) += 100Player.ClearWantedLevel($PLAYER_CHAR)$TEST = 1return:CELLFON_18140 //if PLAYER_ACTOR wasted or bustedreturn:CELLFON_1814500BA: text_styled 'M_FAIL' 5000 ms 1return

So first what i did was make a sniffer thread.

 

What's a sniffer thread?

 

A sniffer thread is a check, where it checks to see if certain missions are passed, or if it's a certain time, or if you have a certain skill to play a mission.

 

 

 

 

 

:SNIFF
thread "SNIFF"
$MARKER = Marker.CreateIconAndSphere(42, 2.5767, 14.3447, 3.1172)
repeat
wait $DEFAULT_WAIT_TIME
if and
player.Defined($PLAYER_CHAR)
$ONMISSION == 0
then
if and
00FF: actor $PLAYER_ACTOR sphere 1 in_sphere 2.5767 14.3447 3.1172 radius 2.0 2.0 2.0 on_foot
Player.Controllable($PLAYER_CHAR)
$TEST == 0
then
$ONMISSION = 1
00BA: show_text_styled GXT 'INTRO_1' time 1000 style 2
start_mission 0
end
end
until $TEST == 1
marker.Disable($MARKER)
end_thread

 

Here i make a marker, and make a variable ( Which I stated to equal 0 in the start of my main....)

 

if the player is defined and he is in the marker

set the onmission flag to 1

and start the mission

 

if the mission is complete at the end of the mission (the thread where the mission passed text shows up)

i will switch the $TEST variable to 1

which activates the sniffer thread to check to see if the $TEST variable equals 1

and if it does it will destroy the sphere.

 

Then my :CALLMEPLS script is activated when it sees that $TEST equals 1 and decides to call the player

Then the player is called, and if he presses tab he answers the phone, and that's where you put your text, and that's when it go subs to the :SUB_END_CALL then that's where they clean everything up and end the script.

 

 

 

NOW with the jump table you'd have to make it like this

 

at the end of the mission you state what call ID it is, and the global variable will activate the cellfon thread.

 

This will have you make the script jump to the jumptable, and with the CALLER ID, it will jump to the specified table number it was given.

 

for example, if my introduction phone call is 0

 

the jump table will have the jumps to be $CALLER_ID and if it's 0 it will jump to the 0 thread jump.

 

 

EDIT: Sorry if this is too much, i could describe better over skype or something :pp

Edited by deltaCJ

Share this post


Link to post
Share on other sites
EAZYJ

Ok I'm starting to get it a bit more. :)

 

And I sent you my skype in PM so you can explain me better.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • 2 Users Currently Viewing
    0 members, 0 Anonymous, 2 Guests

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.