Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DEFINE MISSIONS 3
- DEFINE MISSION 0 AT @INITIAL
- DEFINE MISSION 1 AT @TUT_MISSION_1
- DEFINE MISSION 2 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
- 03A4: name_thread 'MAIN'
- 01F0: set_max_wanted_level_to 6
- 0111: toggle_wasted_busted_check 0
- 00C0: set_current_time_hours_to 8 minutes_to 0
- 04E4: unknown_refresh_game_renderer_at 2488.56 -1666.84
- 03CB: set_rendering_origin_at 2488.56 -1666.84 13.38
- 0053: $PLAYER_CHAR = create_player #NULL at 2488.56 -1666.84 13.38
- 01F5: $PLAYER_ACTOR = create_player_actor $PLAYER_CHAR
- 07AF: $PLAYER_GROUP = player $PLAYER_CHAR group
- 0373: set_camera_directly_behind_player
- 01B6: set_weather 0
- 0001: wait 0 ms
- 087B: set_player $PLAYER_CHAR clothes_texture "PLAYER_FACE" model "HEAD" body_part 1
- 087B: set_player $PLAYER_CHAR clothes_texture "JEANSDENIM" model "JEANS" body_part 2
- 087B: set_player $PLAYER_CHAR clothes_texture "SNEAKERBINCBLK" model "SNEAKER" body_part 3
- 087B: set_player $PLAYER_CHAR clothes_texture "VEST" model "VEST" body_part 0
- 070D: rebuild_player $PLAYER_CHAR
- 01B4: toggle_player $PLAYER_CHAR can_move 1
- 016A: fade 1 time 0
- 04BB: select_interior 0
- 0629: change_integer_stat 181 to 4
- 016C: restart_if_wasted_at 2027.77 -1420.52 15.99 angle 137.0 town_number 0
- 016D: restart_if_busted_at 1550.68 -1675.49 14.51 angle 90.0 town_number 0
- 0180: set_on_mission_flag_to $ONMISSION // Note: your missions have to use the variable defined here
- 0004: $DEFAULT_WAIT_TIME = 250
- 03E6: remove_text_box
- 0417: start_mission 0 // Initial
- wait 0
- // 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
- //-------------------------------------- MISSION SNIFFER
- // $TUT_MISSION_PASSED has to be cleared (0).
- // When you pass the mission, you have to raise $TUT_MISSIONS_PASSED.
- :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 1
- 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)
- 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_1' time 1000 style 2 // Big Smoke
- start_mission 2
- end
- end
- until $TUT_MISSIONS_PASSED == 1
- marker.Disable($MARKER_RYDER_HOUSE)
- end_thread
- //-------------Mission 0---------------
- :INITIAL
- $TUT_MISSIONS_PASSED = 0
- $ONMISSION = 0
- $X_SWEET_HOUSE = 2516.019
- $Y_SWEET_HOUSE = -1673.9849
- $Z_SWEET_HOUSE = 13.8766
- $X_RYDER_HOUSE = 2472.1741
- $Y_RYDER_HOUSE = -1687.0452
- $Z_RYDER_HOUSE = 13.5078
- 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,2488.56, -1666.84, 13.38)
- $victim = Actor.Create(CIVFEMALE, #BFYST, 2488.56, -1656.84, 13.38)
- $innocent = Actor.Create(CIVMALE, #BMYST, 2490.56, -1656.84, 13.38)
- 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)
- 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, 2488.56, -1656.84, 13.38) // Define a Variable that Creates an Actor with the Model Black Young Female at XYZ
- $innocent = Actor.Create(CIVMALE, #BMYST, 2490.56, -1656.84, 13.38) // 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) // Destroy the Model M4 Gun
- mission_cleanup // Command to cleanup and End the Mission
- return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement