Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DEFINE MISSIONS 4
- DEFINE MISSION 0 AT @INITIAL
- DEFINE MISSION 1 AT @CUTSCENE_1
- DEFINE MISSION 2 AT @TUT_MISSION_1
- DEFINE MISSION 3 AT @MISSION_2
- DEFINE EXTERNAL_SCRIPTS 0 // Use -1 in order not to compile AAA script
- //DEFINE SCRIPT {NAME} AT {LABEL} @
- DEFINE UNKNOWN_EMPTY_SEGMENT 0
- DEFINE UNKNOWN_THREADS_MEMORY 0
- var
- $PLAYER_CHAR: Player
- end // var
- 01F0: set_max_wanted_level_to 4
- set_wb_check_to 0
- 00C0: set_current_time 21 0
- 04E4: unknown_refresh_game_renderer_at 889.752 1984.2156 11.3262
- Camera.SetAtPos(895.9604, 1991.7198, 10.9372)
- $PLAYER_CHAR = Player.Create(#NULL, 889.752, 1984.2156, 11.3262)
- $PLAYER_ACTOR = Actor.EmulateFromPlayer($PLAYER_CHAR)
- 07AF: $PLAYER_GROUP = player $PLAYER_CHAR group
- Camera.SetBehindPlayer
- set_weather 6
- wait 0 ms
- $PLAYER_CHAR.SetClothes("PLAYER_FACE", "HEAD", Head)
- $PLAYER_CHAR.SetClothes("JEANSDENIM", "JEANS", Legs)
- $PLAYER_CHAR.SetClothes("SNEAKERBINCBLK", "SNEAKER", Shoes)
- $PLAYER_CHAR.SetClothes("VEST", "VEST", Torso)
- $PLAYER_CHAR.Build
- $PLAYER_CHAR.CanMove = True
- fade 1 (out) 0 ms
- select_interior 0
- 0629: change_stat 181 (islands unlocked) to 4
- 016C: restart_if_wasted at 923.6397 2000.4899 11.2349 angle 137.0 for_town_number 0
- 016D: restart_if_busted at 923.6397 2000.4899 11.2349 angle 90.0 for_town_number 0
- 0180: set_on_mission_flag_to $ONMISSION // Note: your missions have to use the variable defined here ($ONMISSION)
- $DEFAULT_WAIT_TIME = 250
- 03E6: remove_text_box
- 0417: start_mission 0 // Initial
- wait 0
- 0417: start_mission 1 // Cutscene 1
- // put your create_thread commands here
- 00D7: create_Thread @MissionTrigger
- :MAIN_LOOP
- 0001: wait $DEFAULT_WAIT_TIME ms
- 0002: jump @MAIN_LOOP
- // put your mods (threads) here
- :MissionTrigger
- thread "Mis_Trig"
- $MARKER_SWEET_HOUSE = Marker.CreateIconAndSphere(42, $X_SWEET_HOUSE, $Y_SWEET_HOUSE, $Z_SWEET_HOUSE)
- repeat
- 0001: wait 0 ms
- if and
- player.Defined($PLAYER_CHAR)
- $ONMISSION == 0
- then
- if and
- 00FF: actor $PLAYER_ACTOR sphere 0 in_sphere $X_SWEET_HOUSE $Y_SWEET_HOUSE $Z_SWEET_HOUSE radius 1.0 1.0 2.0 on_foot
- Player.Controllable($PLAYER_CHAR)
- $TUT_MISSIONS_PASSED == 0
- then
- $ONMISSION = 1
- 00BA: show_text_styled GXT 'INTRO_1' time 1000 style 2 // Big Smoke
- start_mission 2
- end
- end
- until $TUT_MISSIONS_PASSED == 1
- marker.Disable($MARKER_SWEET_HOUSE)
- $MARKER_RYDER_HOUSE = Marker.CreateIconAndSphere(42, $X_RYDER_HOUSE, $Y_RYDER_HOUSE, $Z_RYDER_HOUSE)
- // I think here is a mistake somewhere....
- repeat
- 0001: wait 0 ms
- if and
- player.Defined($PLAYER_CHAR)
- $ONMISSION == 0
- then
- if and
- 00FF: actor $PLAYER_ACTOR sphere 0 in_sphere $X_RYDER_HOUSE $Y_RYDER_HOUSE $Z_RYDER_HOUSE radius 1.0 1.0 2.0 on_foot
- Player.Controllable($PLAYER_CHAR)
- $TUT_MISSIONS_PASSED == 1
- then
- $ONMISSION = 1
- 00BA: show_text_styled GXT 'INTRO_2' time 1000 style 2 // RYDER
- start_mission 3
- end
- end
- until $TUT_MISSIONS_PASSED == 2
- marker.Disable($MARKER_RYDER_HOUSE)
- end_thread
- //----------------------Mission 0-------------------------
- // put your missions here
- :Initial
- $A = 6000
- $B = 16000
- Actor.StorePos($PLAYER_ACTOR, $X, $Y, $Z)
- $ONMISSION = 0
- $TUT_MISSIONS_PASSED = 0
- $X_SWEET_HOUSE = 920.9996
- $Y_SWEET_HOUSE = 1985.3621
- $Z_SWEET_HOUSE = 10.8203
- $X_RYDER_HOUSE = 893.4557
- $Y_RYDER_HOUSE = 1975.0697
- $Z_RYDER_HOUSE = 11.2338
- // Change Player Skin
- if
- Model.Available(#NULL)
- 09C7: change_player $PLAYER_CHAR model_to #NULL
- Player.Build($PLAYER_CHAR)
- model.Load(#DNMOLC1) // Select Model Here 1/2
- 038B: load_requested_models
- 09C7: change_player $PLAYER_CHAR model_to #DNMOLC1 // Select Model Here 2/2
- end_thread
- //-------------------------------------------------PLACE REAL MISSIONS HERE-------------------------//
- // Cutscene 1
- :CUTSCENE_1
- thread 'CUT 1'
- // Begin First Cutscene
- 04BB: select_interior 0
- 04E4: unknown_refresh_game_renderer_at 922.1453 1877.2123 10.8203
- Player.CanMove($PLAYER_CHAR, false)
- 02A3: enable_widescreen 1
- 015D: set_gamespeed 0.8
- 0936: set_camera 920.9642 2043.0486 14.6534 position_to 922.1453 1877.2123 10.8203 time $A drop_mode 0
- 0920: point_camera 1033.6105 1994.8458 15.6421 transverse_to 978.839 1783.0623 8.6484 time $A mode 0
- wait $A
- 0936: set_camera 880.4531 1983.7474 15.7471 position_to 879.5115 2058.2239 15.8454 time $B drop_mode 0
- 0920: point_camera 879.5115 2058.2239 15.8454 transverse_to 839.1807 1907.1328 10.8203 time $B mode 0
- wait $B
- 02A3: enable_widescreen 0
- Camera.Restore
- 015D: set_gamespeed 1.0
- Player.CanMove($PLAYER_CHAR, true)
- wait 50
- fade 1 100
- // Spawn Greenwood
- 014B: $PARKED_GREENWOO = init_parked_car_generator #GREENWOO -1 -1 1 alarm 0 door_lock 0 0 10000 at 920.5024 2011.5483 10.8039 angle 87.9706
- 014C: set_parked_car_generator $PARKED_GREENWO cars_to_generate_to 101
- // Teleport Player
- //00A1: put_actor $PLAYER_ACTOR at 164.336 -1757.727 6.804047
- //Actor.Angle($PLAYER_ACTOR) = 98.7008
- 04BB: select_interior 8
- 04FA: reset_interior 8 colors
- 0860: link_actor $PLAYER_ACTOR to_interior 8
- 04E4: unknown_refresh_game_renderer_at 2373.0745 -1126.7084 1050.875
- 00A1: put_actor $PLAYER_ACTOR at 2373.0745 -1126.7084 1050.875
- // Second Cutscene in Interior
- 04BB: select interior 8
- Player.CanMove($PLAYER_CHAR, false)
- 04E4: unknown_refresh_game_renderer_at 2372.5469 -1121.7041 1051.3367
- 02A3: enable_widescreen 1
- 015D: set_gamespeed 0.8
- 0936: set_camera 2372.5469 -1121.7041 1051.3367 position_to 2375.7603 -1125.887 1050.8826 time $A drop_mode 0
- 0920: point_camera 2369.998 -1128.869 1050.875 transverse_to 2370.8088 -1127.2448 1051.875 time $A mode 0
- wait $A
- 02A3: enable_widescreen 0
- Camera.Restore
- 015D: set_gamespeed 1.0
- Player.CanMove($PLAYER_CHAR, true)
- wait 100
- fade 1 100
- end_thread
- //-------------Mission 1---------------
- // Mission wrapper
- :TUT_MISSION_1
- thread 'TUT 1'
- gosub @TUT_MISSION_1_MAIN
- if wasted_or_busted
- then
- gosub @TUT_MISSION_1_FAIL
- end
- gosub @TUT_MISSION_1_CLEANUP
- end_thread
- //-------------------------------------
- :TUT_MISSION_1_MAIN
- //Load models
- model.Load(#m4)
- model.Load(#BFYST)
- model.Load(#BMYST)
- model.Load(#TAMPA)
- 038B: load_requested_models
- :TUT_MISSION_1_LOAD
- wait 0 ms
- if and
- model.Available(#m4)
- model.Available(#BMYST)
- model.Available(#BFYST)
- model.Available(#TAMPA)
- 004D: jump_if_false @TUT_MISSION_1_LOAD
- 01B2: give_actor $PLAYER_ACTOR weapon 31 ammo 10000 // Load the weapon model before using this
- 01B9: set_actor $PLAYER_ACTOR armed_weapon_to 31
- 0674: set_car_model #TAMPA numberplate "PATRICK_"
- $car_num = car.Create(#TAMPA,956.7369, 2002.0457, 10.8203)
- $victim = Actor.Create(CIVFEMALE, #BFYST, 963.3641, 1981.4812, 10.8203)
- $innocent = Actor.Create(CIVMALE, #BMYST, 960.5291, 1975.7067, 10.8203)
- 0187: $victim_marker = create_marker_above_actor $victim
- repeat
- wait 0 ms
- if actor.Dead($innocent)
- then
- jump @TUT_MISSION_1_FAIL
- end
- until actor.Dead($victim)
- :TUT_MISSION_1_PASSED
- 0394: play_music 1
- $TUT_MISSIONS_PASSED += 1
- Player.Money($PLAYER_CHAR) += 10000
- 01E3: show_text_1number_styled GXT 'M_PASS' number 10000 time 5000 style 1 // MISSION PASSED!~n~~w~$~1~
- return
- //-------------------------------------
- :TUT_MISSION_1_FAIL
- 00BA: show_text_styled GXT 'M_FAIL' time 5000 style 1 // ~r~MISSION FAILED!
- // Hier kun je alles kwijt wat moet gebeuren als de missie gefaald is. Bv. bepaalde dingen weer terugdraaien
- 0555: remove_weapon 31 from_actor $PLAYER_ACTOR
- return
- //-------------------------------------
- :TUT_MISSION_1_CLEANUP
- $ONMISSION = 0
- // Hier komt alle code om dingen op te ruimen die voor de missie zijn geladen
- // En om speciale settings voor deze missie terug te zetten naar normaal
- Marker.Disable($victim_marker)
- 010D: set_player $PLAYER_CHAR wanted_level_to 0
- model.Destroy(#BFYST)
- model.Destroy(#BMYST)
- model.Destroy(#M4)
- 01C2: remove_references_to_actor $victim
- 01C2: remove_references_to_actor $innocent
- mission_cleanup
- return
- //-------------Mission 2---------------
- // Mission wrapper // Label for Mission 2 Wrapper
- :MISSION_2 // Create Thread Tut 2
- thread 'TUT 2' // First Gosub to :Mission_2_Main then after return continues below this line
- gosub @MISSION_2_MAIN // If Wasted Or Busted
- if wasted_or_busted // Then do the Following
- then // Second Gosub to :Mission_2_Fail then after return continues below this line
- gosub @MISSION_2_FAIL // end
- end // Third Gosub to :Mission_2_Cleanup after return continues below this line
- gosub @MISSION_2_CLEANUP // end_thread
- end_thread
- //------------------------------------- // First Gosub sends us here
- :MISSION_2_MAIN // Label Mission_2_Main
- model.Load(#m4) // Load Model of M4 Gun
- model.Load(#BMYST)
- model.Load(#BFYST)
- :MISSION_2_LOAD // Label TUT_MISSION_2_LOAD for checking if Models are available
- wait 0 ms
- if and // If the following is true continue with the code:
- model.Available(#m4)
- model.Available(#BMYST)
- model.Available(#BFYST)
- 004D: jump_if_false @MISSION_2_LOAD // If the above is false jump to TUT_MISSION_1_Load
- 01B2: give_actor $PLAYER_ACTOR weapon 31 ammo 10000 // Load the weapon model before using this // Give the Actor defined by the Variable Player Actor the Weapon labeled Nr. 31 (M4 GUN) with 1000 Ammo
- 01B9: set_actor $PLAYER_ACTOR armed_weapon_to 31
- $victim = Actor.Create(CIVFEMALE, #BFYST, 922.5363, 1966.5171, 10.8203) // Define a Variable that Creates an Actor with the Model Black Young Female at XYZ
- $innocent = Actor.Create(CIVMALE, #BMYST, 923.0659, 1975.2988, 10.8203) // Define a Variable that creates an innocent Actor with the Model Young Black Male at XYZ
- 0187: $victim_marker = create_marker_above_actor $victim // Define a Variable that creates a Marker above the Actor "Victim"
- repeat
- wait 0 ms // (2) Repeat the following:
- if actor.Dead($innocent) // If the Innocent Actor is Dead
- then // then do the following:
- jump @MISSION_2_FAIL // jump @MISSION_2_Fail
- end // end
- until actor.Dead($victim) // (2) Until the Actor "Victim" is dead
- //-------------------------------------
- :MISSION_2_PASSED // Label Mission_2_Passed
- Player.Money($PLAYER_CHAR) += 10000
- $TUT_MISSIONS_PASSED += 1 // Give The Player + 1000 Money
- 01E3: show_text_1number_styled GXT 'M_PASS' number 10000 time 5000 style 1 // MISSION PASSED!~n~~w~$~1~ // Show Text Mission Passed
- // This subroutine is executed when the mission is passed.
- // Give the rewards, and make new missions available if needed.
- return // Return to First Gosub
- //------------------------------------- // Second Gosub sends us here
- :MISSION_2_FAIL // Label Mission_2_Fail
- 00BA: show_text_styled GXT 'M_FAIL' time 5000 style 1 // ~r~MISSION FAILED! // Show Text Mission Failed
- 0555: remove_weapon 31 from_actor $PLAYER_ACTOR // Remove Weapon Nr. 31 (M4) from Player (it was given to us above)
- // This subroutine is executed when the mission fails. // return to second gosub
- return
- //------------------------------------- // Third Gosub sends us here
- :MISSION_2_CLEANUP // Label Mission_2_Cleanup
- $ONMISSION = 0 // Set Onmission Status to Not on a mission
- // Hier komt alle code om dingen op te ruimen die voor de missie zijn geladen // Nederlands for Here comes all Code that you want to be cleaned up before the Mission starts
- // En om speciale settings voor deze missie terug te zetten naar normaal // Nederlands for All Special Settings that where declared before this mission will be reset to normal
- Marker.Disable($victim_marker) // Disable the Marker over Victims head
- 010D: set_player $PLAYER_CHAR wanted_level_to 0 // Set the Players wanted Level to 0
- model.Destroy(#BMYST) // Destroy the Model Black Young Female
- model.Destroy(#BFYST) // Destroy the Model Black Young Male
- model.Destroy(#M4)
- 01C2: remove_references_to_actor $victim // Like turning an actor into a random pedestrian
- 01C2: remove_references_to_actor $innocent // Destroy the Model M4 Gun
- mission_cleanup // Command to cleanup and End the Mission
- return
- //-------------Mission 3---------------
- // Mission wrapper // Label for Mission 2 Wrapper
- :MISSION_3 // Create Thread Tut 2
- thread 'TUT 3' // First Gosub to :Mission_2_Main then after return continues below this line
- gosub @MISSION_3_MAIN // If Wasted Or Busted
- if wasted_or_busted // Then do the Following
- then // Second Gosub to :Mission_2_Fail then after return continues below this line
- gosub @MISSION_3_FAIL // end
- end // Third Gosub to :Mission_2_Cleanup after return continues below this line
- gosub @MISSION_3_CLEANUP // end_thread
- end_thread
- //------------------------------------- // First Gosub sends us here
- :MISSION_3_MAIN // Label Mission_2_Main
- model.Load(#m4) // Load Model of M4 Gun
- model.Load(#BMYST)
- model.Load(#BFYST)
- :MISSION_3_LOAD // Label TUT_MISSION_2_LOAD for checking if Models are available
- wait 0 ms
- if and // If the following is true continue with the code:
- model.Available(#m4)
- model.Available(#BMYST)
- model.Available(#BFYST)
- 004D: jump_if_false @MISSION_3_LOAD // If the above is false jump to TUT_MISSION_1_Load
- 01B2: give_actor $PLAYER_ACTOR weapon 31 ammo 10000 // Load the weapon model before using this // Give the Actor defined by the Variable Player Actor the Weapon labeled Nr. 31 (M4 GUN) with 1000 Ammo
- 01B9: set_actor $PLAYER_ACTOR armed_weapon_to 31
- $victim = Actor.Create(CIVFEMALE, #BFYST, 922.5363, 1966.5171, 10.8203) // Define a Variable that Creates an Actor with the Model Black Young Female at XYZ
- $innocent = Actor.Create(CIVMALE, #BMYST, 923.0659, 1975.2988, 10.8203) // Define a Variable that creates an innocent Actor with the Model Young Black Male at XYZ
- 0187: $victim_marker = create_marker_above_actor $victim // Define a Variable that creates a Marker above the Actor "Victim"
- repeat
- wait 0 ms // (2) Repeat the following:
- if actor.Dead($innocent) // If the Innocent Actor is Dead
- then // then do the following:
- jump @MISSION_3_FAIL // jump @MISSION_2_Fail
- end // end
- until actor.Dead($victim) // (2) Until the Actor "Victim" is dead
- //-------------------------------------
- :MISSION_3_PASSED // Label Mission_2_Passed
- Player.Money($PLAYER_CHAR) += 10000
- $TUT_MISSIONS_PASSED += 1 // Give The Player + 1000 Money
- 01E3: show_text_1number_styled GXT 'M_PASS' number 10000 time 5000 style 1 // MISSION PASSED!~n~~w~$~1~ // Show Text Mission Passed
- // This subroutine is executed when the mission is passed.
- // Give the rewards, and make new missions available if needed.
- return // Return to First Gosub
- //------------------------------------- // Second Gosub sends us here
- :MISSION_3_FAIL // Label Mission_2_Fail
- 00BA: show_text_styled GXT 'M_FAIL' time 5000 style 1 // ~r~MISSION FAILED! // Show Text Mission Failed
- 0555: remove_weapon 31 from_actor $PLAYER_ACTOR // Remove Weapon Nr. 31 (M4) from Player (it was given to us above)
- // This subroutine is executed when the mission fails. // return to second gosub
- return
- //------------------------------------- // Third Gosub sends us here
- :MISSION_3_CLEANUP // Label Mission_2_Cleanup
- $ONMISSION = 0 // Set Onmission Status to Not on a mission
- // Hier komt alle code om dingen op te ruimen die voor de missie zijn geladen // Nederlands for Here comes all Code that you want to be cleaned up before the Mission starts
- // En om speciale settings voor deze missie terug te zetten naar normaal // Nederlands for All Special Settings that where declared before this mission will be reset to normal
- Marker.Disable($victim_marker) // Disable the Marker over Victims head
- 010D: set_player $PLAYER_CHAR wanted_level_to 0 // Set the Players wanted Level to 0
- model.Destroy(#BMYST) // Destroy the Model Black Young Female
- model.Destroy(#BFYST) // Destroy the Model Black Young Male
- model.Destroy(#M4)
- 01C2: remove_references_to_actor $victim // Like turning an actor into a random pedestrian
- 01C2: remove_references_to_actor $innocent // Like turning an actor into a random pedestrian // Destroy the Model M4 Gun
- mission_cleanup // Command to cleanup and End the Mission
- return
- //----------------------Mission 0-------------------------
- // put your external scripts here
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement