Kenji

Материал из GTAModding.ru
Перейти к: навигация, поиск

Содержание

kenji1

MISSION_START
// *****************************************************************************************
// *****************************************************************************************
// *****************************************************************************************
// *****************************************Kenji mission 1********************************* 
// ******************************************KANBU BUST OUT*********************************
// *****************************************************************************************
// *****************************************************************************************
// *****************************************************************************************
 
SCRIPT_NAME kenji1
 
// Mission start stuff
 
GOSUB mission_start_kenji1
 
	IF HAS_DEATHARREST_BEEN_EXECUTED
		GOSUB mission_kenji1_failed
	ENDIF
 
GOSUB mission_cleanup_kenji1
 
MISSION_END
 
// Variables for mission
 
VAR_INT mission_cop_car_km1
 
VAR_INT radar_blip_coord1_km1
 
VAR_INT radar_blip_coord2_km1
 
VAR_INT radar_blip_coord3_km1
 
VAR_INT flag_player_had_car_message_km1
 
VAR_INT flag_player_had_bomb_message_km1
 
VAR_INT	flag_player_got_cops_message_km1
 
VAR_INT yakuza_ped1_km1
 
VAR_INT mission_car_km1
 
VAR_INT flag_player_wanted_level_changed
 
VAR_INT flag_blip_on_yakuza_ped1_km1
 
VAR_INT radar_blip_ped1_km1
 
VAR_INT flag_car_got_bomb_km1
 
VAR_INT total_counter_km1
 
VAR_INT	counter_bomb_km1
 
VAR_INT	counter_police_km1
 
VAR_INT car_km1 //Car at end at dojo
 
VAR_INT flag_had_bomb_message_km1
 
VAR_INT flag_blip_on_km1
 
VAR_INT flag_area_bomb_message_km1
 
VAR_INT police_alarm
 
VAR_INT spray_blip_km1
 
VAR_INT flag_spray_blip_on_km1
 
VAR_INT flag_bomb_km1
 
VAR_INT cell_beating
 
VAR_INT debris1
 
VAR_INT debris2
 
VAR_INT debris3
 
VAR_INT debris4
 
VAR_FLOAT debris1_x
 
VAR_FLOAT debris1_y
 
VAR_FLOAT debris1_z
 
VAR_FLOAT debris2_x
 
VAR_FLOAT debris2_y
 
VAR_FLOAT debris2_z
 
VAR_FLOAT debris3_x
 
VAR_FLOAT debris3_y
 
VAR_FLOAT debris3_z
 
VAR_FLOAT debris4_x
 
VAR_FLOAT debris4_y
 
VAR_FLOAT debris4_z
 
VAR_INT flag_dojo_blip_on
 
VAR_INT flag_player_wanted
 
VAR_INT flag_kanbu_in_group
 
VAR_INT sphere_km1
 
VAR_INT flag_player_had_dome_message_km1
 
VAR_INT flag_played_cop_radio_km1
 
// ****************************************Mission Start************************************
 
mission_start_kenji1:
 
flag_player_on_mission = 1
 
flag_player_on_kenji_mission = 1
 
REGISTER_MISSION_GIVEN
 
WAIT 0
 
flag_player_had_car_message_km1 = 0
 
flag_player_had_bomb_message_km1 = 0
 
flag_player_got_cops_message_km1 = 0
 
flag_player_wanted_level_changed = 0
 
flag_blip_on_yakuza_ped1_km1 = 0
 
flag_car_got_bomb_km1 = 0
 
total_counter_km1 = 0
 
counter_bomb_km1 = 0
 
counter_police_km1 = 0
 
flag_had_bomb_message_km1 = 0
 
flag_blip_on_km1 = 0
 
blob_flag = 1
 
flag_area_bomb_message_km1 = 0
 
flag_spray_blip_on_km1 = 0
 
flag_bomb_km1 = 0
 
debris1_x = 0.0
 
debris1_y = 0.0
 
debris1_z = 0.0
 
debris2_x = 0.0
 
debris2_y = 0.0
 
debris2_z = 0.0
 
debris3_x = 0.0
 
debris3_y = 0.0
 
debris3_z = 0.0
 
debris4_x = 0.0
 
debris4_y = 0.0
 
debris4_z = 0.0
 
flag_dojo_blip_on = 0
 
flag_player_wanted = 0
 
flag_kanbu_in_group = 0
 
flag_player_had_dome_message_km1 = 0
 
flag_played_cop_radio_km1 = 0
 
 
 
IF flag_need_wall_change_km1 = 1
	SWAP_NEAREST_BUILDING_MODEL 328.026 -1090.262 26.941 2.0 police_celhole police_cell_wall
	flag_need_wall_change_km1 = 0
ENDIF
 
// ****************************************START OF CUTSCENE********************************
 
/*
IF CAN_PLAYER_START_MISSION player
	MAKE_PLAYER_SAFE_FOR_CUTSCENE player
ELSE
	GOTO mission_kenji1_failed
ENDIF
 
SET_FADING_COLOUR 0 0 0
 
DO_FADE 1500 FADE_OUT
 
PRINT_BIG ( KM1 ) 15000 2 //"Kanbu Bust out"
 
SWITCH_STREAMING OFF
*/
 
// Cutscene stuff
 
LOAD_SPECIAL_CHARACTER 1 KENJI
REQUEST_MODEL PED_GANG_YAKUZA_A
REQUEST_MODEL casino_garden 
 
LOAD_SPECIAL_MODEL cut_obj1 KENJIH 
LOAD_SPECIAL_MODEL cut_obj2 PLAYERH
 
/*
WHILE GET_FADING_STATUS
 
	WAIT 0
 
ENDWHILE
*/
 
LOAD_ALL_MODELS_NOW
 
WHILE NOT HAS_SPECIAL_CHARACTER_LOADED 1
OR NOT HAS_MODEL_LOADED PED_GANG_YAKUZA_A 
OR NOT HAS_MODEL_LOADED cut_obj1
OR NOT HAS_MODEL_LOADED cut_obj2
OR NOT HAS_MODEL_LOADED casino_garden
 
	WAIT 0
 
ENDWHILE
 
//SET_VISIBILITY_OF_CLOSEST_OBJECT_OF_TYPE 890.9 -416.9 15.0 6.0 backdoor FALSE	
 
LOAD_CUTSCENE k1_kbo
 
SET_CUTSCENE_OFFSET 476.380 -1382.168 67.347
 
CREATE_CUTSCENE_OBJECT PED_PLAYER cs_player
 
SET_CUTSCENE_ANIM cs_player player
 
CREATE_CUTSCENE_OBJECT PED_SPECIAL1 cs_kenji
 
SET_CUTSCENE_ANIM cs_kenji kenji
 
CREATE_CUTSCENE_OBJECT PED_GANG_YAKUZA_A cs_yakuza
 
SET_CUTSCENE_ANIM cs_yakuza gang07
 
CREATE_CUTSCENE_HEAD cs_kenji CUT_OBJ1 cs_kenjihead
 
SET_CUTSCENE_HEAD_ANIM cs_kenjihead kenji
 
CREATE_CUTSCENE_HEAD cs_player CUT_OBJ2 cs_playerhead
 
SET_CUTSCENE_HEAD_ANIM cs_playerhead player
 
CLEAR_AREA 459.1 -1413.0 25.11 1.0 TRUE 
 
SET_PLAYER_COORDINATES player 459.1 -1413.0 25.11
 
SET_PLAYER_HEADING player 132.0
 
DO_FADE 1500 FADE_IN
 
SWITCH_RUBBISH OFF
 
SWITCH_STREAMING ON
 
START_CUTSCENE
 
// Displays cutscene text
 
GET_CUTSCENE_TIME cs_time
 
WHILE cs_time < 8392
	WAIT 0
	GET_CUTSCENE_TIME cs_time
ENDWHILE
 
PRINT_NOW ( KM1_A ) 10000 1 //"My sister speaks highly of you,"
 
WHILE cs_time < 9918
	WAIT 0
	GET_CUTSCENE_TIME cs_time
ENDWHILE
 
PRINT_NOW ( KM1_E ) 10000 1 //"though I am yet to be convinced that a gaijin can offer anything but disappointment. We shall see..."
 
WHILE cs_time < 13732
	WAIT 0
	GET_CUTSCENE_TIME cs_time
ENDWHILE
 
PRINT_NOW ( KM1_B ) 10000 1 //"Perhaps you could help deal with a situation that has me at a disadvantage."
 
WHILE cs_time < 17547
	WAIT 0
	GET_CUTSCENE_TIME cs_time
ENDWHILE
 
PRINT_NOW ( KM1_F ) 10000 1 //"Of course failure has it's own disgrace."
 
WHILE cs_time < 20683
	WAIT 0
	GET_CUTSCENE_TIME cs_time
ENDWHILE
 
PRINT_NOW ( KM1_C ) 10000 1 //"A Yakuza Kanbu is in custody awaiting transfer for trial."
 
WHILE cs_time < 23650
	WAIT 0
	GET_CUTSCENE_TIME cs_time
ENDWHILE
 
PRINT_NOW ( KM1_G ) 10000 1 //"He is a valued member of the family."
 
WHILE cs_time < 25430
	WAIT 0
	GET_CUTSCENE_TIME cs_time
ENDWHILE
 
PRINT_NOW ( KM1_H ) 10000 1 //"Break him out of custody and get him to the dojo."
 
WHILE cs_time < 28749
	WAIT 0
	GET_CUTSCENE_TIME cs_time
ENDWHILE
 
CLEAR_THIS_PRINT ( KM1_H )
 
WHILE cs_time < 31200
	WAIT 0
	GET_CUTSCENE_TIME cs_time
ENDWHILE
 
DO_FADE 1500 FADE_OUT
 
WHILE NOT HAS_CUTSCENE_FINISHED
	WAIT 0
ENDWHILE
 
CLEAR_PRINTS
 
WHILE GET_FADING_STATUS
	WAIT 0
ENDWHILE
 
CLEAR_CUTSCENE
 
SWITCH_RUBBISH ON
 
SET_CAMERA_IN_FRONT_OF_PLAYER
 
WAIT 500
 
DO_FADE 1500 FADE_IN 
 
 
//SET_VISIBILITY_OF_CLOSEST_OBJECT_OF_TYPE 890.9 -416.9 15.0 6.0 backdoor TRUE
 
UNLOAD_SPECIAL_CHARACTER 1
MARK_MODEL_AS_NO_LONGER_NEEDED CUT_OBJ1
MARK_MODEL_AS_NO_LONGER_NEEDED CUT_OBJ2
MARK_MODEL_AS_NO_LONGER_NEEDED casino_garden 
 
// *******************************************END OF CUTSCENE*******************************
 
PRINT_NOW ( KM1_1 ) 5000 1 //"Steal a cop car!"
 
REQUEST_MODEL rubble01
REQUEST_MODEL rubble02
LOAD_MISSION_AUDIO K1_A
 
WHILE NOT HAS_MODEL_LOADED rubble01
OR NOT HAS_MODEL_LOADED rubble02
OR NOT HAS_MISSION_AUDIO_LOADED
 
	WAIT 0
 
ENDWHILE 
 
// waiting for the player to be in a cop car
 
ADD_CONTINUOUS_SOUND 326.4 -1092.4 26.0 SOUND_POLICE_CELL_BEATING_LOOP_L cell_beating
 
WHILE NOT IS_PLAYER_IN_MODEL player CAR_POLICE
 
	WAIT 0
 
ENDWHILE
 
STORE_CAR_PLAYER_IS_IN player mission_cop_car_km1
 
PRINT_NOW ( KM1_2 ) 5000 1 //"Get the car rigged with a bomb!"
 
ADD_SPHERE 373.9 -576.4 25.1 4.0 sphere_km1
 
ADD_SPRITE_BLIP_FOR_COORD 380.0 -577.0 25.1 RADAR_SPRITE_BOMB radar_blip_coord1_km1 
 
// waiting for the cop car to be rigged
 
WHILE NOT flag_car_got_bomb_km1 = 1
 
	WAIT 0
 
	IF IS_PLAYER_IN_MODEL player CAR_POLICE
 
		STORE_CAR_PLAYER_IS_IN player mission_cop_car_km1
 
		IF flag_player_had_car_message_km1 = 1
			ADD_SPRITE_BLIP_FOR_COORD 380.0 -577.0 25.1 RADAR_SPRITE_BOMB radar_blip_coord1_km1
 
			IF flag_player_had_dome_message_km1 = 0 
				ADD_SPHERE 373.9 -576.4 25.1 4.0 sphere_km1
			ENDIF
 
			flag_player_had_car_message_km1 = 0
		ENDIF
 
		IF IS_CAR_ARMED_WITH_BOMB mission_cop_car_km1 CARBOMB_TIMED
			flag_car_got_bomb_km1 = 1
		ELSE
 
			IF flag_had_bomb_message_km1 = 0
				PRINT_NOW ( KM1_2 ) 5000 1 //"Get the car rigged with a bomb!"
				flag_had_bomb_message_km1 = 1
			ENDIF
 
		ENDIF
 
	ELSE
 
		IF flag_player_had_car_message_km1 = 0
			PRINT_NOW ( KM1_4 ) 7000 1 //"Get a cop car and get on with the mission"
			REMOVE_BLIP radar_blip_coord1_km1
			REMOVE_SPHERE sphere_km1
			flag_player_had_car_message_km1 = 1
		ENDIF
 
		flag_had_bomb_message_km1 = 0
 
 	ENDIF
 
	IF LOCATE_PLAYER_IN_CAR_2D player 373.9 -576.4 2.0 2.0 FALSE
 
		IF flag_player_had_dome_message_km1 = 0
			PRINT_HELP ( KM1_13 ) //"Drive the car...
			REMOVE_SPHERE sphere_km1
			flag_player_had_dome_message_km1 = 1
		ENDIF
 
	ELSE
		flag_player_had_dome_message_km1 = 0
	ENDIF
 
 
 
ENDWHILE
 
REMOVE_BLIP radar_blip_coord1_km1
 
REMOVE_SPHERE sphere_km1
 
PRINT_NOW ( KM1_5 ) 7000 1 //"Okay now go to the police station
 
ADD_BLIP_FOR_COORD 327.0 -1086.0 -100.0 radar_blip_coord2_km1
 
blob_flag = 1
 
flag_blip_on_km1 = 1
 
// waiting for the player to activate the car bomb and the car to be in the area
 
blob_flag = 1
 
WHILE counter_bomb_km1 = 0
 
	WAIT 0
 
	IF flag_area_bomb_message_km1 = 0
 
		IF IS_PLAYER_IN_MODEL player CAR_POLICE
 
			STORE_CAR_PLAYER_IS_IN player mission_cop_car_km1
 
			flag_player_had_car_message_km1 = 0
 
			IF IS_CAR_ARMED_WITH_BOMB mission_cop_car_km1 CARBOMB_TIMED
			OR IS_CAR_ARMED_WITH_BOMB mission_cop_car_km1 CARBOMB_TIMEDACTIVE
 
				IF flag_player_had_bomb_message_km1 = 1
					REMOVE_BLIP radar_blip_coord1_km1  // bombshop
					flag_player_had_bomb_message_km1 = 0
				ENDIF
 
				IF flag_blip_on_km1 = 0
					ADD_BLIP_FOR_COORD 327.0 -1086.0 -100.0 radar_blip_coord2_km1 // police station
					flag_blip_on_km1 = 1
					blob_flag = 1
				ENDIF
 
				IF IS_CAR_IN_AREA_3D mission_cop_car_km1 331.7 -1091.0 24.0 323.7 -1078.3 33.0 blob_flag
 
					GET_CONTROLLER_MODE controlmode
 
					IF flag_bomb_km1 = 0
 
						IF controlmode = 0
							PRINT_HELP ( KM1_8A ) //"Press circle to detonate the bomb, remember to get out of the way!"
						ENDIF
 
						IF controlmode = 1
							PRINT_HELP ( KM1_8A ) //"Press circle to detonate the bomb, remember to get out of the way!"
						ENDIF
 
						IF controlmode = 2
   							PRINT_HELP ( KM1_8A ) //"Press circle to detonate the bomb, remember to get out of the way!"
						ENDIF
 
						IF controlmode = 3
							PRINT_HELP ( KM1_8D ) //"Press circle to detonate the bomb, remember to get out of the way!"
						ENDIF 
 
						flag_bomb_km1 = 1
 
					ENDIF
 
					IF IS_CAR_ARMED_WITH_BOMB mission_cop_car_km1 CARBOMB_TIMEDACTIVE
						counter_bomb_km1 = 1
						flag_area_bomb_message_km1 = 1
					ELSE
						flag_area_bomb_message_km1 = 0
						//counter_bomb_km1 = 0
					ENDIF
 
				ENDIF
 
			ELSE
 
				IF flag_area_bomb_message_km1 = 0
 
					IF flag_player_had_bomb_message_km1 = 0
						PRINT_NOW ( KM1_6 ) 7000 1 //"Get a bomb fitted to the car!"
						ADD_SPRITE_BLIP_FOR_COORD 380.0 -577.0 25.1 RADAR_SPRITE_BOMB radar_blip_coord1_km1 //bombshop
						flag_player_had_bomb_message_km1 = 1
 
						IF flag_blip_on_km1 = 1
							REMOVE_BLIP radar_blip_coord2_km1  // police station
							flag_blip_on_km1 = 0
							blob_flag = 0
						ENDIF
 
					ENDIF
 
				ENDIF
 
			ENDIF
 
		ELSE
 
			blob_flag = 0
 
			IF flag_player_had_car_message_km1 = 0
				PRINT_NOW ( KM1_4 ) 7000 1 //"Get a cop car and get on with the mission"
				REMOVE_BLIP radar_blip_coord2_km1  // Police station
				flag_blip_on_km1 = 0
				flag_player_had_car_message_km1 = 1
			ENDIF
 
			IF flag_player_had_bomb_message_km1 = 1
		   		REMOVE_BLIP radar_blip_coord1_km1  // bombshop
				flag_player_had_bomb_message_km1 = 0
			ENDIF	
 
		ENDIF
 
    ENDIF
 
ENDWHILE
 
CLEAR_HELP
 
REMOVE_BLIP radar_blip_coord2_km1  // police station 
 
// Waiting for the player to destroy the car outside the cell
 
WHILE NOT IS_EXPLOSION_IN_AREA EXPLOSION_CAR 323.3 -1072.6 24.0 335.5 -1094.0 33.0
 
	IF IS_CAR_DEAD mission_cop_car_km1
		PRINT_NOW ( KM1_11 ) 5000 1 //"You have alerted the cops"
		ALTER_WANTED_LEVEL_NO_DROP player 3
		GOTO mission_kenji1_failed
	ENDIF
 
	WAIT 0
 
ENDWHILE
 
IF NOT IS_CAR_DEAD mission_cop_car_km1
	PRINT_NOW ( KM1_11 ) 5000 1 //"You have alerted the cops"
	ALTER_WANTED_LEVEL_NO_DROP player 3
	GOTO mission_kenji1_failed
ELSE
 
   GOSUB wall_explosion
 
ENDIF
 
REMOVE_SOUND cell_beating 
 
ADD_CONTINUOUS_SOUND 328.418 -1088.174 28.3 SOUND_BANK_ALARM_LOOP_L police_alarm
 
CLEAR_AREA 327.0 -1086.0 -100.0 4.0 TRUE
 
SWAP_NEAREST_BUILDING_MODEL 328.026 -1090.262 26.941 2.0 police_cell_wall police_celhole
 
flag_need_wall_change_km1 = 1 // If player fails the wall needs to be changed back 
 
REMOVE_BLIP radar_blip_coord2_km1
 
WAIT 500
 
CREATE_CHAR PEDTYPE_GANG_YAKUZA PED_GANG_YAKUZA_A 328.2 -1092.2 24.9 yakuza_ped1_km1
 
SET_CHAR_RUNNING yakuza_ped1_km1 TRUE  
 
CLEAR_CHAR_THREAT_SEARCH yakuza_ped1_km1
 
SET_PLAYER_AS_LEADER yakuza_ped1_km1 player
 
PRINT_NOW ( KM1_12 ) 7000 1 //"Get him to the dojo but get rid of the cops first!"
 
ALTER_WANTED_LEVEL_NO_DROP player 3
 
ADD_SPRITE_BLIP_FOR_COORD 379.0 -493.8 25.2 RADAR_SPRITE_SPRAY spray_blip_km1
 
// waiting for the player to get rid of his wanted level
 
timera = 0
 
WHILE IS_WANTED_LEVEL_GREATER player 0
 
	WAIT 0
 
	IF flag_played_cop_radio_km1 = 0
 
		IF timera > 2000
			PLAY_MISSION_AUDIO
			flag_played_cop_radio_km1 = 1
		ENDIF
 
	ENDIF	
 
	IF IS_CHAR_DEAD yakuza_ped1_km1
		PRINT_NOW ( KM1_10 ) 5000 1 //"The Yakuza Kanbu is dead!"
		GOTO mission_kenji1_failed
	ENDIF
 
	IF NOT IS_CHAR_IN_PLAYERS_GROUP yakuza_ped1_km1 player
 
		IF flag_blip_on_yakuza_ped1_km1 = 0
			PRINT_NOW ( HEY6 ) 5000 1 //You have left the Yakuza Kanbu behind go and get him!"
			ADD_BLIP_FOR_CHAR yakuza_ped1_km1 radar_blip_ped1_km1
			REMOVE_BLIP spray_blip_km1
			flag_blip_on_yakuza_ped1_km1 = 1
		ENDIF
 
	ENDIF	
 
	IF LOCATE_PLAYER_ANY_MEANS_CHAR_2D player yakuza_ped1_km1 8.0 8.0 FALSE
	AND flag_blip_on_yakuza_ped1_km1 = 1
		SET_PLAYER_AS_LEADER yakuza_ped1_km1 player
		ADD_SPRITE_BLIP_FOR_COORD 379.0 -493.8 25.2 RADAR_SPRITE_SPRAY spray_blip_km1
		REMOVE_BLIP radar_blip_ped1_km1
	   	flag_blip_on_yakuza_ped1_km1 = 0
	ENDIF
 
ENDWHILE
 
REMOVE_BLIP spray_blip_km1  
 
PRINT_NOW ( KM1_3 ) 7000 1 //"Get me to the Dojo!"
 
ADD_BLIP_FOR_COORD 105.6 -1292.68 -100.0 radar_blip_coord3_km1
 
flag_dojo_blip_on = 1
 
LOAD_MISSION_AUDIO k1_b
 
// Waiting for the player to be back at the safehouse
 
blob_flag = 1
 
WHILE NOT LOCATE_STOPPED_PLAYER_ANY_MEANS_2D player 105.6 -1292.68 3.0 4.0 blob_flag
OR NOT LOCATE_STOPPED_CHAR_ANY_MEANS_2D yakuza_ped1_km1 105.6 -1292.68 3.0 4.0 FALSE
OR NOT HAS_MISSION_AUDIO_LOADED
OR IS_WANTED_LEVEL_GREATER player 0
 
	WAIT 0
 
	IF IS_CHAR_DEAD yakuza_ped1_km1
		PRINT_NOW ( KM1_10 ) 5000 1 //"The Yakuza Kanbu is dead!"
		GOTO mission_kenji1_failed
	ENDIF
 
   	IF NOT IS_CHAR_IN_PLAYERS_GROUP yakuza_ped1_km1 player
 
		IF flag_blip_on_yakuza_ped1_km1 = 0
			PRINT_NOW ( HEY6 ) 5000 1 //You have left the Yakuza Kanbu behind go and get him!"
			ADD_BLIP_FOR_CHAR yakuza_ped1_km1 radar_blip_ped1_km1
			flag_blip_on_yakuza_ped1_km1 = 1
			blob_flag = 0
		ENDIF
 
		IF flag_spray_blip_on_km1 = 1
			REMOVE_BLIP spray_blip_km1
			flag_spray_blip_on_km1 = 0
			flag_player_got_cops_message_km1 = 0
		ENDIF 
 
	ENDIF	
 
	IF LOCATE_PLAYER_ANY_MEANS_CHAR_2D player yakuza_ped1_km1 8.0 8.0 FALSE
	AND flag_blip_on_yakuza_ped1_km1 = 1
		SET_PLAYER_AS_LEADER yakuza_ped1_km1 player
		REMOVE_BLIP radar_blip_ped1_km1
	   	flag_blip_on_yakuza_ped1_km1 = 0
		blob_flag = 1
	ENDIF
 
   	IF IS_WANTED_LEVEL_GREATER player 0
 
   		IF flag_player_got_cops_message_km1 = 0
 
			IF flag_blip_on_yakuza_ped1_km1 = 0
   				PRINT_NOW ( WANTED1 ) 7000 1 //"Get rid of the cops!"
				ADD_SPRITE_BLIP_FOR_COORD 379.0 -493.8 25.2 RADAR_SPRITE_SPRAY spray_blip_km1 
   				flag_player_got_cops_message_km1 = 1
				flag_spray_blip_on_km1 = 1
			ENDIF
 
		ENDIF
	ELSE
	 	flag_player_got_cops_message_km1 = 0
 
		IF flag_spray_blip_on_km1 = 1
			REMOVE_BLIP spray_blip_km1
			flag_spray_blip_on_km1 = 0
		ENDIF
 
	ENDIF
 
	IF flag_spray_blip_on_km1 = 0
 
		IF flag_blip_on_yakuza_ped1_km1 = 0
 
			IF flag_dojo_blip_on = 0
				ADD_BLIP_FOR_COORD 105.6 -1292.68 -100.0 radar_blip_coord3_km1
				PRINT_NOW ( KM1_3 ) 7000 1 //"Get me to the Dojo!"
				blob_flag = 1
				flag_dojo_blip_on = 1
			ENDIF
 
		ENDIF
 
	ENDIF
 
	IF flag_dojo_blip_on = 1
 
		IF flag_spray_blip_on_km1 = 1
		OR flag_blip_on_yakuza_ped1_km1 = 1
			REMOVE_BLIP radar_blip_coord3_km1
			blob_flag = 0
			flag_dojo_blip_on = 0
		ENDIF
 
	ENDIF  
 
ENDWHILE
 
REMOVE_BLIP radar_blip_coord3_km1
 
SET_PLAYER_CONTROL player OFF
 
SET_POLICE_IGNORE_PLAYER player ON
 
SET_EVERYONE_IGNORE_PLAYER player ON
 
SWITCH_WIDESCREEN ON
 
LEAVE_GROUP yakuza_ped1_km1
 
PLAY_MISSION_AUDIO
 
WHILE NOT HAS_MISSION_AUDIO_FINISHED
 
	WAIT 0
 
	IF IS_CHAR_DEAD yakuza_ped1_km1
		PRINT_NOW ( KM1_10 ) 5000 1 //"The Yakuza Kanbu is dead!"
		GOTO mission_kenji1_failed
	ENDIF
 
ENDWHILE
 
SET_FIXED_CAMERA_POSITION 93.45 -1279.27 35.08 0.0 0.0 0.0
 
POINT_CAMERA_AT_POINT 94.19 -1279.91 34.79 JUMP_CUT
 
SET_CHAR_RUNNING yakuza_ped1_km1 FALSE
 
// Tells ped to get out of car 
 
IF IS_CHAR_IN_ANY_CAR yakuza_ped1_km1
 
	STORE_CAR_CHAR_IS_IN yakuza_ped1_km1 car_km1
 
	SET_CHAR_OBJ_LEAVE_CAR yakuza_ped1_km1 car_km1
 
	WHILE IS_CHAR_IN_CAR yakuza_ped1_km1 car_km1
 
		WAIT 0
 
		IF IS_CHAR_DEAD yakuza_ped1_km1
			PRINT_NOW ( KM1_10 ) 5000 1 //"The Yakuza Kanbu is dead!"
			GOTO mission_kenji1_failed
		ENDIF
 
		IF IS_CAR_DEAD car_km1
			PRINT_NOW ( WRECKED ) 5000 1 //"The vehicle's wrecked!"
			GOTO mission_kenji1_failed
		ENDIF
 
	ENDWHILE
 
ENDIF
 
CLEAR_AREA 111.05 -1274.75 25.16 6.0 TRUE
 
SET_CHAR_OBJ_RUN_TO_COORD yakuza_ped1_km1 111.05 -1274.75
 
timerb = 0
 
WHILE NOT LOCATE_CHAR_ON_FOOT_3D yakuza_ped1_km1 111.05 -1274.75 25.16 2.0 2.0 2.0 FALSE
 
	WAIT 0
 
	IF IS_CHAR_DEAD yakuza_ped1_km1
		PRINT_NOW ( KM1_10 ) 5000 1 //"The Yakuza Kanbu is dead!"
		GOTO mission_kenji1_failed
	ENDIF
 
	IF timerb >= 8000
 
		IF NOT LOCATE_CHAR_ON_FOOT_3D yakuza_ped1_km1 111.05 -1274.75 25.16 2.0 2.0 2.0 FALSE
			REMOVE_CHAR_ELEGANTLY yakuza_ped1_km1
			GOTO mission_bloke_got_stuck_km1
		ENDIF
 
	ENDIF  
 
ENDWHILE
 
mission_bloke_got_stuck_km1:
 
DELETE_CHAR yakuza_ped1_km1
 
SWITCH_WIDESCREEN OFF
 
SET_PLAYER_CONTROL player ON
 
SET_POLICE_IGNORE_PLAYER player OFF
 
SET_EVERYONE_IGNORE_PLAYER player OFF
 
RESTORE_CAMERA_JUMPCUT
 
GOTO mission_kenji1_passed
 
 
 
// Mission Kemuri1 failed
 
mission_kenji1_failed:
 
PRINT_BIG ( M_FAIL ) 5000 1 //"Mission Failed!"
 
RETURN
 
 
 
// mission Kemuri1 passed
 
mission_kenji1_passed:
 
flag_kenji_mission1_passed = 1
REGISTER_MISSION_PASSED ( KM1 )
PLAYER_MADE_PROGRESS 1
PRINT_WITH_NUMBER_BIG ( m_pass ) 30000 5000 1 //"Mission Passed"
PLAY_MISSION_PASSED_TUNE 1
ADD_SCORE player 30000
CLEAR_WANTED_LEVEL player
START_NEW_SCRIPT kenji_mission2_loop
RETURN
 
 
 
// mission cleanup
 
mission_cleanup_kenji1:
 
flag_player_on_mission = 0
flag_player_on_kenji_mission = 0
REMOVE_SOUND police_alarm
REMOVE_SOUND cell_beating
MARK_MODEL_AS_NO_LONGER_NEEDED PED_GANG_YAKUZA_A
MARK_MODEL_AS_NO_LONGER_NEEDED rubble01
MARK_MODEL_AS_NO_LONGER_NEEDED rubble02 
REMOVE_BLIP radar_blip_coord1_km1
REMOVE_BLIP radar_blip_coord2_km1
REMOVE_BLIP radar_blip_coord3_km1
REMOVE_BLIP radar_blip_ped1_km1
REMOVE_BLIP spray_blip_km1
REMOVE_SPHERE sphere_km1
MISSION_HAS_FINISHED
RETURN
 
 
 
wall_explosion:
 
ADD_EXPLOSION 328.1 -1087.5 27.7 EXPLOSION_HELI
ADD_MOVING_PARTICLE_EFFECT POBJECT_FIREBALL_AND_SMOKE 328.1 -1088.3 26.0 0.0 0.0 0.0 4.0 0 0 0 3000
CREATE_OBJECT rubble02 328.1 -1084.1 27.0 debris1
CREATE_OBJECT rubble02 328.5 -1084.7 27.0 debris2
CREATE_OBJECT rubble01 326.6 -1083.7 26.0 debris3
CREATE_OBJECT rubble01 330.0 -1084.4 27.0 debris4
SET_OBJECT_DYNAMIC debris1 TRUE
SET_OBJECT_DYNAMIC debris2 TRUE
SET_OBJECT_DYNAMIC debris3 TRUE
SET_OBJECT_DYNAMIC debris4 TRUE 
SET_OBJECT_VELOCITY debris1 3.0 16.0 15.0
SET_OBJECT_VELOCITY debris2 -5.0 10.0 5.0
SET_OBJECT_VELOCITY debris3 7.0 7.0 7.0
SET_OBJECT_VELOCITY debris4 -4.0 13.0 10.0
 
RETURN

kenji2

MISSION_START
// *****************************************************************************************
// *****************************************************************************************
// *****************************************************************************************
// *****************************************Kenji mission 2********************************* 
// ****************************************Gone In 30 Seconds*******************************
// *****************************************************************************************
// *****************************************************************************************
// *****************************************************************************************
 
SCRIPT_NAME kenji2
 
// Mission start stuff
 
GOSUB mission_start_kenji2
 
	IF HAS_DEATHARREST_BEEN_EXECUTED
		GOSUB mission_kenji2_failed
	ENDIF
 
GOSUB mission_cleanup_kenji2
 
MISSION_END
 
// Variables For Mission
 
VAR_INT car_to_steal1_km2  //Testarossa
 
VAR_INT car_to_steal2_km2  //Viper
 
VAR_INT car_to_steal3_km2  //Boxter
 
VAR_INT car_to_steal4_km2 //Diablo
 
VAR_INT car_to_steal5_km2  //Offroad
 
VAR_INT radar_blip_coord1_km2
 
VAR_INT radar_blip_car1_km2
 
VAR_INT radar_blip_car2_km2
 
VAR_INT radar_blip_car3_km2
 
VAR_INT radar_blip_car4_km2
 
VAR_INT radar_blip_car5_km2
 
VAR_INT timer_km2
 
VAR_INT flag_player_damage_message_car1_km2 
 
VAR_INT flag_player_damage_message_car2_km2
 
VAR_INT flag_player_damage_message_car3_km2
 
VAR_INT flag_player_damage_message_car4_km2
 
VAR_INT flag_player_damage_message_car5_km2
 
VAR_INT flag_car1_in_garage
 
VAR_INT flag_car2_in_garage
 
VAR_INT flag_car3_in_garage
 
VAR_INT flag_car4_in_garage
 
VAR_INT flag_car5_in_garage
 
VAR_INT counter_number_of_cars_in_garage_km2
 
VAR_INT flag_blip_car1_on
 
VAR_INT flag_blip_car2_on
 
VAR_INT flag_blip_car3_on
 
VAR_INT flag_blip_car4_on
 
VAR_INT flag_blip_car5_on
 
VAR_INT flag_car1_destroyed
 
VAR_INT flag_car2_destroyed
 
VAR_INT flag_car3_destroyed
 
VAR_INT flag_car4_destroyed
 
VAR_INT flag_car5_destroyed
 
VAR_INT flag_garage_no_blip_car1_km2
 
VAR_INT flag_garage_no_blip_car2_km2
 
VAR_INT flag_garage_no_blip_car3_km2
 
VAR_INT flag_garage_no_blip_car4_km2
 
VAR_INT flag_garage_no_blip_car5_km2
 
VAR_INT flag_spray_blip_on_car1_km2
 
VAR_INT flag_spray_blip_on_car2_km2
 
VAR_INT flag_spray_blip_on_car3_km2
 
VAR_INT flag_spray_blip_on_car4_km2
 
VAR_INT flag_spray_blip_on_car5_km2
 
VAR_INT spray_blip_km2
 
VAR_INT flag_player_had_garage_car1_message
 
VAR_INT flag_player_had_garage_car2_message
 
VAR_INT flag_player_had_garage_car3_message
 
VAR_INT flag_player_had_garage_car4_message
 
VAR_INT flag_player_had_garage_car5_message  
 
// ****************************************Mission Start************************************
 
mission_start_kenji2:
 
flag_player_on_mission = 1
 
flag_player_on_kenji_mission = 1
 
REGISTER_MISSION_GIVEN
 
WAIT 0
 
flag_player_damage_message_car1_km2 = 0
 
flag_player_damage_message_car2_km2 = 0
 
flag_player_damage_message_car3_km2 = 0
 
flag_player_damage_message_car4_km2 = 0
 
flag_player_damage_message_car5_km2 = 0
 
flag_car1_in_garage = 0
 
flag_car2_in_garage = 0
 
flag_car3_in_garage = 0
 
flag_car4_in_garage = 0
 
flag_car5_in_garage = 0
 
counter_number_of_cars_in_garage_km2 = 0
 
flag_blip_car1_on = 0
 
flag_blip_car2_on = 0
 
flag_blip_car3_on = 0
 
flag_blip_car4_on = 0
 
flag_blip_car5_on = 0
 
flag_car1_destroyed = 0
 
flag_car2_destroyed = 0
 
flag_car3_destroyed = 0
 
flag_car4_destroyed = 0
 
flag_car5_destroyed = 0
 
flag_garage_no_blip_car1_km2 = 0
 
flag_garage_no_blip_car2_km2 = 0
 
flag_garage_no_blip_car3_km2 = 0
 
flag_garage_no_blip_car4_km2 = 0
 
flag_garage_no_blip_car5_km2 = 0
 
flag_spray_blip_on_car1_km2 = 0
 
flag_spray_blip_on_car2_km2 = 0
 
flag_spray_blip_on_car3_km2 = 0
 
flag_spray_blip_on_car4_km2 = 0
 
flag_spray_blip_on_car5_km2 = 0
 
//timer_km2 = 601000  //10 mins for Obbe, Les
 
timer_km2 = 361000  //6 mins
 
flag_player_had_garage_car1_message = 0
 
flag_player_had_garage_car2_message = 0
 
flag_player_had_garage_car3_message = 0
 
flag_player_had_garage_car4_message = 0
 
flag_player_had_garage_car5_message = 0
 
 
// ****************************************START OF CUTSCENE********************************
 
/*
IF CAN_PLAYER_START_MISSION player
	MAKE_PLAYER_SAFE_FOR_CUTSCENE player
ELSE
	GOTO mission_kenji2_failed
ENDIF
 
SET_FADING_COLOUR 0 0 0
 
DO_FADE 1500 FADE_OUT
 
PRINT_BIG ( KM2 ) 15000 2 //"Gone in Sixty"
 
SWITCH_STREAMING OFF
*/
 
// Cutscene stuff
 
LOAD_SPECIAL_CHARACTER 1 KENJI
LOAD_SPECIAL_MODEL cut_obj1 KENJIH 
LOAD_SPECIAL_MODEL cut_obj2 PLAYERH
LOAD_SPECIAL_MODEL cut_obj3 MINNOTE
REQUEST_MODEL casino_garden 
 
LOAD_ALL_MODELS_NOW
 
WHILE NOT HAS_SPECIAL_CHARACTER_LOADED 1
OR NOT HAS_MODEL_LOADED cut_obj1
OR NOT HAS_MODEL_LOADED cut_obj2
OR NOT HAS_MODEL_LOADED cut_obj3
OR NOT HAS_MODEL_LOADED casino_garden
 
	WAIT 0
 
ENDWHILE
 
//SET_VISIBILITY_OF_CLOSEST_OBJECT_OF_TYPE 890.9 -416.9 15.0 6.0 backdoor FALSE	
 
LOAD_CUTSCENE k2_gis
 
SET_CUTSCENE_OFFSET 476.380 -1382.168 67.347
 
CREATE_CUTSCENE_OBJECT PED_PLAYER cs_player
 
SET_CUTSCENE_ANIM cs_player player
 
CREATE_CUTSCENE_OBJECT PED_SPECIAL1 cs_kenji
 
SET_CUTSCENE_ANIM cs_kenji kenji
 
//CREATE_CUTSCENE_OBJECT PED_GANG_YAKUZA_A cs_yakuza
 
//SET_CUTSCENE_ANIM cs_yakuza gang07
 
CREATE_CUTSCENE_HEAD cs_kenji CUT_OBJ1 cs_kenjihead
 
SET_CUTSCENE_HEAD_ANIM cs_kenjihead kenji
 
CREATE_CUTSCENE_OBJECT cut_obj3 cs_note
 
SET_CUTSCENE_ANIM cs_note MINNOTE
 
CREATE_CUTSCENE_HEAD cs_player CUT_OBJ2 cs_playerhead
 
SET_CUTSCENE_HEAD_ANIM cs_playerhead player
 
CLEAR_AREA 459.1 -1413.0 25.11 1.0 TRUE 
 
SET_PLAYER_COORDINATES player 459.1 -1413.0 25.11
 
SET_PLAYER_HEADING player 132.0
 
DO_FADE 1500 FADE_IN
 
SWITCH_RUBBISH OFF
 
SWITCH_STREAMING ON
 
START_CUTSCENE
 
// Displays cutscene text
 
GET_CUTSCENE_TIME cs_time
 
WHILE cs_time < 3902
	WAIT 0
	GET_CUTSCENE_TIME cs_time
ENDWHILE
 
PRINT_NOW ( KM2_A ) 10000 1 //"It is impossible to over-estimate the importance of etiquette in this line of work."
 
WHILE cs_time < 8570
	WAIT 0
	GET_CUTSCENE_TIME cs_time
ENDWHILE
 
PRINT_NOW ( KM2_B ) 10000 1 //"To my eternal shame, a man once did me a favor and I have never had the opportunity to repay his kindness."
 
WHILE cs_time < 15119
	WAIT 0
	GET_CUTSCENE_TIME cs_time
ENDWHILE
 
PRINT_NOW ( KM2_C ) 10000 1 //"The man's weakness is motor cars and he has requested that we acquire him certain models for his collection."
 
WHILE cs_time < 21459
	WAIT 0
	GET_CUTSCENE_TIME cs_time
ENDWHILE
 
PRINT_NOW ( KM2_D ) 10000 1 //"Needless to say, we must give him the cars as a gift, to repay the debt that is owed to him."
 
WHILE cs_time < 27033
	WAIT 0
	GET_CUTSCENE_TIME cs_time
ENDWHILE
 
PRINT_NOW ( KM2_E ) 10000 1 //"You must obtain the cars on the list and deliver them to a garage behind the car park in Newport. My honor demands it.
 
WHILE cs_time < 33164
	WAIT 0
	GET_CUTSCENE_TIME cs_time
ENDWHILE
 
PRINT_NOW ( KM2_F ) 10000 1 //"My honor demands it."
 
WHILE cs_time < 34918
	WAIT 0
	GET_CUTSCENE_TIME cs_time
ENDWHILE
 
CLEAR_THIS_PRINT ( KM2_F )
 
WHILE cs_time < 39333
	WAIT 0
	GET_CUTSCENE_TIME cs_time
ENDWHILE
 
DO_FADE 1500 FADE_OUT
 
WHILE NOT HAS_CUTSCENE_FINISHED
	WAIT 0
ENDWHILE
 
CLEAR_PRINTS
 
WHILE GET_FADING_STATUS
	WAIT 0
ENDWHILE
 
CLEAR_CUTSCENE
 
SWITCH_RUBBISH ON
 
SET_CAMERA_IN_FRONT_OF_PLAYER
 
WAIT 500
 
DO_FADE 1500 FADE_IN 
 
 
//SET_VISIBILITY_OF_CLOSEST_OBJECT_OF_TYPE 890.9 -416.9 15.0 6.0 backdoor TRUE
 
UNLOAD_SPECIAL_CHARACTER 1
MARK_MODEL_AS_NO_LONGER_NEEDED CUT_OBJ1
MARK_MODEL_AS_NO_LONGER_NEEDED CUT_OBJ2
MARK_MODEL_AS_NO_LONGER_NEEDED CUT_OBJ3
MARK_MODEL_AS_NO_LONGER_NEEDED casino_garden
 
// **************************************END OF CUSTSCENE***********************************
 
REQUEST_MODEL CAR_CHEETAH //car1 to steal 
 
REQUEST_MODEL CAR_STINGER  // car3 to steal
 
REQUEST_MODEL CAR_INFERNUS  // car4 to steal
 
//REQUEST_MODEL CAR_BANSHEE // car2 to steal
 
//REQUEST_MODEL CAR_LANDSTALKER  // car5 to steal
 
WHILE NOT HAS_MODEL_LOADED CAR_CHEETAH
OR NOT HAS_MODEL_LOADED CAR_STINGER
OR NOT HAS_MODEL_LOADED CAR_INFERNUS
//OR NOT HAS_MODEL_LOADED CAR_LANDSTALKER
//OR NOT HAS_MODEL_LOADED CAR_BANSHEE
 
	WAIT 0
 
ENDWHILE
 
PRINT_NOW ( KM2_3 ) 5000 1 //"~g~Remember the ~r~cars~g~ have to be in mint condition to be accepted by the ~p~garage~g~."
 
ADD_BLIP_FOR_COORD 375.0 -506.9 -100.0 radar_blip_coord1_km2
 
// creates car1 the testarossa
 
CREATE_CAR CAR_CHEETAH 348.3 -0.5 -100.0 car_to_steal1_km2
 
SET_CAR_HEADING car_to_steal1_km2 270.0
 
CHANGE_CAR_COLOUR car_to_steal1_km2 CARCOLOUR_RED4 CARCOLOUR_RED4
 
SET_CAN_RESPRAY_CAR car_to_steal1_km2 FALSE
 
ADD_BLIP_FOR_CAR car_to_steal1_km2 radar_blip_car1_km2
 
flag_blip_car1_on = 1
 
/*
 
// creates car2 the viper
 
CREATE_CAR CAR_BANSHEE 211.2 -312.4 15.5 car_to_steal2_km2
 
CHANGE_CAR_COLOUR car_to_steal2_km2 CARCOLOUR_RED4 CARCOLOUR_RED4
 
SET_CAN_RESPRAY_CAR car_to_steal2_km2 FALSE
 
ADD_BLIP_FOR_CAR car_to_steal2_km2 radar_blip_car2_km2
 
SET_CAR_HEADING car_to_steal2_km2 90.0 
 
flag_blip_car2_on = 1
*/
 
// creates car3 the boxster
 
CREATE_CAR CAR_STINGER -71.1 -1467.4 25.1 car_to_steal3_km2
 
CHANGE_CAR_COLOUR car_to_steal3_km2 CARCOLOUR_RED4 CARCOLOUR_RED4
 
SET_CAN_RESPRAY_CAR car_to_steal3_km2 FALSE
 
ADD_BLIP_FOR_CAR car_to_steal3_km2 radar_blip_car3_km2
 
SET_CAR_HEADING car_to_steal3_km2 270.0 
 
flag_blip_car3_on = 1
 
// creates car4 the Diablo
 
CREATE_CAR CAR_INFERNUS -61.7 -358.4 15.2 car_to_steal4_km2
 
CHANGE_CAR_COLOUR car_to_steal4_km2 CARCOLOUR_RED4 CARCOLOUR_RED4
 
SET_CAN_RESPRAY_CAR car_to_steal4_km2 FALSE
 
ADD_BLIP_FOR_CAR car_to_steal4_km2 radar_blip_car4_km2
 
SET_CAR_HEADING car_to_steal4_km2 90.0 
 
flag_blip_car4_on = 1
 
 
/*
// creates car5 the 4X4
 
CREATE_CAR CAR_LANDSTALKER 200.7 -1006.2 25.1 car_to_steal5_km2
 
CHANGE_CAR_COLOUR car_to_steal5_km2 CARCOLOUR_RED4 CARCOLOUR_RED4
 
SET_CAN_RESPRAY_CAR car_to_steal5_km2 FALSE
 
ADD_BLIP_FOR_CAR car_to_steal5_km2 radar_blip_car5_km2
 
SET_CAR_HEADING car_to_steal5_km2 90.0 
 
flag_blip_car5_on = 1
 
*/
 
DISPLAY_ONSCREEN_TIMER timer_km2
 
// waiting for all 5 vehicles to be in the range
 
WHILE timer_km2 > 0
 
	WAIT 0
 
 	IF counter_number_of_cars_in_garage_km2 = 3
		GOTO mission_kenji2_passed
	ENDIF
 
// if player in car checks for car damage and blip stuff
 
// checks for car 1
 
IF flag_car1_in_garage = 0
 
	IF IS_CAR_IN_MISSION_GARAGE garage_km2 // Testarossa
	AND flag_garage_no_blip_car1_km2 = 1
		flag_car1_destroyed = 1
		++ counter_number_of_cars_in_garage_km2
		ADD_ONE_OFF_SOUND 380.3 -506.8 26.1 SOUND_PART_MISSION_COMPLETE
		PRINT_NOW ( KM2_2 ) 5000 1 //"Car delivered"
		IF NOT IS_CAR_DEAD car_to_steal1_km2
			DELETE_CAR car_to_steal1_km2
		ENDIF
		flag_car1_in_garage = 1
	ENDIF
 
 
	IF flag_car1_destroyed = 0
 
		IF IS_CAR_DEAD car_to_steal1_km2
			PRINT_NOW ( WRECKED ) 5000 1 //"The vehicle's wrecked!"
			flag_car1_destroyed = 1
			GOTO mission_kenji2_failed
		ELSE
 
			IF IS_CAR_UPSIDEDOWN car_to_steal1_km2
			AND IS_CAR_STOPPED car_to_steal1_km2
				PRINT_NOW ( UPSIDE ) 5000 1 //You've flipped your wheels!"
				GOTO mission_kenji2_failed
			ENDIF
 
		ENDIF 										  
 
		IF IS_CAR_STOPPED_IN_AREA_3D car_to_steal1_km2 377.3 -511.4 25.1132 383.7 -502.0 30.0 FALSE
 
			IF NOT IS_CAR_VISIBLY_DAMAGED car_to_steal1_km2
				flag_garage_no_blip_car1_km2 = 1
			ENDIF
 
			IF DOES_GARAGE_CONTAIN_CAR garage_km2 car_to_steal1_km2
 
				IF flag_player_had_garage_car1_message = 0
					PRINT_NOW ( GARAGE1 ) 5000 1 //"Get out of the vehicle and walk outside!" 
					flag_player_had_garage_car1_message = 1
				ENDIF
 
			ELSE
				flag_player_had_garage_car1_message = 0
			ENDIF
 
		ELSE
			flag_garage_no_blip_car1_km2 = 0
		ENDIF
 
		IF IS_PLAYER_IN_CAR player car_to_steal1_km2
 
			IF flag_blip_car1_on = 1
				REMOVE_BLIP radar_blip_car1_km2
				flag_blip_car1_on = 0
			ENDIF
 
				IF IS_CAR_VISIBLY_DAMAGED car_to_steal1_km2 
 
					IF flag_player_damage_message_car1_km2 = 0
						PRINT_NOW ( KM2_1 ) 7000 1 //"Get the car reapaired the boss wants it mint!"
						SET_TARGET_CAR_FOR_MISSION_GARAGE garage_km2 -1
						flag_player_damage_message_car1_km2 = 1
					ENDIF
 
					IF flag_spray_blip_on_car1_km2 = 0
						ADD_SPRITE_BLIP_FOR_COORD 379.0 -493.8 25.2 RADAR_SPRITE_SPRAY spray_blip_km2
						flag_spray_blip_on_car1_km2 = 1
					ENDIF
 
				ELSE
 
					SET_TARGET_CAR_FOR_MISSION_GARAGE garage_km2 car_to_steal1_km2
 
					flag_player_damage_message_car1_km2 = 0
 
					IF flag_spray_blip_on_car1_km2 = 1
						REMOVE_BLIP spray_blip_km2
						flag_spray_blip_on_car1_km2 = 0
					ENDIF
 
				ENDIF
		ELSE
 
			flag_player_damage_message_car1_km2 = 0
 
			IF flag_spray_blip_on_car1_km2 = 1
				REMOVE_BLIP spray_blip_km2
				flag_spray_blip_on_car1_km2 = 0
			ENDIF
 
			IF flag_blip_car1_on = 0
 
				IF flag_garage_no_blip_car1_km2 = 0
					ADD_BLIP_FOR_CAR car_to_steal1_km2 radar_blip_car1_km2
					SET_TARGET_CAR_FOR_MISSION_GARAGE garage_km2 -1
					flag_blip_car1_on = 1
				ENDIF
 
			ENDIF
 
		ENDIF
 
	ENDIF
 
ENDIF
 
 
/*
 
// checks for car 2
 
IF flag_car2_in_garage = 0
 
	IF IS_CAR_IN_MISSION_GARAGE garage_km2 // Viper
	AND flag_garage_no_blip_car2_km2 = 1
		flag_car2_destroyed = 1
		++ counter_number_of_cars_in_garage_km2
		ADD_ONE_OFF_SOUND 380.3 -506.8 26.1 SOUND_PART_MISSION_COMPLETE
		PRINT_NOW ( KM2_2 ) 5000 1 //"Car delivered"
		flag_car2_in_garage = 1
	ENDIF
 
	IF flag_car2_destroyed = 0
 
		IF IS_CAR_DEAD car_to_steal2_km2
			 PRINT_NOW ( WRECKED ) 5000 1 //"The vehicle's wrecked!"
			flag_car2_destroyed = 1
			GOTO mission_kenji2_failed
		ELSE
 
			IF IS_CAR_UPSIDEDOWN car_to_steal2_km2
			AND IS_CAR_STOPPED car_to_steal2_km2 
				 PRINT_NOW ( UPSIDE ) 5000 1 //You've flipped your wheels!"
				GOTO mission_kenji2_failed
			ENDIF
 
		ENDIF
 
		IF IS_CAR_STOPPED_IN_AREA_3D car_to_steal2_km2 377.3 -511.4 25.1132 383.7 -502.0 30.0 FALSE
 
			IF NOT IS_CAR_VISIBLY_DAMAGED car_to_steal2_km2 
				flag_garage_no_blip_car2_km2 = 1
			ENDIF
 
			IF DOES_GARAGE_CONTAIN_CAR garage_km2 car_to_steal2_km2
 
				IF flag_player_had_garage_car2_message = 0
					PRINT_NOW ( GARAGE1 ) 5000 1 //"Get out of the vehicle and walk outside!" 
					flag_player_had_garage_car2_message = 1
				ENDIF
 
			ELSE
				flag_player_had_garage_car2_message = 0
			ENDIF
 
		ELSE
			flag_garage_no_blip_car2_km2 = 0
		ENDIF
 
 
		IF IS_PLAYER_IN_CAR player car_to_steal2_km2
 
			IF flag_blip_car2_on = 1
				REMOVE_BLIP radar_blip_car2_km2
				flag_blip_car2_on = 0
			ENDIF
 
				IF IS_CAR_VISIBLY_DAMAGED car_to_steal2_km2 
 
					IF flag_player_damage_message_car2_km2 = 0
						PRINT_NOW ( KM2_1 ) 7000 1 //"Get the car reapaired the boss wants it mint!"
						SET_TARGET_CAR_FOR_MISSION_GARAGE garage_km2 -1
						flag_player_damage_message_car2_km2 = 1
					ENDIF
 
					IF flag_spray_blip_on_car2_km2 = 0
						ADD_SPRITE_BLIP_FOR_COORD 379.0 -493.8 25.2 RADAR_SPRITE_SPRAY spray_blip_km2
						flag_spray_blip_on_car2_km2 = 1
					ENDIF
 
				ELSE
 
					SET_TARGET_CAR_FOR_MISSION_GARAGE garage_km2 car_to_steal2_km2
					flag_player_damage_message_car2_km2 = 0
 
					IF flag_spray_blip_on_car2_km2 = 1
						REMOVE_BLIP spray_blip_km2
						flag_spray_blip_on_car2_km2 = 0
					ENDIF
 
				ENDIF
   		ELSE
			flag_player_damage_message_car2_km2 = 0
 
			IF flag_spray_blip_on_car2_km2 = 1
				REMOVE_BLIP spray_blip_km2
				flag_spray_blip_on_car2_km2 = 0
			ENDIF
 
			IF flag_blip_car2_on = 0
 
				IF flag_garage_no_blip_car2_km2 = 0
					ADD_BLIP_FOR_CAR car_to_steal2_km2 radar_blip_car2_km2
					SET_TARGET_CAR_FOR_MISSION_GARAGE garage_km2 -1
					flag_blip_car2_on = 1
				ENDIF
 
			ENDIF
 
		ENDIF
 
	ENDIF
 
ENDIF
 
*/
 
 
// checks for car 3
 
IF flag_car3_in_garage = 0
 
	IF IS_CAR_IN_MISSION_GARAGE garage_km2 // Boxter
	AND flag_garage_no_blip_car3_km2 = 1
		flag_car3_destroyed = 1
		++ counter_number_of_cars_in_garage_km2
		ADD_ONE_OFF_SOUND 380.3 -506.8 26.1 SOUND_PART_MISSION_COMPLETE
		PRINT_NOW ( KM2_2 ) 5000 1 //"Car delivered"
		IF NOT IS_CAR_DEAD car_to_steal3_km2
			DELETE_CAR car_to_steal3_km2
		ENDIF
		flag_car3_in_garage = 1
	ENDIF
 
	IF flag_car3_destroyed = 0
 
		IF IS_CAR_DEAD car_to_steal3_km2
			PRINT_NOW ( WRECKED ) 5000 1 //"The vehicle's wrecked!"
			flag_car3_destroyed = 1
			GOTO mission_kenji2_failed
		ELSE
 
			IF IS_CAR_UPSIDEDOWN car_to_steal3_km2
			AND IS_CAR_STOPPED car_to_steal3_km2
				PRINT_NOW ( UPSIDE ) 5000 1 //You've flipped your wheels!"
				GOTO mission_kenji2_failed
			ENDIF
 
		ENDIF
 
		IF IS_CAR_STOPPED_IN_AREA_3D car_to_steal3_km2 377.3 -511.4 25.1132 383.7 -502.0 30.0 FALSE
 
			IF NOT IS_CAR_VISIBLY_DAMAGED car_to_steal3_km2
				flag_garage_no_blip_car3_km2 = 1
			ENDIF
 
			IF DOES_GARAGE_CONTAIN_CAR garage_km2 car_to_steal3_km2
 
				IF flag_player_had_garage_car3_message = 0
					PRINT_NOW ( GARAGE1 ) 5000 1 //"Get out of the vehicle and walk outside!" 
					flag_player_had_garage_car3_message = 1
				ENDIF
 
			ELSE
				flag_player_had_garage_car3_message = 0
			ENDIF
 
		ELSE
			flag_garage_no_blip_car3_km2 = 0
		ENDIF
 
 
			IF IS_PLAYER_IN_CAR player car_to_steal3_km2
 
				IF flag_blip_car3_on = 1
					REMOVE_BLIP radar_blip_car3_km2
					flag_blip_car3_on = 0
				ENDIF
 
					IF IS_CAR_VISIBLY_DAMAGED car_to_steal3_km2 
 
						IF flag_player_damage_message_car3_km2 = 0
							PRINT_NOW ( KM2_1 ) 7000 1 //"Get the car reapaired the boss wants it mint!"
							SET_TARGET_CAR_FOR_MISSION_GARAGE garage_km2 -1
							flag_player_damage_message_car3_km2 = 1
						ENDIF
 
						IF flag_spray_blip_on_car3_km2 = 0
							ADD_SPRITE_BLIP_FOR_COORD 379.0 -493.8 25.2 RADAR_SPRITE_SPRAY spray_blip_km2
							flag_spray_blip_on_car3_km2 = 1
						ENDIF	
 
					ELSE
 
						SET_TARGET_CAR_FOR_MISSION_GARAGE garage_km2 car_to_steal3_km2
						flag_player_damage_message_car3_km2 = 0
 
						IF flag_spray_blip_on_car3_km2 = 1
							REMOVE_BLIP spray_blip_km2
							flag_spray_blip_on_car3_km2 = 0
						ENDIF
 
					ENDIF
			ELSE
				flag_player_damage_message_car3_km2 = 0
 
				IF flag_spray_blip_on_car3_km2 = 1
					REMOVE_BLIP spray_blip_km2
					flag_spray_blip_on_car3_km2 = 0
				ENDIF
 
				IF flag_blip_car3_on = 0
 
					IF flag_garage_no_blip_car3_km2 = 0
						ADD_BLIP_FOR_CAR car_to_steal3_km2 radar_blip_car3_km2
						SET_TARGET_CAR_FOR_MISSION_GARAGE garage_km2 -1
						flag_blip_car3_on = 1
					ENDIF
 
				ENDIF
 
			ENDIF
 
	ENDIF
 
ENDIF
 
 
// checks for car 4
 
IF flag_car4_in_garage = 0
 
	IF IS_CAR_IN_MISSION_GARAGE garage_km2 // Diablo
	AND flag_garage_no_blip_car4_km2 = 1
		flag_car4_destroyed = 1
		++ counter_number_of_cars_in_garage_km2
		ADD_ONE_OFF_SOUND 380.3 -506.8 26.1 SOUND_PART_MISSION_COMPLETE
		PRINT_NOW ( KM2_2 ) 5000 1 //"Car delivered"
		IF NOT IS_CAR_DEAD car_to_steal4_km2
			DELETE_CAR car_to_steal4_km2
		ENDIF
		flag_car4_in_garage = 1
	ENDIF
 
	IF flag_car4_destroyed = 0
 
		IF IS_CAR_DEAD car_to_steal4_km2
			PRINT_NOW ( WRECKED ) 5000 1 //"The vehicle's wrecked!"
			flag_car4_destroyed = 1
			GOTO mission_kenji2_failed
		ELSE
 
			IF IS_CAR_UPSIDEDOWN car_to_steal4_km2
			AND IS_CAR_STOPPED car_to_steal4_km2
				PRINT_NOW ( UPSIDE ) 5000 1 //You've flipped your wheels!"
				GOTO mission_kenji2_failed
			ENDIF
 
		ENDIF
 
		IF IS_CAR_STOPPED_IN_AREA_3D car_to_steal4_km2 377.3 -511.4 25.1132 383.7 -502.0 30.0 FALSE
 
			IF NOT IS_CAR_VISIBLY_DAMAGED car_to_steal4_km2
				flag_garage_no_blip_car4_km2 = 1
			ENDIF
 
			IF DOES_GARAGE_CONTAIN_CAR garage_km2 car_to_steal4_km2
 
				IF flag_player_had_garage_car4_message = 0
					PRINT_NOW ( GARAGE1 ) 5000 1 //"Get out of the vehicle and walk outside!" 
					flag_player_had_garage_car4_message = 1
				ENDIF
 
			ELSE
				flag_player_had_garage_car4_message = 0
			ENDIF
 
		ELSE
			flag_garage_no_blip_car4_km2 = 0
		ENDIF
 
			IF IS_PLAYER_IN_CAR player car_to_steal4_km2
 
				IF flag_blip_car4_on = 1
					REMOVE_BLIP radar_blip_car4_km2
					flag_blip_car4_on = 0
				ENDIF
 
				IF IS_CAR_VISIBLY_DAMAGED car_to_steal4_km2
 
					IF flag_player_damage_message_car4_km2 = 0
						PRINT_NOW ( KM2_1 ) 7000 1 //"Get the car reapaired the boss wants it mint!"
						SET_TARGET_CAR_FOR_MISSION_GARAGE garage_km2 -1
						flag_player_damage_message_car4_km2 = 1
					ENDIF
 
					IF flag_spray_blip_on_car4_km2 = 0
						ADD_SPRITE_BLIP_FOR_COORD 379.0 -493.8 25.2 RADAR_SPRITE_SPRAY spray_blip_km2
						flag_spray_blip_on_car4_km2 = 1
					ENDIF
 
				ELSE
 
					SET_TARGET_CAR_FOR_MISSION_GARAGE garage_km2 car_to_steal4_km2
					flag_player_damage_message_car4_km2 = 0
 
					IF flag_spray_blip_on_car4_km2 = 1
						REMOVE_BLIP spray_blip_km2
						flag_spray_blip_on_car4_km2 = 0
					ENDIF
 
				ENDIF
			ELSE
				flag_player_damage_message_car4_km2 = 0
 
				IF flag_spray_blip_on_car4_km2 = 1
					REMOVE_BLIP spray_blip_km2
					flag_spray_blip_on_car4_km2 = 0
				ENDIF
 
				IF flag_blip_car4_on = 0
 
					IF flag_garage_no_blip_car4_km2 = 0
						ADD_BLIP_FOR_CAR car_to_steal4_km2 radar_blip_car4_km2
						SET_TARGET_CAR_FOR_MISSION_GARAGE garage_km2 -1
						flag_blip_car4_on = 1
					ENDIF		
				ENDIF
			ENDIF
	ENDIF
 
ENDIF
 
/*
 
// checks for car 5
 
IF flag_car5_in_garage = 0
 
	IF IS_CAR_IN_MISSION_GARAGE garage_km2 // Offroad
	AND flag_garage_no_blip_car5_km2 = 1
		flag_car5_destroyed = 1
		++ counter_number_of_cars_in_garage_km2
		ADD_ONE_OFF_SOUND 380.3 -506.8 26.1 SOUND_PART_MISSION_COMPLETE
		PRINT_NOW ( KM2_2 ) 5000 1 //"Car delivered"
		flag_car5_in_garage = 1
	ENDIF
 
 
	IF flag_car5_destroyed = 0
 
		IF IS_CAR_DEAD car_to_steal5_km2
			PRINT_NOW ( WRECKED ) 5000 1 //"The vehicle's wrecked!"
			flag_car5_destroyed = 1
			GOTO mission_kenji2_failed
		ELSE
 
			IF IS_CAR_UPSIDEDOWN car_to_steal5_km2
			AND IS_CAR_STOPPED car_to_steal5_km2
				PRINT_NOW ( UPSIDE ) 5000 1 //You've flipped your wheels!"
				GOTO mission_kenji2_failed
			ENDIF
 
		ENDIF
 
		IF IS_CAR_STOPPED_IN_AREA_3D car_to_steal5_km2 377.3 -511.4 25.1132 383.7 -502.0 30.0 FALSE
 
			IF NOT IS_CAR_VISIBLY_DAMAGED car_to_steal5_km2
				flag_garage_no_blip_car5_km2 = 1
			ENDIF
 
			IF DOES_GARAGE_CONTAIN_CAR garage_km2 car_to_steal5_km2
 
				IF flag_player_had_garage_car5_message = 0
					PRINT_NOW ( GARAGE1 ) 5000 1 //"Get out of the vehicle and walk outside!" 
					flag_player_had_garage_car5_message = 1
				ENDIF
 
			ELSE
				flag_player_had_garage_car5_message = 0
			ENDIF
 
		ELSE
			flag_garage_no_blip_car5_km2 = 0
		ENDIF
 
 
			IF IS_PLAYER_IN_CAR player car_to_steal5_km2
 
				IF flag_blip_car5_on = 1
					REMOVE_BLIP radar_blip_car5_km2
					flag_blip_car5_on = 0
				ENDIF
 
				IF IS_CAR_VISIBLY_DAMAGED car_to_steal5_km2
 
					IF flag_player_damage_message_car5_km2 = 0
						PRINT_NOW ( KM2_1 ) 7000 1 //"Get the car reapaired the boss wants it mint!"
						SET_TARGET_CAR_FOR_MISSION_GARAGE garage_km2 -1
						flag_player_damage_message_car5_km2 = 1
					ENDIF
 
					IF flag_spray_blip_on_car5_km2 = 0
						ADD_SPRITE_BLIP_FOR_COORD 379.0 -493.8 25.2 RADAR_SPRITE_SPRAY spray_blip_km2
						flag_spray_blip_on_car5_km2 = 1
					ENDIF
 
				ELSE
 
					SET_TARGET_CAR_FOR_MISSION_GARAGE garage_km2 car_to_steal5_km2
					flag_player_damage_message_car5_km2 = 0
 
					IF flag_spray_blip_on_car5_km2 = 1
						REMOVE_BLIP spray_blip_km2
						flag_spray_blip_on_car5_km2 = 0
					ENDIF
 
				ENDIF
			ELSE
				flag_player_damage_message_car5_km2 = 0
 
				IF flag_spray_blip_on_car5_km2 = 1
					REMOVE_BLIP spray_blip_km2
					flag_spray_blip_on_car5_km2 = 0
				ENDIF
 
				IF flag_blip_car5_on = 0
 
					IF flag_garage_no_blip_car5_km2 = 0
						ADD_BLIP_FOR_CAR car_to_steal5_km2 radar_blip_car5_km2
						SET_TARGET_CAR_FOR_MISSION_GARAGE garage_km2 -1
						flag_blip_car5_on = 1
					ENDIF
 
				ENDIF
 
		  	ENDIF
	ENDIF
 
ENDIF
 
*/
 
ENDWHILE
 
PRINT_NOW ( OUTTIME ) 5000 1 //"Out of time!"
GOTO mission_kenji2_failed
 
 
 
// Mission Kenji5 failed
 
mission_kenji2_failed:
 
PRINT_BIG ( M_FAIL ) 5000 1 //"Mission Failed!"
 
RETURN
 
 
 
// mission Kenji5 passed
 
mission_kenji2_passed:
 
flag_kenji_mission2_passed = 1
REGISTER_MISSION_PASSED ( KM2 )
PLAYER_MADE_PROGRESS 1
PRINT_WITH_NUMBER_BIG ( m_pass ) 25000 5000 1 //"Mission Passed!"
PLAY_MISSION_PASSED_TUNE 1
ADD_SCORE player 25000
CLEAR_WANTED_LEVEL player
START_NEW_SCRIPT kenji_mission3_loop
RETURN
 
 
 
// mission cleanup
 
mission_cleanup_kenji2:
 
flag_player_on_mission = 0
flag_player_on_kenji_mission = 0
SET_TARGET_CAR_FOR_MISSION_GARAGE garage_km2 -1
CLEAR_ONSCREEN_TIMER timer_km2
REMOVE_BLIP radar_blip_coord1_km2
REMOVE_BLIP radar_blip_car1_km2
//REMOVE_BLIP radar_blip_car2_km2
REMOVE_BLIP radar_blip_car3_km2
REMOVE_BLIP radar_blip_car4_km2
//REMOVE_BLIP radar_blip_car5_km2
REMOVE_BLIP spray_blip_km2
MARK_MODEL_AS_NO_LONGER_NEEDED CAR_CHEETAH
//MARK_MODEL_AS_NO_LONGER_NEEDED CAR_BANSHEE
MARK_MODEL_AS_NO_LONGER_NEEDED CAR_STINGER
MARK_MODEL_AS_NO_LONGER_NEEDED CAR_INFERNUS
//MARK_MODEL_AS_NO_LONGER_NEEDED CAR_LANDSTALKER
MISSION_HAS_FINISHED
RETURN

kenji3

MISSION_START
// *****************************************************************************************
// *****************************************************************************************
// *****************************************************************************************
// *****************************************Kenji Mission 3********************************* 
// *******************************************Deal Steal************************************
// *****************************************************************************************
// *****************************************************************************************
// *****************************************************************************************
 
SCRIPT_NAME kenji3
 
// Mission start stuff
 
GOSUB mission_start_kenji3
 
	IF HAS_DEATHARREST_BEEN_EXECUTED
		GOSUB mission_kenji3_failed
	ENDIF
 
GOSUB mission_cleanup_kenji3
 
MISSION_END
 
// Variables for mission
 
VAR_INT colombian_car1_km3
 
VAR_INT colombian_car2_km3
 
VAR_INT colombian1_km3
 
VAR_INT colombian2_km3
 
VAR_INT colombian5_km3
 
VAR_INT colombian6_km3
 
VAR_INT yakuza1_km3
 
VAR_INT counter_number_of_yardies_dead_km3
 
VAR_INT radar_blip_yardie_car_km3
 
VAR_INT radar_blip_ped1_km3
 
VAR_INT radar_blip_coord2_km3
 
VAR_INT flag_player_had_car_message_km3
 
VAR_INT flag_player_had_repair_message_km3
 
VAR_INT flag_player_been_bad_km3
 
VAR_INT radar_blip_colombian_car1_km3
 
VAR_INT radar_blip_colombian_car2_km3
 
VAR_INT radar_blip_colombian1_km3
 
VAR_INT radar_blip_colombian2_km3
 
VAR_INT radar_blip_colombian5_km3
 
VAR_INT radar_blip_colombian6_km3
 
VAR_INT counter_number_of_colombians_killed_km3
 
VAR_INT counter_all_colombian_cars_dead_km3
 
VAR_INT flag_colombian1_dead_km3
 
VAR_INT flag_colombian2_dead_km3
 
VAR_INT flag_colombian5_dead_km3
 
VAR_INT flag_colombian6_dead_km3
 
VAR_INT flag_colombian_car1_dead_km3
 
VAR_INT flag_colombian_car2_dead_km3
 
VAR_INT car_km3 // TEST TO COME OUT
 
VAR_INT flag_yakuza1_km3_dead
 
VAR_INT car2_km3
 
VAR_INT car3_km3
 
VAR_INT car_cut_km3
 
VAR_INT flag_blip_on_yakuza_km3
 
VAR_INT flag_yakuza_message_km3
 
VAR_INT flag_bloke_in_car_km3
 
VAR_INT flag_car1_created_km3
 
VAR_INT flag_car2_created_km3
 
VAR_INT money_km3
 
VAR_INT radar_blip_money_km3
 
VAR_INT money_been_picked_up_km3
 
VAR_INT radar_blip_coord3_km3
 
VAR_INT flag_money_created_km3
 
VAR_INT flag_go_for_player_km3
 
VAR_INT flag_trap_audio_removed_km3
 
VAR_INT flag_helper_not_in_car_km3
 
// ****************************************Mission Start************************************
 
mission_start_kenji3:
 
flag_player_on_mission = 1
 
flag_player_on_kenji_mission = 1
 
REGISTER_MISSION_GIVEN
 
WAIT 0
 
flag_player_had_car_message_km3 = 0
 
flag_player_been_bad_km3 = 0
 
counter_number_of_colombians_killed_km3 = 0
 
counter_all_colombian_cars_dead_km3 = 0
 
flag_colombian1_dead_km3 = 0
 
flag_colombian2_dead_km3 = 0
 
flag_colombian5_dead_km3 = 0
 
flag_colombian6_dead_km3 = 0
 
flag_colombian_car1_dead_km3 = 0
 
flag_colombian_car2_dead_km3 = 0
 
flag_yakuza1_km3_dead = 0
 
flag_blip_on_yakuza_km3 = 0
 
blob_flag = 1
 
flag_yakuza_message_km3 = 0
 
flag_bloke_in_car_km3 = 0
 
flag_car1_created_km3 = 0
 
flag_car2_created_km3 = 0
 
money_been_picked_up_km3 = 0
 
flag_money_created_km3 = 0
 
flag_go_for_player_km3 = 0
 
flag_trap_audio_removed_km3 = 0
 
flag_helper_not_in_car_km3 = 0
 
SWITCH_ROADS_OFF 121.814 -46.429 14.0 363.858 54.312 20.0
SWITCH_PED_ROADS_OFF 121.814 -46.429 14.0 363.858 54.312 20.0
 
 
 
// ****************************************START OF CUTSCENE********************************
 
/*
IF CAN_PLAYER_START_MISSION player
	MAKE_PLAYER_SAFE_FOR_CUTSCENE player
ELSE
	GOTO mission_kenji3_failed
ENDIF
 
SET_FADING_COLOUR 0 0 0
 
DO_FADE 1500 FADE_OUT
 
PRINT_BIG ( KM3 ) 15000 2  //"Kenji Mission 3"
 
SWITCH_STREAMING OFF
*/
 
// Cutscene stuff
 
LOAD_SPECIAL_CHARACTER 1 KENJI
REQUEST_MODEL PED_GANG_YAKUZA_A 
LOAD_SPECIAL_MODEL cut_obj1 KENJIH 
LOAD_SPECIAL_MODEL cut_obj2 PLAYERH
REQUEST_MODEL casino_garden 
 
/*
WHILE GET_FADING_STATUS
 
	WAIT 0
 
ENDWHILE
*/
 
LOAD_ALL_MODELS_NOW
 
WHILE NOT HAS_SPECIAL_CHARACTER_LOADED 1
OR NOT HAS_MODEL_LOADED PED_GANG_YAKUZA_A 
OR NOT HAS_MODEL_LOADED cut_obj1
OR NOT HAS_MODEL_LOADED cut_obj2
OR NOT HAS_MODEL_LOADED casino_garden
 
	WAIT 0
 
ENDWHILE
 
//SET_VISIBILITY_OF_CLOSEST_OBJECT_OF_TYPE 890.9 -416.9 15.0 6.0 backdoor FALSE	
 
LOAD_CUTSCENE k3_ds
 
SET_CUTSCENE_OFFSET 476.380 -1382.168 67.347
 
CREATE_CUTSCENE_OBJECT PED_PLAYER cs_player
 
SET_CUTSCENE_ANIM cs_player player
 
CREATE_CUTSCENE_OBJECT PED_SPECIAL1 cs_kenji
 
SET_CUTSCENE_ANIM cs_kenji kenji
 
CREATE_CUTSCENE_OBJECT PED_GANG_YAKUZA_A cs_yakuza
 
SET_CUTSCENE_ANIM cs_yakuza gang07
 
CREATE_CUTSCENE_HEAD cs_kenji CUT_OBJ1 cs_kenjihead
 
SET_CUTSCENE_HEAD_ANIM cs_kenjihead kenji
 
CREATE_CUTSCENE_HEAD cs_player CUT_OBJ2 cs_playerhead
 
SET_CUTSCENE_HEAD_ANIM cs_playerhead player
 
CLEAR_AREA 459.1 -1413.0 25.11 1.0 TRUE 
 
SET_PLAYER_COORDINATES player 459.1 -1413.0 25.11
 
SET_PLAYER_HEADING player 132.0
 
DO_FADE 1500 FADE_IN
 
SWITCH_RUBBISH OFF
 
SWITCH_STREAMING ON
 
START_CUTSCENE
 
// Displays cutscene text
 
GET_CUTSCENE_TIME cs_time
 
WHILE cs_time < 1533
	WAIT 0
	GET_CUTSCENE_TIME cs_time
ENDWHILE
 
PRINT_NOW ( KM3_A ) 10000 1 //"When trouble looms, the fool turns his back, while the wise man faces it down."
 
WHILE cs_time < 6549
	WAIT 0
	GET_CUTSCENE_TIME cs_time
ENDWHILE
 
PRINT_NOW ( KM3_B ) 10000 1 //"The Colombian Cartel have ignored repeated requests to leave our interests in Liberty well alone."
 
WHILE cs_time < 11426
	WAIT 0
	GET_CUTSCENE_TIME cs_time
ENDWHILE
 
PRINT_NOW ( KM3_C ) 10000 1 //"Now they are negotiating terms with the Jamaicans in order to humiliate us further."
 
WHILE cs_time < 15676
	WAIT 0
	GET_CUTSCENE_TIME cs_time
ENDWHILE
 
PRINT_NOW ( KM3_D ) 10000 1 //"They are finalizing a deal across town. Take some of my men, steal a Yardie car and go pay your respects to the Colombians."
 
WHILE cs_time < 17697
	WAIT 0
	GET_CUTSCENE_TIME cs_time
ENDWHILE
 
PRINT_NOW ( KM3_F ) 10000 1 //"Take one of my men, steal a Yardie car and go pay your respects to the Colombians."
 
WHILE cs_time < 22086
	WAIT 0
	GET_CUTSCENE_TIME cs_time
ENDWHILE
 
PRINT_NOW ( KM3_E ) 10000 1 //"Our honor demands that you leave no one alive."
 
WHILE cs_time < 24442
	WAIT 0
	GET_CUTSCENE_TIME cs_time
ENDWHILE
 
CLEAR_THIS_PRINT ( KM3_E )
 
WHILE cs_time < 25000//24666
	WAIT 0
	GET_CUTSCENE_TIME cs_time
ENDWHILE
 
DO_FADE 1500 FADE_OUT
 
WHILE NOT HAS_CUTSCENE_FINISHED
	WAIT 0
ENDWHILE
 
CLEAR_PRINTS
 
WHILE GET_FADING_STATUS
	WAIT 0
ENDWHILE
 
CLEAR_CUTSCENE
 
SWITCH_RUBBISH ON
 
SET_CAMERA_IN_FRONT_OF_PLAYER
 
WAIT 500
 
DO_FADE 1500 FADE_IN 
 
 
//SET_VISIBILITY_OF_CLOSEST_OBJECT_OF_TYPE 890.9 -416.9 15.0 6.0 backdoor TRUE
 
UNLOAD_SPECIAL_CHARACTER 1
MARK_MODEL_AS_NO_LONGER_NEEDED CUT_OBJ1
MARK_MODEL_AS_NO_LONGER_NEEDED CUT_OBJ2
MARK_MODEL_AS_NO_LONGER_NEEDED casino_garden
 
 
// *******************************************END OF CUTSCENE*******************************
 
REQUEST_MODEL CAR_YARDIE
 
REQUEST_MODEL CAR_COLUMB
 
REQUEST_MODEL PED_GANG_YARDIE_A
 
REQUEST_MODEL PED_GANG_COLOMBIAN_A
 
WHILE NOT HAS_MODEL_LOADED CAR_YARDIE
OR NOT HAS_MODEL_LOADED PED_GANG_YARDIE_A
OR NOT HAS_MODEL_LOADED PED_GANG_COLOMBIAN_A
OR NOT HAS_MODEL_LOADED CAR_COLUMB
 
	WAIT 0
 
ENDWHILE
 
PRINT_NOW ( KM3_1 ) 7000 1 //"First go and get the yardie car!"
 
// waiting for the player to steal a yardie car
 
LOAD_MISSION_AUDIO K3_A
 
WHILE NOT IS_PLAYER_IN_MODEL player CAR_YARDIE
OR NOT HAS_MISSION_AUDIO_LOADED
 
	WAIT 0
 
ENDWHILE
 
PRINT_NOW ( KM3_2 ) 7000 1 //"Good now pick up the boys in the yardie car, press the horn to get them into the car!"
 
// yakuza bloke 1
 
CREATE_CHAR PEDTYPE_CIVMALE PED_GANG_YAKUZA_A 99.6 -414.3 -100.0 yakuza1_km3
 
CLEAR_CHAR_THREAT_SEARCH yakuza1_km3
 
SET_CHAR_PERSONALITY yakuza1_km3 PEDSTAT_TOUGH_GUY
 
SET_CHAR_HEADING yakuza1_km3 0.0
 
GIVE_WEAPON_TO_CHAR yakuza1_km3 WEAPONTYPE_UZI 30000 // sets weapon to infinate ammo
 
ADD_BLIP_FOR_CHAR yakuza1_km3 radar_blip_ped1_km3
 
// waiting for the player to reach the yakuza gang members
 
WHILE NOT LOCATE_PLAYER_IN_CAR_CHAR_3D player yakuza1_km3 8.0 8.0 8.0 FALSE
OR NOT IS_PLAYER_IN_MODEL player CAR_YARDIE
OR NOT IS_PLAYER_STOPPED player
 
	WAIT 0
 
	IF IS_CHAR_DEAD yakuza1_km3
		PRINT_NOW ( KM3_10 ) 5000 1 //"The contact is dead!"
		flag_yakuza1_km3_dead = 1
		GOTO mission_kenji3_failed
	ENDIF 
 
	IF NOT IS_PLAYER_IN_MODEL player CAR_YARDIE
	AND flag_player_had_car_message_km3 = 0
		PRINT_NOW ( KM3_8 ) 7000 1 //"Get a Yardie car and get on with the mission!"
		REMOVE_BLIP radar_blip_ped1_km3
		flag_player_had_car_message_km3 = 1
		blob_flag = 0
	ENDIF
 
	IF IS_PLAYER_IN_MODEL player CAR_YARDIE
	AND flag_player_had_car_message_km3 = 1
		ADD_BLIP_FOR_CHAR yakuza1_km3 radar_blip_ped1_km3
		flag_player_had_car_message_km3 = 0
		blob_flag = 1
	ENDIF
 
ENDWHILE
 
SET_PLAYER_AS_LEADER yakuza1_km3 player
REMOVE_BLIP radar_blip_ped1_km3
 
// waiting for the yakuza guy to get into the players car and give his message
 
WHILE NOT LOCATE_PLAYER_IN_CAR_CHAR_3D player yakuza1_km3 1.0 1.0 3.0 FALSE
OR NOT IS_PLAYER_IN_MODEL player CAR_YARDIE
//OR NOT IS_PLAYER_STOPPED player
 
	WAIT 0
 
	IF IS_CHAR_DEAD yakuza1_km3
		PRINT_NOW ( KM3_10 ) 5000 1 //"The contact is dead!"
		flag_yakuza1_km3_dead = 1
		GOTO mission_kenji3_failed
	ENDIF 
 
	IF NOT IS_PLAYER_IN_MODEL player CAR_YARDIE
	AND flag_player_had_car_message_km3 = 0
		PRINT_NOW ( KM3_8 ) 7000 1 //"Get a Yardie car and get on with the mission!"
		REMOVE_BLIP radar_blip_ped1_km3
		flag_player_had_car_message_km3 = 1
		blob_flag = 0
	ENDIF
 
	IF IS_PLAYER_IN_MODEL player CAR_YARDIE
	AND flag_player_had_car_message_km3 = 1
		ADD_BLIP_FOR_CHAR yakuza1_km3 radar_blip_ped1_km3
		flag_player_had_car_message_km3 = 0
		blob_flag = 1
	ENDIF
 
	IF NOT IS_CHAR_IN_PLAYERS_GROUP yakuza1_km3 player
	AND flag_yakuza_message_km3 = 0
		PRINT_NOW ( HEY9 ) 5000 1 //"You have not got the information from the contact go back and get it."
		ADD_BLIP_FOR_CHAR yakuza1_km3 radar_blip_ped1_km3
		flag_yakuza_message_km3 = 1
	ENDIF
 
	IF LOCATE_PLAYER_ANY_MEANS_CHAR_2D player yakuza1_km3 8.0 8.0 FALSE
	AND flag_yakuza_message_km3 = 1
		SET_PLAYER_AS_LEADER yakuza1_km3 player
		REMOVE_BLIP radar_blip_ped1_km3
		flag_yakuza_message_km3 = 0
	ENDIF
 
ENDWHILE
 
REMOVE_BLIP radar_blip_ped1_km3
 
PRINT_NOW ( KM3_3 ) 5000 1 //"Okay the meeting is being held at XXXXXXX!"
 
ADD_BLIP_FOR_COORD 231.1 -26.3 -100.0 radar_blip_coord2_km3
 
// Colombian car 1
 
CREATE_CAR CAR_COLUMB 230.3 -42.2 -100.0 colombian_car1_km3
 
SET_CAR_HEADING colombian_car1_km3 0.0
 
SET_CAR_ONLY_DAMAGED_BY_PLAYER colombian_car1_km3 TRUE
 
CHANGE_CAR_LOCK colombian_car1_km3 CARLOCK_LOCKOUT_PLAYER_ONLY
 
flag_car1_created_km3 = 1
 
// Colombian car 2 
 
CREATE_CAR CAR_COLUMB 235.9 -41.3 -100.0 colombian_car2_km3
 
SET_CAR_HEADING colombian_car2_km3 0.0
 
SET_CAR_ONLY_DAMAGED_BY_PLAYER colombian_car2_km3 TRUE
 
CHANGE_CAR_LOCK colombian_car2_km3 CARLOCK_LOCKOUT_PLAYER_ONLY
 
flag_car2_created_km3 = 1
 
// creates colombian 1 in car 1
 
CREATE_CHAR_INSIDE_CAR colombian_car1_km3 PEDTYPE_GANG_COLOMBIAN PED_GANG_COLOMBIAN_A colombian1_km3
 
GIVE_WEAPON_TO_CHAR colombian1_km3 WEAPONTYPE_CHAINGUN 30000  //AK47 set to infinate ammo
 
CLEAR_CHAR_THREAT_SEARCH colombian1_km3
 
CAR_SET_IDLE colombian_car1_km3
 
// creates colombian 2 in car 1
 
CREATE_CHAR_AS_PASSENGER colombian_car1_km3 PEDTYPE_GANG_COLOMBIAN PED_GANG_COLOMBIAN_A 0 colombian2_km3
 
GIVE_WEAPON_TO_CHAR colombian2_km3 WEAPONTYPE_UZI 30000  //set to infinate ammo
 
CLEAR_CHAR_THREAT_SEARCH colombian2_km3
 
// creates colombian 5 in car 2
 
CREATE_CHAR_INSIDE_CAR colombian_car2_km3 PEDTYPE_GANG_COLOMBIAN PED_GANG_COLOMBIAN_A colombian5_km3
 
GIVE_WEAPON_TO_CHAR colombian5_km3 WEAPONTYPE_UZI 30000  //set to infinate ammo
 
CAR_SET_IDLE colombian_car2_km3
 
CLEAR_CHAR_THREAT_SEARCH colombian5_km3
 
// creates colombian 6 in car 2
 
CREATE_CHAR_AS_PASSENGER colombian_car2_km3 PEDTYPE_GANG_COLOMBIAN PED_GANG_COLOMBIAN_A 0 colombian6_km3
 
GIVE_WEAPON_TO_CHAR colombian6_km3 WEAPONTYPE_CHAINGUN 30000  //AK47 set to infinate ammo
 
CLEAR_CHAR_THREAT_SEARCH colombian6_km3
 
// waiting for the player to get to the meeting
 
blob_flag = 1
 
WHILE NOT LOCATE_STOPPED_PLAYER_IN_CAR_2D player 231.1 -26.3 6.0 6.0 blob_flag
OR NOT IS_PLAYER_IN_MODEL player CAR_YARDIE
 
	WAIT 0
 
IF flag_yakuza1_km3_dead = 0 
 
	IF IS_CHAR_DEAD yakuza1_km3
		flag_yakuza1_km3_dead = 1
	ELSE
 
		IF NOT IS_CHAR_IN_PLAYERS_GROUP yakuza1_km3 player
		AND flag_blip_on_yakuza_km3 = 0
			PRINT_NOW ( HEY7 ) 5000 1 //"You have left your contact behind go and get him!"
			ADD_BLIP_FOR_CHAR yakuza1_km3 radar_blip_ped1_km3
			REMOVE_BLIP radar_blip_coord2_km3
			flag_blip_on_yakuza_km3 = 1
			blob_flag = 0
		ENDIF
 
		IF LOCATE_PLAYER_ANY_MEANS_CHAR_2D player yakuza1_km3 8.0 8.0 FALSE
		AND flag_blip_on_yakuza_km3 = 1
			SET_PLAYER_AS_LEADER yakuza1_km3 player
			REMOVE_BLIP radar_blip_ped1_km3
	  		ADD_BLIP_FOR_COORD 231.1 -26.3 -100.0 radar_blip_coord2_km3
			flag_blip_on_yakuza_km3 = 0
			blob_flag = 1
		ENDIF
 
	ENDIF
 
ENDIF
 
	IF IS_CAR_DEAD colombian_car1_km3
		flag_colombian_car1_dead_km3 = 1
		PRINT_NOW ( KM3_11 ) 5000 1 //"The Cartel have been attacked and the briefcase has not been recovered.!"
		GOTO mission_kenji3_failed
	ENDIF
 
	IF IS_CAR_DEAD colombian_car2_km3
		flag_colombian_car2_dead_km3 = 1
		PRINT_NOW ( KM3_11 ) 5000 1 //"The Cartel have been attacked and the briefcase has not been recovered.!
		GOTO mission_kenji3_failed
	ENDIF
 
	IF IS_CHAR_DEAD colombian1_km3
		PRINT_NOW ( KM3_9 ) 5000 1 //"One of the Colombians is dead, the deals off."
		GOTO mission_kenji3_failed
	ENDIF	
 
	IF IS_CHAR_DEAD colombian2_km3
		PRINT_NOW ( KM3_9 ) 5000 1 //"One of the Colombians is dead, the deals off."
		GOTO mission_kenji3_failed
	ENDIF
 
	IF IS_CHAR_DEAD colombian5_km3
		PRINT_NOW ( KM3_9 ) 5000 1 //"One of the Colombians is dead, the deals off."
		GOTO mission_kenji3_failed
	ENDIF
 
	IF IS_CHAR_DEAD colombian6_km3
		PRINT_NOW ( KM3_9 ) 5000 1 //"One of the Colombians is dead, the deals off."
		GOTO mission_kenji3_failed
	ENDIF
 
	IF NOT IS_PLAYER_IN_MODEL player CAR_YARDIE
	AND flag_player_had_car_message_km3 = 0
		PRINT_NOW ( KM3_8 ) 7000 1 //"Get a Yardie car and get on with the mission!
		REMOVE_BLIP radar_blip_coord2_km3
		flag_player_had_car_message_km3 = 1
		blob_flag = 0
	ENDIF
 
	IF IS_PLAYER_IN_MODEL player CAR_YARDIE
	AND flag_player_had_car_message_km3 = 1
		ADD_BLIP_FOR_COORD 231.1 -26.3 -100.0 radar_blip_coord2_km3
		flag_player_had_car_message_km3 = 0
		blob_flag = 1
	ENDIF
 
	IF LOCATE_PLAYER_ANY_MEANS_2D player 231.1 -26.3 10.0 10.0 FALSE
 
   		IF NOT IS_PLAYER_IN_MODEL player CAR_YARDIE
		OR IS_PLAYER_SHOOTING player
			PRINT_NOW ( KM3_14 ) 7000 1 //"You have been seen the deals off"
			GOSUB attack_player
   			GOTO mission_kenji3_failed
		ENDIF
 
	ENDIF
 
ENDWHILE
 
REMOVE_BLIP radar_blip_coord2_km3
 
IF flag_colombian_car1_dead_km3 = 0
	SET_CAR_ONLY_DAMAGED_BY_PLAYER colombian_car1_km3 FALSE
ENDIF
 
IF flag_colombian_car2_dead_km3 = 0
	SET_CAR_ONLY_DAMAGED_BY_PLAYER colombian_car2_km3 FALSE
ENDIF 
 
PRINT_NOW ( KM3_5 ) 7000 1 //"Press the horn to get the deal going, as soon as the Columbians are out of the car kill them all!"
 
// waiting for the player to press the horn
 
blob_flag = 1
 
WHILE NOT IS_PLAYER_PRESSING_HORN player
OR NOT LOCATE_STOPPED_PLAYER_IN_CAR_2D player 231.1 -26.3 6.0 6.0 blob_flag
OR NOT IS_PLAYER_IN_MODEL player CAR_YARDIE
 
	WAIT 0
 
IF flag_yakuza1_km3_dead = 0
 
	IF IS_CHAR_DEAD yakuza1_km3
		flag_yakuza1_km3_dead = 1
	ELSE
 
		IF NOT IS_CHAR_IN_PLAYERS_GROUP yakuza1_km3 player
		AND flag_blip_on_yakuza_km3 = 0
			PRINT_NOW ( HEY7 ) 5000 1 //"You have left your contact behind go and get him!"
			ADD_BLIP_FOR_CHAR yakuza1_km3 radar_blip_ped1_km3
			REMOVE_BLIP radar_blip_coord2_km3
			flag_blip_on_yakuza_km3 = 1
			blob_flag = 0
		ENDIF
 
		IF LOCATE_PLAYER_ANY_MEANS_CHAR_2D player yakuza1_km3 8.0 8.0 FALSE
		AND flag_blip_on_yakuza_km3 = 1
			SET_PLAYER_AS_LEADER yakuza1_km3 player
			REMOVE_BLIP radar_blip_ped1_km3
	  		ADD_BLIP_FOR_COORD 231.1 -26.3 -100.0 radar_blip_coord2_km3
			flag_blip_on_yakuza_km3 = 0
			blob_flag = 1
		ENDIF
 
		SET_CHAR_THREAT_SEARCH yakuza1_km3 THREAT_GANG_COLOMBIAN
 
	ENDIF
 
ENDIF
 
	IF IS_CAR_DEAD colombian_car1_km3
		flag_colombian_car1_dead_km3 = 1
		PRINT_NOW ( KM3_11 ) 5000 1 //"The vehicle's KM3_11!
		GOTO mission_kenji3_failed
	ENDIF
 
	IF IS_CAR_DEAD colombian_car2_km3
		flag_colombian_car2_dead_km3 = 1
		PRINT_NOW ( KM3_11 ) 5000 1 //"The vehicle's KM3_11!
		GOTO mission_kenji3_failed
	ENDIF
 
	IF IS_CHAR_DEAD colombian1_km3
		flag_colombian1_dead_km3 = 1
		PRINT_NOW ( KM3_9 ) 5000 1 //"One of the Colombians is dead, the deals off."
		GOTO mission_kenji3_failed
	ENDIF
 
	IF IS_CHAR_DEAD colombian2_km3
		flag_colombian2_dead_km3 = 1
		PRINT_NOW ( KM3_9 ) 5000 1 //"One of the Colombians is dead, the deals off."
		GOTO mission_kenji3_failed
	ENDIF
 
	IF IS_CHAR_DEAD colombian5_km3		 
		flag_colombian5_dead_km3 = 1
		PRINT_NOW ( KM3_9 ) 5000 1 //"One of the Colombians is dead, the deals off."
		GOTO mission_kenji3_failed
	ENDIF
 
	IF IS_CHAR_DEAD colombian6_km3
		flag_colombian6_dead_km3 = 1
		PRINT_NOW ( KM3_9 ) 5000 1 //"One of the Colombians is dead, the deals off."
		GOTO mission_kenji3_failed
	ENDIF
 
	IF LOCATE_PLAYER_ANY_MEANS_2D player 231.1 -26.3 10.0 10.0 FALSE
 
   		IF NOT IS_PLAYER_IN_MODEL player CAR_YARDIE
		OR IS_PLAYER_SHOOTING player
			PRINT_NOW ( KM3_14 ) 7000 1 //"You have been seen the deals off"
			GOSUB attack_player
   			GOTO mission_kenji3_failed
		ENDIF
 
	ENDIF
 
ENDWHILE
 
CLEAR_THIS_PRINT ( KM3_5 )
 
SWITCH_WIDESCREEN ON
 
SET_PLAYER_CONTROL player OFF
 
SET_POLICE_IGNORE_PLAYER player ON
 
SET_EVERYONE_IGNORE_PLAYER player ON
 
CLEAR_AREA 252.0 -45.75 20.8 1.0 TRUE 
 
SET_FIXED_CAMERA_POSITION 252.0 -45.75 20.8 0.0 0.0 0.0
 
POINT_CAMERA_AT_POINT 251.1 -45.2 20.6 JUMP_CUT
 
SET_CHAR_OBJ_LEAVE_CAR colombian1_km3 colombian_car1_km3
 
SET_CHAR_OBJ_LEAVE_CAR colombian2_km3 colombian_car1_km3
 
SET_CHAR_OBJ_LEAVE_CAR colombian5_km3 colombian_car2_km3
 
SET_CHAR_OBJ_LEAVE_CAR colombian6_km3 colombian_car2_km3
 
IF NOT IS_CAR_DEAD colombian_car1_km3 
	CHANGE_CAR_LOCK colombian_car1_km3 CARLOCK_UNLOCKED
ENDIF
 
IF NOT IS_CAR_DEAD colombian_car2_km3
	CHANGE_CAR_LOCK colombian_car2_km3 CARLOCK_UNLOCKED
ENDIF   
 
// waiting for the guys to get out of the car
 
WHILE IS_CHAR_IN_CAR colombian1_km3 colombian_car1_km3
AND IS_CHAR_IN_CAR colombian2_km3 colombian_car1_km3
AND IS_CHAR_IN_CAR colombian5_km3 colombian_car2_km3
AND IS_CHAR_IN_CAR colombian6_km3 colombian_car2_km3
 
	WAIT 0
 
IF flag_yakuza1_km3_dead = 0 
 
	IF IS_CHAR_DEAD yakuza1_km3
		flag_yakuza1_km3_dead = 1
	ENDIF
 
ENDIF
 
	IF IS_CAR_DEAD colombian_car1_km3
		flag_colombian_car1_dead_km3 = 1
		PRINT_NOW ( KM3_11 ) 5000 1 //"The Cartel have been attacked and the briefcase has not been recovered."
		GOTO mission_kenji3_failed
	ENDIF
 
	IF IS_CAR_DEAD colombian_car2_km3
		flag_colombian_car2_dead_km3 = 1
		PRINT_NOW ( KM3_11 ) 5000 1 //"The Cartel have been attacked and the briefcase has not been recovered."
		GOTO mission_kenji3_failed
	ENDIF
 
	IF IS_CHAR_DEAD colombian1_km3
		flag_colombian1_dead_km3 = 1
		PRINT_NOW ( KM3_9 ) 5000 1 //"One of the Colombians is dead, the deals off."
		GOTO mission_kenji3_failed
	ENDIF
 
	IF IS_CHAR_DEAD colombian2_km3
		flag_colombian2_dead_km3 = 1
		PRINT_NOW ( KM3_9 ) 5000 1 //"One of the Colombians is dead, the deals off."
		GOTO mission_kenji3_failed
	ENDIF
 
	IF IS_CHAR_DEAD colombian5_km3
		flag_colombian5_dead_km3 = 1
		PRINT_NOW ( KM3_9 ) 5000 1 //"One of the Colombians is dead, the deals off."
		GOTO mission_kenji3_failed
	ENDIF
 
	IF IS_CHAR_DEAD colombian6_km3
		flag_colombian6_dead_km3 = 1
		PRINT_NOW ( KM3_9 ) 5000 1 //"One of the Colombians is dead, the deals off."
		GOTO mission_kenji3_failed
	ENDIF
 
ENDWHILE
 
//IF NOT IS_CHAR_DEAD colombian2_km3 
//	POINT_CAMERA_AT_CHAR colombian2_km3 FOLLOWPED JUMP_CUT 
//ENDIF
 
IF flag_colombian2_dead_km3 = 0
 
	SET_CHAR_OBJ_GOTO_COORD_ON_FOOT colombian2_km3 233.3 -37.1
 
	WHILE NOT IS_CHAR_OBJECTIVE_PASSED colombian2_km3
 
		WAIT 0
 
		IF flag_yakuza1_km3_dead = 0 
 
			IF IS_CHAR_DEAD yakuza1_km3
				flag_yakuza1_km3_dead = 1
			ENDIF
 
		ENDIF
 
		IF IS_CAR_DEAD colombian_car1_km3
			flag_colombian_car1_dead_km3 = 1
			PRINT_NOW ( KM3_11 ) 5000 1 //"The Cartel have been attacked and the briefcase has not been recovered."
			GOTO mission_kenji3_failed
		ENDIF
 
		IF IS_CAR_DEAD colombian_car2_km3
			flag_colombian_car2_dead_km3 = 1
			PRINT_NOW ( KM3_11 ) 5000 1 //"The Cartel have been attacked and the briefcase has not been recovered."
			GOTO mission_kenji3_failed
		ENDIF
 
		IF IS_CHAR_DEAD colombian1_km3
			flag_colombian1_dead_km3 = 1
			PRINT_NOW ( KM3_9 ) 5000 1 //"One of the Colombians is dead, the deals off."
			GOTO mission_kenji3_failed
		ENDIF
 
		IF IS_CHAR_DEAD colombian2_km3
			flag_colombian2_dead_km3 = 1
			PRINT_NOW ( KM3_9 ) 5000 1 //"One of the Colombians is dead, the deals off."
			GOTO mission_kenji3_failed
		ENDIF
 
		IF IS_CHAR_DEAD colombian5_km3
			flag_colombian5_dead_km3 = 1
			PRINT_NOW ( KM3_9 ) 5000 1 //"One of the Colombians is dead, the deals off."
			GOTO mission_kenji3_failed
		ENDIF
 
		IF IS_CHAR_DEAD colombian6_km3
			flag_colombian6_dead_km3 = 1
			PRINT_NOW ( KM3_9 ) 5000 1 //"One of the Colombians is dead, the deals off."
			GOTO mission_kenji3_failed
		ENDIF
 
	ENDWHILE
 
	CREATE_PICKUP briefcase PICKUP_ONCE 233.7 -36.0 15.8 money_km3
 
	flag_money_created_km3 = 1
 
 
ENDIF
 
SWITCH_WIDESCREEN OFF
 
RESTORE_CAMERA_JUMPCUT
 
SET_PLAYER_CONTROL player ON
 
SET_POLICE_IGNORE_PLAYER player OFF
 
SET_EVERYONE_IGNORE_PLAYER player OFF 
 
PRINT_NOW ( KM3_12 ) 5000 1 //"Kill all of the Colombians, destory the vehicles and recover the briefcase."
 
timera = 0
 
WHILE flag_go_for_player_km3 = 0
 
	WAIT 0
 
	IF timera >= 4000
		flag_go_for_player_km3 = 1
	ENDIF
 
	IF flag_yakuza1_km3_dead = 0 
 
		IF IS_CHAR_DEAD yakuza1_km3
			flag_yakuza1_km3_dead = 1
		ELSE
 
			IF flag_helper_not_in_car_km3 = 0 
 
				IF IS_CHAR_IN_ANY_CAR yakuza1_km3
					STORE_CAR_CHAR_IS_IN yakuza1_km3 car3_km3
 
					IF NOT IS_CAR_DEAD car3_km3
						LEAVE_GROUP yakuza1_km3 
						SET_CHAR_OBJ_LEAVE_CAR yakuza1_km3 car3_km3
					ENDIF
 
				ELSE
					flag_helper_not_in_car_km3 = 1
				ENDIF
 
			ENDIF
 
			IF flag_helper_not_in_car_km3 = 1 
				SET_CHAR_THREAT_SEARCH yakuza1_km3 THREAT_GANG_COLOMBIAN
				SET_CHAR_PERSONALITY yakuza1_km3 PEDSTAT_TOUGH_GUY
			ENDIF
 
		ENDIF
 
	ENDIF
 
	IF flag_colombian1_dead_km3 = 0
 
		IF IS_CHAR_DEAD colombian1_km3
			++ counter_number_of_colombians_killed_km3
			flag_go_for_player_km3 = 1
			flag_colombian1_dead_km3 = 1
		ENDIF
 
	ENDIF
 
	IF flag_colombian2_dead_km3 = 0
 
		IF IS_CHAR_DEAD colombian2_km3
			++ counter_number_of_colombians_killed_km3
			flag_go_for_player_km3 = 1
			flag_colombian2_dead_km3 = 1
		ENDIF
 
	ENDIF
 
 	IF flag_colombian5_dead_km3 = 0
 
		IF IS_CHAR_DEAD colombian5_km3
			++ counter_number_of_colombians_killed_km3
			flag_go_for_player_km3 = 1
			flag_colombian5_dead_km3 = 1
		ENDIF 
 
	ENDIF
 
	IF flag_colombian6_dead_km3 = 0
 
		IF IS_CHAR_DEAD colombian6_km3
			++ counter_number_of_colombians_killed_km3
			flag_go_for_player_km3 = 1
			flag_colombian6_dead_km3 = 1
		ENDIF
 
	ENDIF
 
 
	IF flag_colombian_car1_dead_km3 = 0
 
		IF IS_CAR_DEAD colombian_car1_km3
			++ counter_all_colombian_cars_dead_km3
			flag_go_for_player_km3 = 1
			flag_colombian_car1_dead_km3 = 1
		ENDIF
 
	ENDIF
 
	IF flag_colombian_car2_dead_km3 = 0
 
		IF IS_CAR_DEAD colombian_car2_km3
			++ counter_all_colombian_cars_dead_km3
			flag_go_for_player_km3 = 1
			flag_colombian_car2_dead_km3 = 1
		ENDIF
 
	ENDIF
 
	IF NOT IS_PLAYER_IN_MODEL player CAR_YARDIE
		flag_go_for_player_km3 = 1
	ENDIF
 
	IF NOT LOCATE_PLAYER_ANY_MEANS_2D player 231.1 -26.3 6.0 6.0 FALSE
		flag_go_for_player_km3 = 1
	ENDIF
 
	IF LOCATE_PLAYER_ANY_MEANS_2D player 231.1 -26.3 6.0 6.0 FALSE
 
		IF IS_PLAYER_SHOOTING player
			flag_go_for_player_km3 = 1
		ENDIF
 
	ENDIF
 
	IF money_been_picked_up_km3 = 0
 
		IF HAS_PICKUP_BEEN_COLLECTED money_km3
			PRINT_NOW ( KM4_8 ) 5000 1 //"Briefcase collected!"
			flag_go_for_player_km3 = 1
			money_been_picked_up_km3 = 1
		ENDIF
 
	ENDIF	 	
 
ENDWHILE
 
 
kill_player_km3:
 
PLAY_MISSION_AUDIO
 
PRINT_NOW ( KM3_7 ) 7000 1 //"Hey... your not who we were expecting!"
 
// briefcase
 
IF money_been_picked_up_km3 = 0 
	ADD_BLIP_FOR_PICKUP money_km3 radar_blip_money_km3
ENDIF
 
// car 1
 
IF flag_colombian_car1_dead_km3 = 0 
	ADD_BLIP_FOR_CAR colombian_car1_km3 radar_blip_colombian_car1_km3
ENDIF
 
// car 2
 
IF flag_colombian_car2_dead_km3 = 0 
	ADD_BLIP_FOR_CAR colombian_car2_km3 radar_blip_colombian_car2_km3
ENDIF
 
// colombian1
 
IF flag_colombian1_dead_km3 = 0
 
	SET_CHAR_THREAT_SEARCH colombian1_km3 THREAT_PLAYER1
 
	SET_CHAR_THREAT_SEARCH colombian1_km3 THREAT_GANG_YAKUZA
 
	SET_CHAR_PERSONALITY colombian1_km3 PEDSTAT_TOUGH_GUY
 
	//SET_CHAR_OBJ_KILL_PLAYER_ON_FOOT colombian1_km3 player
 
	ADD_BLIP_FOR_CHAR colombian1_km3 radar_blip_colombian1_km3
 
ENDIF
 
// colombian2
 
IF flag_colombian2_dead_km3 = 0
 
	SET_CHAR_THREAT_SEARCH colombian2_km3 THREAT_PLAYER1
 
	SET_CHAR_THREAT_SEARCH colombian2_km3 THREAT_GANG_YAKUZA
 
	SET_CHAR_PERSONALITY colombian2_km3 PEDSTAT_TOUGH_GUY
 
	//SET_CHAR_OBJ_KILL_PLAYER_ON_FOOT colombian2_km3 player
 
	ADD_BLIP_FOR_CHAR colombian2_km3 radar_blip_colombian2_km3
 
ENDIF
 
 
// colombian5
 
IF flag_colombian5_dead_km3 = 0
 
	ADD_BLIP_FOR_CHAR colombian5_km3 radar_blip_colombian5_km3
 
	SET_CHAR_THREAT_SEARCH colombian5_km3 THREAT_PLAYER1
 
	SET_CHAR_THREAT_SEARCH colombian5_km3 THREAT_GANG_YAKUZA
 
	SET_CHAR_PERSONALITY colombian5_km3 PEDSTAT_TOUGH_GUY
 
	//SET_CHAR_OBJ_KILL_PLAYER_ANY_MEANS colombian5_km3 player
 
ENDIF
 
// colombian6
 
IF flag_colombian6_dead_km3 = 0
 
	ADD_BLIP_FOR_CHAR colombian6_km3 radar_blip_colombian6_km3
 
	SET_CHAR_THREAT_SEARCH colombian6_km3 THREAT_PLAYER1
 
	SET_CHAR_THREAT_SEARCH colombian6_km3 THREAT_GANG_YAKUZA
 
	SET_CHAR_PERSONALITY colombian6_km3 PEDSTAT_TOUGH_GUY
 
	//SET_CHAR_OBJ_KILL_PLAYER_ON_FOOT colombian6_km3 player
 
ENDIF
 
timerb = 0
 
// waiting for all the columbains and their cars to be destroyed
 
WHILE NOT counter_number_of_colombians_killed_km3 = 4
OR NOT counter_all_colombian_cars_dead_km3 = 2
OR NOT money_been_picked_up_km3 = 1
 
	WAIT 0
 
	IF flag_trap_audio_removed_km3 = 0
 
		IF HAS_MISSION_AUDIO_FINISHED
			CLEAR_THIS_PRINT ( KM3_7 )
			flag_trap_audio_removed_km3 = 1
		ENDIF
 
	ENDIF
 
	IF money_been_picked_up_km3 = 0
 
		IF HAS_PICKUP_BEEN_COLLECTED money_km3
			PRINT_NOW ( KM4_8 ) 5000 1 //"Briefcase collected!"
			REMOVE_BLIP radar_blip_money_km3
			money_been_picked_up_km3 = 1
		ENDIF
 
	ENDIF
 
 
	IF flag_yakuza1_km3_dead = 0 
 
		IF IS_CHAR_DEAD yakuza1_km3
			flag_yakuza1_km3_dead = 1
		ELSE
 
			IF flag_helper_not_in_car_km3 = 0 
 
				IF IS_CHAR_IN_ANY_CAR yakuza1_km3
					STORE_CAR_CHAR_IS_IN yakuza1_km3 car3_km3
 
					IF NOT IS_CAR_DEAD car3_km3
						LEAVE_GROUP yakuza1_km3 
						SET_CHAR_OBJ_LEAVE_CAR yakuza1_km3 car3_km3
					ENDIF
 
				ELSE
					flag_helper_not_in_car_km3 = 1
				ENDIF
 
			ENDIF
 
			IF flag_helper_not_in_car_km3 = 1 
				SET_CHAR_THREAT_SEARCH yakuza1_km3 THREAT_GANG_COLOMBIAN
				SET_CHAR_PERSONALITY yakuza1_km3 PEDSTAT_TOUGH_GUY
			ENDIF
 
		ENDIF
 
	ENDIF
 
	IF counter_number_of_colombians_killed_km3 = 4
 
		IF NOT IS_CHAR_DEAD yakuza1_km3
 
			IF LOCATE_PLAYER_ANY_MEANS_CHAR_2D player yakuza1_km3 20.0 20.0 FALSE
				SET_PLAYER_AS_LEADER yakuza1_km3 player
			ENDIF
 
		ENDIF
 
	ENDIF
 
	IF flag_colombian1_dead_km3 = 0
 
		IF IS_CHAR_DEAD colombian1_km3
			REMOVE_BLIP radar_blip_colombian1_km3
			++ counter_number_of_colombians_killed_km3
			flag_colombian1_dead_km3 = 1
		ENDIF
 
	ENDIF
 
	IF flag_colombian2_dead_km3 = 0
 
		IF IS_CHAR_DEAD colombian2_km3
			REMOVE_BLIP radar_blip_colombian2_km3
			++ counter_number_of_colombians_killed_km3
			flag_colombian2_dead_km3 = 1
		ENDIF
 
	ENDIF
 
 	IF flag_colombian5_dead_km3 = 0
 
		IF IS_CHAR_DEAD colombian5_km3
			REMOVE_BLIP radar_blip_colombian5_km3
			++ counter_number_of_colombians_killed_km3
			flag_colombian5_dead_km3 = 1
		ENDIF 
 
	ENDIF
 
	IF flag_colombian6_dead_km3 = 0
 
		IF IS_CHAR_DEAD colombian6_km3
			REMOVE_BLIP radar_blip_colombian6_km3
			++ counter_number_of_colombians_killed_km3
			flag_colombian6_dead_km3 = 1
		ENDIF
 
	ENDIF
 
 
	IF flag_colombian_car1_dead_km3 = 0
 
		IF IS_CAR_DEAD colombian_car1_km3
			REMOVE_BLIP radar_blip_colombian_car1_km3
			++ counter_all_colombian_cars_dead_km3
			flag_colombian_car1_dead_km3 = 1
		ENDIF
 
	ENDIF
 
	IF flag_colombian_car2_dead_km3 = 0
 
		IF IS_CAR_DEAD colombian_car2_km3
			REMOVE_BLIP radar_blip_colombian_car2_km3
			++ counter_all_colombian_cars_dead_km3
			flag_colombian_car2_dead_km3 = 1
		ENDIF
 
	ENDIF
 
ENDWHILE
 
IF NOT IS_CHAR_DEAD yakuza1_km3
 
	IF LOCATE_PLAYER_ANY_MEANS_CHAR_2D player yakuza1_km3 20.0 20.0 FALSE
		SET_PLAYER_AS_LEADER yakuza1_km3 player
	ENDIF
 
ENDIF  
 
PRINT_NOW ( KM3_13 ) 5000 1 //"Take the briefcase back to the casino."
 
ADD_BLIP_FOR_COORD 452.3 -1465.8 17.6 radar_blip_coord3_km3
 
blob_flag = 1 
 
WHILE NOT LOCATE_STOPPED_PLAYER_ANY_MEANS_3D player 452.3 -1465.8 17.6 4.0 4.0 4.0 blob_flag
 
	WAIT 0
 
ENDWHILE
 
REMOVE_BLIP radar_blip_coord3_km3
 
SWITCH_WIDESCREEN ON
 
SET_PLAYER_CONTROL player OFF
 
SET_POLICE_IGNORE_PLAYER player ON
 
SET_EVERYONE_IGNORE_PLAYER player ON
 
GET_PLAYER_CHAR player script_controlled_player
 
IF IS_PLAYER_IN_ANY_CAR player
 
	STORE_CAR_PLAYER_IS_IN player car_cut_km3
	SET_CHAR_OBJ_LEAVE_CAR script_controlled_player car_cut_km3
 
	WHILE IS_PLAYER_IN_CAR player car_cut_km3
 
		WAIT 0
 
		IF IS_CAR_DEAD car_cut_km3
			PRINT_NOW ( WRECKED ) 5000 1 //"The vehicles wrecked!"
			GOTO mission_kenji3_failed
		ENDIF 
 
	ENDWHILE
 
ENDIF
 
SET_FIXED_CAMERA_POSITION 420.41 -1479.59 26.13 0.0 0.0 0.0
 
POINT_CAMERA_AT_POINT 420.87 -1478.75 26.38 JUMP_CUT
 
SET_PLAYER_COORDINATES player 425.85 -1477.16 -100.0
 
SET_CHAR_OBJ_GOTO_COORD_ON_FOOT script_controlled_player 428.57 -1465.01
 
WHILE NOT IS_CHAR_OBJECTIVE_PASSED script_controlled_player
 
	WAIT 0
 
ENDWHILE
 
SET_FADING_COLOUR 0 0 0
 
DO_FADE 1000 FADE_OUT
 
WHILE GET_FADING_STATUS
 
	WAIT 0
 
ENDWHILE
 
SET_PLAYER_COORDINATES player 426.81 -1486.40 17.64
 
SET_PLAYER_HEADING player 180.0
 
RESTORE_CAMERA_JUMPCUT
 
SET_CAMERA_IN_FRONT_OF_PLAYER 
 
SET_FADING_COLOUR 0 0 0
 
DO_FADE 1000 FADE_IN
 
WHILE GET_FADING_STATUS
 
	WAIT 0
 
ENDWHILE
 
SWITCH_WIDESCREEN OFF
 
SET_PLAYER_CONTROL player ON
 
SET_POLICE_IGNORE_PLAYER player OFF
 
SET_EVERYONE_IGNORE_PLAYER player OFF
 
 
}
 
GOTO mission_kenji3_passed
 
 
// Mission Kenji3 failed
 
mission_kenji3_failed:
 
PRINT_BIG ( M_FAIL ) 5000 1 //"Mission Failed!"
 
RETURN
 
 
 
// mission Kenji3 passed
 
mission_kenji3_passed:
 
flag_kenji_mission3_passed = 1
REGISTER_MISSION_PASSED ( KM3 )
PLAYER_MADE_PROGRESS 1
PRINT_WITH_NUMBER_BIG ( m_pass ) 25000 5000 1 //"Mission Passed!"
PLAY_MISSION_PASSED_TUNE 1
ADD_SCORE player 25000
CLEAR_WANTED_LEVEL player
START_NEW_SCRIPT kenji_mission4_loop
RETURN
 
 
 
// mission cleanup
 
mission_cleanup_kenji3:
 
flag_player_on_mission = 0
flag_player_on_kenji_mission = 0
 
IF NOT IS_CAR_DEAD colombian_car1_km3 
 
	IF flag_colombian_car1_dead_km3 = 0
		CHANGE_CAR_LOCK colombian_car1_km3 CARLOCK_UNLOCKED
		SET_CAR_ONLY_DAMAGED_BY_PLAYER colombian_car1_km3 FALSE
	ENDIF
 
ENDIF
 
IF NOT IS_CAR_DEAD colombian_car2_km3
 
	IF flag_colombian_car2_dead_km3 = 0
		CHANGE_CAR_LOCK colombian_car2_km3 CARLOCK_UNLOCKED
		SET_CAR_ONLY_DAMAGED_BY_PLAYER colombian_car2_km3 FALSE
	ENDIF
 
ENDIF
 
IF flag_money_created_km3 = 1
 
	IF money_been_picked_up_km3 = 0
		REMOVE_PICKUP money_km3
	ENDIF
 
ENDIF
 
MARK_MODEL_AS_NO_LONGER_NEEDED CAR_YARDIE
MARK_MODEL_AS_NO_LONGER_NEEDED CAR_COLUMB
MARK_MODEL_AS_NO_LONGER_NEEDED PED_GANG_YAKUZA_A
MARK_MODEL_AS_NO_LONGER_NEEDED PED_GANG_YARDIE_A
MARK_MODEL_AS_NO_LONGER_NEEDED PED_GANG_COLOMBIAN_A
REMOVE_BLIP radar_blip_ped1_km3
REMOVE_BLIP radar_blip_coord2_km3
REMOVE_BLIP radar_blip_colombian_car1_km3
REMOVE_BLIP radar_blip_colombian_car2_km3
REMOVE_BLIP radar_blip_colombian1_km3
REMOVE_BLIP radar_blip_colombian2_km3
REMOVE_BLIP radar_blip_colombian5_km3
REMOVE_BLIP radar_blip_colombian6_km3
REMOVE_BLIP radar_blip_money_km3
REMOVE_BLIP radar_blip_coord3_km3
MISSION_HAS_FINISHED
RETURN
 
 
attack_player:
 
// colombian1
 
IF flag_colombian1_dead_km3 = 0
 
	SET_CHAR_THREAT_SEARCH colombian1_km3 THREAT_PLAYER1
 
	SET_CHAR_THREAT_SEARCH colombian1_km3 THREAT_GANG_YAKUZA
 
	SET_CHAR_PERSONALITY colombian1_km3 PEDSTAT_TOUGH_GUY
 
	SET_CHAR_OBJ_KILL_PLAYER_ANY_MEANS colombian1_km3 player
 
ENDIF
 
// colombian2
 
IF flag_colombian2_dead_km3 = 0
 
	SET_CHAR_THREAT_SEARCH colombian2_km3 THREAT_PLAYER1
 
	SET_CHAR_THREAT_SEARCH colombian2_km3 THREAT_GANG_YAKUZA
 
	SET_CHAR_PERSONALITY colombian2_km3 PEDSTAT_TOUGH_GUY
 
	SET_CHAR_OBJ_KILL_PLAYER_ANY_MEANS colombian2_km3 player
 
ENDIF
 
 
// colombian5
 
IF flag_colombian5_dead_km3 = 0
 
	SET_CHAR_THREAT_SEARCH colombian5_km3 THREAT_PLAYER1
 
	SET_CHAR_THREAT_SEARCH colombian5_km3 THREAT_GANG_YAKUZA
 
	SET_CHAR_PERSONALITY colombian5_km3 PEDSTAT_TOUGH_GUY
 
	SET_CHAR_OBJ_KILL_PLAYER_ANY_MEANS colombian5_km3 player   
 
ENDIF
 
// colombian6
 
IF flag_colombian6_dead_km3 = 0
 
	SET_CHAR_THREAT_SEARCH colombian6_km3 THREAT_PLAYER1
 
	SET_CHAR_THREAT_SEARCH colombian6_km3 THREAT_GANG_YAKUZA
 
	SET_CHAR_PERSONALITY colombian6_km3 PEDSTAT_TOUGH_GUY
 
	SET_CHAR_OBJ_KILL_PLAYER_ANY_MEANS colombian6_km3 player	
 
ENDIF
 
RETURN

kenji4

MISSION_START
// *****************************************************************************************
// *****************************************************************************************
// *****************************************************************************************
// *****************************************Kenji mission 4********************************* 
// *********************************************"Shima"*************************************
// *****************************************************************************************
// *****************************************************************************************
// *****************************************************************************************
 
SCRIPT_NAME kenji4
 
// Mission start stuff
 
GOSUB mission_start_kenji4
 
	IF HAS_DEATHARREST_BEEN_EXECUTED
		GOSUB mission_kenji4_failed
	ENDIF
 
GOSUB mission_cleanup_kenji4
 
MISSION_END
 
// Variables for mission
 
VAR_INT briefcase1_km4
 
VAR_INT briefcase2_km4
 
VAR_INT briefcase3_km4
 
VAR_INT hispanic1_km4
 
VAR_INT hispanic2_km4
 
VAR_INT hispanic3_km4
 
VAR_INT hispanic4_km4
 
VAR_INT hispanic5_km4
 
VAR_INT hispanic6_km4
 
VAR_INT radar_blip_coord2_km4
 
VAR_INT radar_blip_coord3_km4
 
VAR_INT radar_blip_coord4_km4
 
VAR_INT radar_blip_coord5_km4
 
VAR_INT radar_blip_ped_km4
 
VAR_INT radar_blip_coord1_km4
 
VAR_INT counter_number_of_hispanics_dead
 
VAR_INT flag_hispanic1_km4_dead
 
VAR_INT flag_hispanic2_km4_dead
 
VAR_INT flag_hispanic3_km4_dead
 
VAR_INT flag_hispanic4_km4_dead
 
VAR_INT flag_hispanic5_km4_dead
 
VAR_INT flag_hispanic6_km4_dead
 
VAR_INT flag_briefcase3_pickedup_km4
 
VAR_INT flag_hispanic1_hate_player_km4
 
VAR_INT flag_hispanic2_hate_player_km4
 
VAR_INT flag_hispanic3_hate_player_km4
 
VAR_INT flag_hispanic4_hate_player_km4
 
VAR_INT flag_hispanic5_hate_player_km4
 
VAR_INT radar_blip_diablo1_km4
 
VAR_INT radar_blip_diablo2_km4
 
VAR_INT radar_blip_diablo3_km4
 
VAR_INT radar_blip_diablo4_km4
 
VAR_INT radar_blip_diablo5_km4
 
VAR_INT radar_blip_dummy1_km4
 
VAR_INT radar_blip_dummy2_km4
 
VAR_INT radar_blip_dummy3_km4
 
VAR_INT radar_blip_dummy4_km4
 
VAR_INT radar_blip_dummy5_km4
 
VAR_INT flag_player_had_message_km4
 
VAR_INT car_km4
 
VAR_INT flag_briefcase1_created_km4
 
VAR_INT flag_briefcase2_created_km4
 
VAR_INT flag_briefcase3_created_km4
 
VAR_INT flag_briefcase1_collected_km4
 
VAR_INT flag_briefcase2_collected_km4
 
VAR_INT flag_briefcase3_collected_km4
 
VAR_INT radar_blip_coord6_km4
 
VAR_INT car_cut_km4
 
// ****************************************Mission Start************************************
 
mission_start_kenji4:
 
flag_player_on_mission = 1
 
flag_player_on_kenji_mission = 1
 
REGISTER_MISSION_GIVEN
 
WAIT 0
 
counter_number_of_hispanics_dead = 0
 
flag_hispanic1_km4_dead = 0
 
flag_hispanic2_km4_dead = 0
 
flag_hispanic3_km4_dead = 0
 
flag_hispanic4_km4_dead = 0
 
flag_hispanic5_km4_dead = 0
 
flag_hispanic6_km4_dead = 0
 
flag_briefcase3_pickedup_km4 = 0
 
flag_hispanic1_hate_player_km4 = 0
 
flag_hispanic2_hate_player_km4 = 0
 
flag_hispanic3_hate_player_km4 = 0
 
flag_hispanic4_hate_player_km4 = 0
 
flag_hispanic5_hate_player_km4 = 0
 
switch_gang_diablo_off = 1
 
flag_player_had_message_km4 = 0
 
flag_briefcase1_created_km4 = 0
 
flag_briefcase2_created_km4 = 0
 
flag_briefcase3_created_km4 = 0
 
flag_briefcase1_collected_km4 = 0
 
flag_briefcase2_collected_km4 = 0
 
flag_briefcase3_collected_km4 = 0
 
SWAP_NEAREST_BUILDING_MODEL -88.371 -487.666 15.166 50.0 convstore01 convstre_dmge01
 
 
// ****************************************START OF CUTSCENE********************************
 
/*
IF CAN_PLAYER_START_MISSION player
	MAKE_PLAYER_SAFE_FOR_CUTSCENE player
ELSE
	GOTO mission_kenji4_failed
ENDIF
 
SET_FADING_COLOUR 0 0 0
 
DO_FADE 1500 FADE_OUT
 
PRINT_BIG ( KM4 ) 15000 2  //"SHIMA"
 
SWITCH_STREAMING OFF
*/
 
// Cutscene stuff
 
LOAD_SPECIAL_CHARACTER 1 KENJI
REQUEST_MODEL PED_GANG_YAKUZA_A 
LOAD_SPECIAL_MODEL cut_obj1 KENJIH 
LOAD_SPECIAL_MODEL cut_obj2 PLAYERH
REQUEST_MODEL casino_garden
 
LOAD_ALL_MODELS_NOW
 
WHILE NOT HAS_SPECIAL_CHARACTER_LOADED 1
OR NOT HAS_MODEL_LOADED PED_GANG_YAKUZA_A 
OR NOT HAS_MODEL_LOADED cut_obj1
OR NOT HAS_MODEL_LOADED cut_obj2
OR NOT HAS_MODEL_LOADED casino_garden
 
	WAIT 0
 
ENDWHILE
 
LOAD_CUTSCENE k4_shi
 
SET_CUTSCENE_OFFSET 476.380 -1382.168 67.347
 
CREATE_CUTSCENE_OBJECT PED_PLAYER cs_player
 
SET_CUTSCENE_ANIM cs_player player
 
CREATE_CUTSCENE_OBJECT PED_SPECIAL1 cs_kenji
 
SET_CUTSCENE_ANIM cs_kenji kenji
 
CREATE_CUTSCENE_OBJECT PED_GANG_YAKUZA_A cs_yakuza
 
SET_CUTSCENE_ANIM cs_yakuza gang07
 
CREATE_CUTSCENE_HEAD cs_kenji CUT_OBJ1 cs_kenjihead
 
SET_CUTSCENE_HEAD_ANIM cs_kenjihead kenji
 
CREATE_CUTSCENE_HEAD cs_player CUT_OBJ2 cs_playerhead
 
SET_CUTSCENE_HEAD_ANIM cs_playerhead player
 
CLEAR_AREA 459.1 -1413.0 25.11 1.0 TRUE 
 
SET_PLAYER_COORDINATES player 459.1 -1413.0 25.11
 
SET_PLAYER_HEADING player 132.0
 
DO_FADE 1500 FADE_IN
 
SWITCH_RUBBISH OFF
 
SWITCH_STREAMING ON
 
START_CUTSCENE
 
// Displays cutscene text
 
GET_CUTSCENE_TIME cs_time
 
WHILE cs_time < 3580
	WAIT 0
	GET_CUTSCENE_TIME cs_time
ENDWHILE
 
PRINT_NOW ( KM4_A ) 10000 1 //"To be truly strong, it is important that you never show weakness."
 
WHILE cs_time < 8316
	WAIT 0
	GET_CUTSCENE_TIME cs_time
ENDWHILE
 
PRINT_NOW ( KM4_B ) 10000 1 //"The business's that are fortunate enough to have our protection settle their accounts today."
 
WHILE cs_time < 13513
	WAIT 0
	GET_CUTSCENE_TIME cs_time
ENDWHILE
 
PRINT_NOW ( KM4_C ) 10000 1 //"Please go and collect the money immediately, so we can enter it into the casino accounts."
 
WHILE cs_time < 17808
	WAIT 0
	GET_CUTSCENE_TIME cs_time
ENDWHILE
 
CLEAR_THIS_PRINT ( KM4_C )
 
WHILE cs_time < 18333
	WAIT 0
	GET_CUTSCENE_TIME cs_time
ENDWHILE
 
DO_FADE 1500 FADE_OUT
 
WHILE NOT HAS_CUTSCENE_FINISHED
	WAIT 0
ENDWHILE
 
CLEAR_PRINTS
 
WHILE GET_FADING_STATUS
	WAIT 0
ENDWHILE
 
CLEAR_CUTSCENE
 
SWITCH_RUBBISH ON
 
SET_CAMERA_IN_FRONT_OF_PLAYER
 
WAIT 500
 
DO_FADE 1500 FADE_IN 
 
 
UNLOAD_SPECIAL_CHARACTER 1
MARK_MODEL_AS_NO_LONGER_NEEDED CUT_OBJ1
MARK_MODEL_AS_NO_LONGER_NEEDED CUT_OBJ2
MARK_MODEL_AS_NO_LONGER_NEEDED casino_garden
 
// *******************************************END OF CUTSCENE*******************************
 
REQUEST_MODEL PED_GANG_DIABLO_A
 
WHILE NOT HAS_MODEL_LOADED PED_GANG_DIABLO_A
 
	WAIT 0
 
ENDWHILE
 
CREATE_PICKUP briefcase pickup_once 236.8 -1580.0 25.7 briefcase1_km4
 
flag_briefcase1_created_km4 = 1
 
ADD_BLIP_FOR_PICKUP briefcase1_km4 radar_blip_coord2_km4 
 
// waits for the player to get the first briefcase
 
WHILE NOT HAS_PICKUP_BEEN_COLLECTED briefcase1_km4 
 
	WAIT 0
 
ENDWHILE
 
flag_briefcase1_collected_km4 = 1
 
PRINT_NOW ( KM4_8 ) 5000 1 //"Briefcase collected!"
 
REMOVE_BLIP radar_blip_coord2_km4
 
CREATE_PICKUP briefcase pickup_once 119.56 -1110.51 25.66 briefcase2_km4
 
flag_briefcase2_created_km4 = 1
 
ADD_BLIP_FOR_PICKUP briefcase2_km4 radar_blip_coord3_km4 
 
// creates Diablo 6 who is by the second briefcase
 
CREATE_CHAR PEDTYPE_CIVMALE PED_GANG_DIABLO_A 122.2 -1113.2 25.2 hispanic6_km4
 
GIVE_WEAPON_TO_CHAR hispanic6_km4 WEAPONTYPE_UZI 30000  // sets weapon to have infinate bullets
 
CLEAR_CHAR_THREAT_SEARCH hispanic6_km4
 
TURN_CHAR_TO_FACE_COORD hispanic6_km4 120.6 -1111.8 -100.0
 
// waiting for the player to get the second briefcase
 
SET_PED_DENSITY park DAY 0
SET_PED_DENSITY park NIGHT 0
 
WHILE NOT HAS_PICKUP_BEEN_COLLECTED briefcase2_km4
 
	WAIT 0
 
	IF flag_hispanic6_km4_dead = 0
 
		IF IS_CHAR_DEAD hispanic6_km4
			flag_hispanic6_km4_dead = 1
		ELSE
			IF LOCATE_PLAYER_ANY_MEANS_CHAR_2D player hispanic6_km4 10.0 10.0 FALSE
				SET_CHAR_THREAT_SEARCH hispanic6_km4 THREAT_PLAYER1 
				SET_CHAR_PERSONALITY hispanic6_km4 PEDSTAT_TOUGH_GUY
				SET_CHAR_OBJ_KILL_PLAYER_ANY_MEANS hispanic6_km4 player
			ENDIF
 
		ENDIF
 
	ENDIF 
 
ENDWHILE
 
flag_briefcase2_collected_km4 = 1
 
PRINT_NOW ( KM4_8 ) 5000 1 //"Briefcase collected!"
 
REMOVE_BLIP radar_blip_coord3_km4
 
ADD_BLIP_FOR_COORD -91.5 -484.2 15.2 radar_blip_coord5_km4
 
WHILE NOT LOCATE_STOPPED_PLAYER_ANY_MEANS_3D player -91.5 -484.2 15.2 4.0 4.0 3.0 TRUE
 
	WAIT 0
 
ENDWHILE
 
SWITCH_WIDESCREEN ON
 
REMOVE_BLIP radar_blip_coord5_km4
 
SET_PLAYER_CONTROL player OFF
 
CLEAR_AREA -91.0 -488.9 18.7 2.0 TRUE
 
SET_POLICE_IGNORE_PLAYER player ON
 
SET_EVERYONE_IGNORE_PLAYER player ON
 
SET_FIXED_CAMERA_POSITION -87.33 -502.99 21.33 0.0 0.0 0.0
 
POINT_CAMERA_AT_POINT -87.37 -502.06 20.97 JUMP_CUT
 
GET_PLAYER_CHAR player script_controlled_player
 
IF IS_PLAYER_IN_ANY_CAR player
 
	STORE_CAR_PLAYER_IS_IN player car_km4
 
	SET_CHAR_OBJ_LEAVE_CAR script_controlled_player car_km4
 
	WHILE IS_CHAR_IN_CAR script_controlled_player car_km4
 
		WAIT 0
 
		IF IS_CAR_DEAD car_km4
			PRINT_NOW ( WRECKED ) 5000 1 //"The vehicles dead!"
			GOTO mission_kenji4_failed
		ENDIF
 
 
	ENDWHILE
 
ENDIF
 
SET_CHAR_OBJ_GOTO_COORD_ON_FOOT script_controlled_player -92.07 -488.84
 
timerb = 0
 
	WHILE timerb < 1000
 
		WAIT 0
 
	ENDWHILE
 
// **************************************CUT SCENE WITH SHOP KEEPER*************************
 
GET_GAME_TIMER breakout_timer_start
 
breakout_diff = 0
 
WHILE NOT CAN_PLAYER_START_MISSION Player
AND breakout_diff < 5000	//	if player is not in control after 5 secs do the cutscene anyway
 
	WAIT 0
 
	GET_GAME_TIMER breakout_timer
 
	breakout_diff = breakout_timer - breakout_timer_start
 
ENDWHILE
 
MAKE_PLAYER_SAFE_FOR_CUTSCENE player
 
SET_FADING_COLOUR 0 0 0
 
DO_FADE 1500 FADE_OUT
 
SWITCH_STREAMING OFF
 
// Cutscene stuff
 
LOAD_SPECIAL_CHARACTER 2 KEEPER
LOAD_SPECIAL_MODEL cut_obj1 KEEPERH 
LOAD_SPECIAL_MODEL cut_obj2 PLAYERH
LOAD_SPECIAL_MODEL CUT_OBJ3 SHDOOR 
 
WHILE GET_FADING_STATUS
 
	WAIT 0
 
ENDWHILE
 
CHAR_SET_IDLE script_controlled_player
 
SET_PED_DENSITY_MULTIPLIER 0.0
 
CLEAR_AREA_OF_CHARS -117.66 -565.7 10.0 12.34 -396.77 20.0
 
LOAD_ALL_MODELS_NOW	
 
WHILE NOT HAS_SPECIAL_CHARACTER_LOADED 2
OR NOT HAS_MODEL_LOADED cut_obj3
OR NOT HAS_MODEL_LOADED cut_obj2
OR NOT HAS_MODEL_LOADED cut_obj1
 
	WAIT 0
 
ENDWHILE
 
SET_VISIBILITY_OF_CLOSEST_OBJECT_OF_TYPE -88.3 -487.6 15.1 6.0 convstore01_door FALSE	
 
LOAD_CUTSCENE k4_shi2
 
SET_CUTSCENE_OFFSET -88.1829 -491.4236 15.1439  //Proper one
 
//SET_CUTSCENE_OFFSET -90.1829 -491.4236 15.143  // Test one
 
CREATE_CUTSCENE_OBJECT PED_PLAYER cs_player
 
SET_CUTSCENE_ANIM cs_player player
 
CREATE_CUTSCENE_OBJECT PED_SPECIAL2 cs_keeper
 
SET_CUTSCENE_ANIM cs_keeper keeper
 
CREATE_CUTSCENE_OBJECT cut_obj3 cs_shopdoor
 
SET_CUTSCENE_ANIM cs_shopdoor shdoor
 
CREATE_CUTSCENE_HEAD cs_keeper CUT_OBJ1 cs_keeperhead
 
SET_CUTSCENE_HEAD_ANIM cs_keeperhead keeper
 
CREATE_CUTSCENE_HEAD cs_player CUT_OBJ2 cs_playerhead
 
SET_CUTSCENE_HEAD_ANIM cs_playerhead player
 
CLEAR_AREA -93.01 -489.43 15.16 1.0 TRUE
 
SET_PLAYER_COORDINATES player -93.01 -489.43 15.16
 
SET_PLAYER_HEADING player 101.0
 
DO_FADE 1500 FADE_IN
 
SWITCH_RUBBISH OFF
 
SWITCH_STREAMING ON
 
START_CUTSCENE
 
// Displays cutscene text
 
GET_CUTSCENE_TIME cs_time
 
WHILE cs_time < 2690
	WAIT 0
	GET_CUTSCENE_TIME cs_time
ENDWHILE
 
PRINT_NOW ( KM4_1 ) 10000 1 //"I can't pay you and I wouldn't pay you if I could!"
 
WHILE cs_time < 4898
	WAIT 0
	GET_CUTSCENE_TIME cs_time
ENDWHILE
 
PRINT_NOW ( KM4_9 ) 10000 1 //"Some young gang just jacked out the place, they took everything."
 
WHILE cs_time < 7467
	WAIT 0
	GET_CUTSCENE_TIME cs_time
ENDWHILE
 
PRINT_NOW ( KM4_2 ) 10000 1 //"You guys are useless."
 
WHILE cs_time < 8511
	WAIT 0
	GET_CUTSCENE_TIME cs_time
ENDWHILE					
 
PRINT_NOW ( KM4_10 ) 10000 1 //"What kind of Yakuza are you anyway?"
 
WHILE cs_time < 10710
	WAIT 0
	GET_CUTSCENE_TIME cs_time
ENDWHILE	
 
CLEAR_THIS_PRINT ( KM4_10 )
 
WHILE cs_time < 11000
	WAIT 0
	GET_CUTSCENE_TIME cs_time
ENDWHILE
 
DO_FADE 1500 FADE_OUT
 
WHILE NOT HAS_CUTSCENE_FINISHED
	WAIT 0
ENDWHILE
 
CLEAR_PRINTS
 
WHILE GET_FADING_STATUS
	WAIT 0
ENDWHILE
 
CLEAR_CUTSCENE
 
SWITCH_RUBBISH ON
 
SET_CAMERA_BEHIND_PLAYER
 
WAIT 500
 
DO_FADE 1500 FADE_IN 
 
SET_CAMERA_BEHIND_PLAYER
 
SET_VISIBILITY_OF_CLOSEST_OBJECT_OF_TYPE -88.3 -487.6 15.1 6.0 convstore01_door TRUE
 
UNLOAD_SPECIAL_CHARACTER 2
MARK_MODEL_AS_NO_LONGER_NEEDED CUT_OBJ1
MARK_MODEL_AS_NO_LONGER_NEEDED CUT_OBJ2
MARK_MODEL_AS_NO_LONGER_NEEDED CUT_OBJ3
 
SET_PED_DENSITY_MULTIPLIER 1.0
 
 
// **********************************END OF CUTSCENE WITH SHOPKEEPER************************
 
SWITCH_WIDESCREEN OFF
 
SET_POLICE_IGNORE_PLAYER player OFF
 
SET_PLAYER_CONTROL player ON
 
SET_PED_DENSITY park DAY 1
SET_PED_DENSITY park NIGHT 1
 
SET_EVERYONE_IGNORE_PLAYER player OFF
 
ADD_BLIP_FOR_COORD_OLD 938.0 -180.0 -100.0 5 BOTH radar_blip_coord1_km4
 
CHANGE_BLIP_SCALE radar_blip_coord1_km4 3
 
ADD_BLIP_FOR_COORD_OLD 930.0 -190.0 -100.0 1 BOTH radar_blip_dummy1_km4
 
CHANGE_BLIP_SCALE radar_blip_dummy1_km4 3 
 
ADD_BLIP_FOR_COORD_OLD 931.0 -184.0 -100.0 1 BOTH radar_blip_dummy2_km4
 
CHANGE_BLIP_SCALE radar_blip_dummy2_km4 3
 
ADD_BLIP_FOR_COORD_OLD 943.0 -182.0 -100.0 1 BOTH radar_blip_dummy3_km4
 
CHANGE_BLIP_SCALE radar_blip_dummy3_km4 3
 
ADD_BLIP_FOR_COORD_OLD 943.0 -190.0 -100.0 1 BOTH radar_blip_dummy4_km4
 
CHANGE_BLIP_SCALE radar_blip_dummy4_km4 3
 
ADD_BLIP_FOR_COORD_OLD 939.0 -183.0 -100.0 1 BOTH radar_blip_dummy5_km4
 
CHANGE_BLIP_SCALE radar_blip_dummy5_km4 3
 
PRINT_NOW ( KM4_4 ) 7000 1 //"Punish the gang responsible and retrieve the protection money!"
 
// creates the final briefcase and the hispanics
 
WHILE NOT IS_COLLISION_IN_MEMORY LEVEL_INDUSTRIAL
 
	WAIT 0
 
ENDWHILE
 
CREATE_PICKUP briefcase pickup_once 938.0 -180.0 4.5 briefcase3_km4
 
flag_briefcase3_created_km4 = 1
 
ADD_BLIP_FOR_PICKUP briefcase3_km4 radar_blip_coord4_km4 
 
REMOVE_BLIP radar_blip_coord1_km4
 
// hispanic 1
 
CREATE_CHAR PEDTYPE_GANG_DIABLO PED_GANG_DIABLO_A 930.0 -190.0 -100.0 hispanic1_km4
 
ADD_BLIP_FOR_CHAR hispanic1_km4 radar_blip_diablo1_km4
 
REMOVE_BLIP radar_blip_dummy1_km4 
 
GIVE_WEAPON_TO_CHAR hispanic1_km4 WEAPONTYPE_UZI 30000  // sets weapon to have infinate bullets
 
CLEAR_CHAR_THREAT_SEARCH hispanic1_km4
 
SET_CHAR_PERSONALITY hispanic1_km4 PEDSTAT_TOUGH_GUY
 
// hispanic 2
 
CREATE_CHAR PEDTYPE_GANG_DIABLO PED_GANG_DIABLO_A 931.0 -184.0 -100.0 hispanic2_km4
 
ADD_BLIP_FOR_CHAR hispanic2_km4 radar_blip_diablo2_km4
 
REMOVE_BLIP radar_blip_dummy2_km4
 
GIVE_WEAPON_TO_CHAR hispanic2_km4 WEAPONTYPE_UZI 30000 // sets weapon to have infinate bullets
 
CLEAR_CHAR_THREAT_SEARCH hispanic2_km4
 
SET_CHAR_PERSONALITY hispanic2_km4 PEDSTAT_TOUGH_GUY
 
// hispanic 3
 
CREATE_CHAR PEDTYPE_GANG_DIABLO PED_GANG_DIABLO_A 943.0 -182.0 -100.0 hispanic3_km4
 
ADD_BLIP_FOR_CHAR hispanic3_km4 radar_blip_diablo3_km4
 
REMOVE_BLIP radar_blip_dummy3_km4
 
GIVE_WEAPON_TO_CHAR hispanic3_km4 WEAPONTYPE_UZI 30000 // sets weapon to have infinate bullets
 
CLEAR_CHAR_THREAT_SEARCH hispanic3_km4
 
SET_CHAR_PERSONALITY hispanic3_km4 PEDSTAT_TOUGH_GUY
 
// hispanic 4
 
CREATE_CHAR PEDTYPE_GANG_DIABLO PED_GANG_DIABLO_A 943.0 -190.0 -100.0 hispanic4_km4
 
ADD_BLIP_FOR_CHAR hispanic4_km4 radar_blip_diablo4_km4
 
REMOVE_BLIP radar_blip_dummy4_km4
 
GIVE_WEAPON_TO_CHAR hispanic4_km4 WEAPONTYPE_UZI 30000 // sets weapon to have infinate bullets
 
CLEAR_CHAR_THREAT_SEARCH hispanic4_km4
 
SET_CHAR_PERSONALITY hispanic4_km4 PEDSTAT_TOUGH_GUY
 
// hispanic 5
 
CREATE_CHAR PEDTYPE_GANG_DIABLO PED_GANG_DIABLO_A 939.0 -183.0 -100.0 hispanic5_km4
 
ADD_BLIP_FOR_CHAR hispanic5_km4 radar_blip_diablo5_km4
 
REMOVE_BLIP radar_blip_dummy5_km4
 
GIVE_WEAPON_TO_CHAR hispanic5_km4 WEAPONTYPE_UZI 30000 // sets weapon to have infinate bullets
 
CLEAR_CHAR_THREAT_SEARCH hispanic5_km4
 
SET_CHAR_PERSONALITY hispanic5_km4 PEDSTAT_TOUGH_GUY
 
 
WHILE flag_briefcase3_pickedup_km4 = 0
OR counter_number_of_hispanics_dead < 5
 
	WAIT 0
 
	IF flag_hispanic1_km4_dead = 0
 
		IF IS_CHAR_DEAD hispanic1_km4
			REMOVE_BLIP radar_blip_diablo1_km4
			++ counter_number_of_hispanics_dead
			flag_hispanic1_km4_dead = 1
		ENDIF
 
	ENDIF
 
	IF flag_hispanic2_km4_dead = 0
 
		IF IS_CHAR_DEAD hispanic2_km4
			REMOVE_BLIP radar_blip_diablo2_km4
			++ counter_number_of_hispanics_dead
			flag_hispanic2_km4_dead = 1
		ENDIF
 
	ENDIF
 
	IF flag_hispanic3_km4_dead = 0
 
		IF IS_CHAR_DEAD hispanic3_km4
			REMOVE_BLIP radar_blip_diablo3_km4
			++ counter_number_of_hispanics_dead
			flag_hispanic3_km4_dead = 1
		ENDIF
 
	ENDIF
 
	IF flag_hispanic4_km4_dead = 0
 
		IF IS_CHAR_DEAD hispanic4_km4
			REMOVE_BLIP radar_blip_diablo4_km4
			++ counter_number_of_hispanics_dead
			flag_hispanic4_km4_dead = 1
		ENDIF
 
	ENDIF
 
	IF flag_hispanic5_km4_dead = 0
 
		IF IS_CHAR_DEAD hispanic5_km4
			REMOVE_BLIP radar_blip_diablo5_km4
			++ counter_number_of_hispanics_dead
			flag_hispanic5_km4_dead = 1
		ENDIF
 
	ENDIF
 
	IF flag_briefcase3_pickedup_km4 = 0 
 
		IF HAS_PICKUP_BEEN_COLLECTED briefcase3_km4
			REMOVE_BLIP radar_blip_coord4_km4
			PRINT_NOW ( KM4_8 ) 5000 1 //"Briefcase collected!"
			flag_briefcase3_collected_km4 = 1
			flag_briefcase3_pickedup_km4 = 1
		ENDIF
 
	ENDIF
 
	IF LOCATE_PLAYER_ANY_MEANS_3D player 940.0 -185.0 4.2 25.0 25.0 10.0 FALSE
 
		IF flag_hispanic1_km4_dead = 0
		AND flag_hispanic1_hate_player_km4 = 0
			SET_CHAR_THREAT_SEARCH hispanic1_km4 THREAT_PLAYER1
			TURN_CHAR_TO_FACE_PLAYER hispanic1_km4 player
			SET_CHAR_OBJ_KILL_PLAYER_ANY_MEANS hispanic1_km4 player 
			flag_hispanic1_hate_player_km4 = 1 
		ENDIF
 
		IF flag_hispanic2_km4_dead = 0
		AND flag_hispanic2_hate_player_km4 = 0
			SET_CHAR_THREAT_SEARCH hispanic2_km4 THREAT_PLAYER1
			TURN_CHAR_TO_FACE_PLAYER hispanic2_km4 player
			SET_CHAR_OBJ_KILL_PLAYER_ANY_MEANS hispanic2_km4 player 
			flag_hispanic2_hate_player_km4 = 1
		ENDIF
 
		IF flag_hispanic3_km4_dead = 0
		AND flag_hispanic3_hate_player_km4 = 0
			SET_CHAR_THREAT_SEARCH hispanic3_km4 THREAT_PLAYER1
			TURN_CHAR_TO_FACE_PLAYER hispanic3_km4 player
			SET_CHAR_OBJ_KILL_PLAYER_ANY_MEANS hispanic3_km4 player
			flag_hispanic3_hate_player_km4 = 1 
		ENDIF
 
		IF flag_hispanic4_km4_dead = 0
		AND flag_hispanic4_hate_player_km4 = 0
			SET_CHAR_THREAT_SEARCH hispanic4_km4 THREAT_PLAYER1
			TURN_CHAR_TO_FACE_PLAYER hispanic4_km4 player
			SET_CHAR_OBJ_KILL_PLAYER_ANY_MEANS hispanic4_km4 player
			flag_hispanic4_hate_player_km4 = 1 
		ENDIF
 
		IF flag_hispanic5_km4_dead = 0
		AND flag_hispanic5_hate_player_km4 = 0
			SET_CHAR_THREAT_SEARCH hispanic5_km4 THREAT_PLAYER1
			TURN_CHAR_TO_FACE_PLAYER hispanic5_km4 player
			SET_CHAR_OBJ_KILL_PLAYER_ANY_MEANS hispanic5_km4 player
			flag_hispanic5_hate_player_km4 = 1 
		ENDIF
 
	ENDIF
 
ENDWHILE
 
PRINT_NOW ( KM4_11 ) 5000 1 //"Take the money back to the casino!"
 
ADD_BLIP_FOR_COORD 452.3 -1465.8 17.6 radar_blip_coord6_km4
 
blob_flag = 1 
 
WHILE NOT LOCATE_STOPPED_PLAYER_ANY_MEANS_3D player 452.3 -1465.8 17.6 4.0 4.0 4.0 blob_flag
 
	WAIT 0
 
ENDWHILE
 
REMOVE_BLIP radar_blip_coord6_km4
 
SWITCH_WIDESCREEN ON
 
SET_PLAYER_CONTROL player OFF
 
SET_POLICE_IGNORE_PLAYER player ON
 
SET_EVERYONE_IGNORE_PLAYER player ON
 
GET_PLAYER_CHAR player script_controlled_player
 
IF IS_PLAYER_IN_ANY_CAR player
 
	STORE_CAR_PLAYER_IS_IN player car_cut_km4
	SET_CHAR_OBJ_LEAVE_CAR script_controlled_player car_cut_km4
 
	WHILE IS_PLAYER_IN_CAR player car_cut_km4
 
		WAIT 0
 
		IF IS_CAR_DEAD car_cut_km4
			PRINT_NOW ( WRECKED ) 5000 1 //"The vehicles wrecked!"
			GOTO mission_kenji4_failed
		ENDIF 
 
	ENDWHILE
 
ENDIF
 
SET_FIXED_CAMERA_POSITION 420.41 -1479.59 26.13 0.0 0.0 0.0
 
POINT_CAMERA_AT_POINT 420.87 -1478.75 26.38 JUMP_CUT
 
SET_PLAYER_COORDINATES player 425.85 -1477.16 -100.0
 
SET_CHAR_OBJ_GOTO_COORD_ON_FOOT script_controlled_player 428.57 -1465.01
 
WHILE NOT IS_CHAR_OBJECTIVE_PASSED script_controlled_player
 
	WAIT 0
 
ENDWHILE
 
SET_FADING_COLOUR 0 0 0
 
DO_FADE 1000 FADE_OUT
 
WHILE GET_FADING_STATUS
 
	WAIT 0
 
ENDWHILE
 
SET_PLAYER_COORDINATES player 426.81 -1486.40 17.64
 
SET_PLAYER_HEADING player 180.0
 
RESTORE_CAMERA_JUMPCUT
 
SET_CAMERA_IN_FRONT_OF_PLAYER 
 
SET_FADING_COLOUR 0 0 0
 
DO_FADE 1000 FADE_IN
 
WHILE GET_FADING_STATUS
 
	WAIT 0
 
ENDWHILE
 
SWITCH_WIDESCREEN OFF
 
SET_PLAYER_CONTROL player ON
 
SET_POLICE_IGNORE_PLAYER player OFF
 
SET_EVERYONE_IGNORE_PLAYER player OFF
 
}
 
GOTO mission_kenji4_passed
 
 
 
// Mission Kenji3 failed
 
mission_kenji4_failed:
 
PRINT_BIG ( M_FAIL ) 5000 1 //"Mission Failed!"
 
RETURN
 
 
 
// mission Kenji3 passed
 
mission_kenji4_passed:
 
flag_kenji_mission4_passed = 1
REGISTER_MISSION_PASSED ( KM4 )
PLAYER_MADE_PROGRESS 1
PRINT_WITH_NUMBER_BIG ( m_pass ) 10000 5000 1  //"Mission Passed!"
PLAY_MISSION_PASSED_TUNE 1
ADD_SCORE player 10000
CLEAR_WANTED_LEVEL player
START_NEW_SCRIPT kenji_mission5_loop
RETURN
 
 
 
// mission cleanup
 
mission_cleanup_kenji4:
 
flag_player_on_mission = 0
flag_player_on_kenji_mission = 0
switch_gang_diablo_off = 0
 
IF flag_briefcase1_created_km4 = 1
 
	IF flag_briefcase1_collected_km4 = 0
		REMOVE_PICKUP briefcase1_km4
	ENDIF
 
ENDIF
 
IF flag_briefcase2_created_km4 = 1
 
	IF flag_briefcase2_collected_km4 = 0
		REMOVE_PICKUP briefcase2_km4
	ENDIF
 
ENDIF
 
IF flag_briefcase3_created_km4 = 1
 
	IF flag_briefcase3_collected_km4 = 0
		REMOVE_PICKUP briefcase3_km4
	ENDIF
 
ENDIF
 
REMOVE_BLIP radar_blip_diablo1_km4
REMOVE_BLIP radar_blip_diablo2_km4
REMOVE_BLIP radar_blip_diablo3_km4
REMOVE_BLIP radar_blip_diablo4_km4
REMOVE_BLIP radar_blip_diablo5_km4
MARK_MODEL_AS_NO_LONGER_NEEDED PED_GANG_DIABLO_A
MARK_MODEL_AS_NO_LONGER_NEEDED PED_GANG_YAKUZA_A
REMOVE_BLIP radar_blip_coord2_km4
REMOVE_BLIP radar_blip_coord3_km4
REMOVE_BLIP radar_blip_coord4_km4
REMOVE_BLIP radar_blip_coord5_km4
REMOVE_BLIP radar_blip_coord1_km4
REMOVE_BLIP radar_blip_coord6_km4
REMOVE_BLIP radar_blip_dummy1_km4
REMOVE_BLIP radar_blip_dummy2_km4
REMOVE_BLIP radar_blip_dummy3_km4
REMOVE_BLIP radar_blip_dummy4_km4
REMOVE_BLIP radar_blip_dummy5_km4
SET_PED_DENSITY park DAY 1
SET_PED_DENSITY park NIGHT 1
MISSION_HAS_FINISHED
RETURN

kenji5

MISSION_START
// *****************************************************************************************
// *******************************   Kenji Mission 5   ************************************* 
// *******************************     Smack Down      *************************************
// *****************************************************************************************
// *** Kenji wants you to hit the Yardies pushing Spank for the Cartel. They're dotted   ***
// *** about Liberty dealing in gangs or from vehicles. The player must race round the 	 ***
// *** city splattering and killing all the dealers within a time limit. Occasionally 	 ***
// *** they may have a 'backup vehicle' that will give chase to make the mission harder. ***
// *****************************************************************************************
 
// Mission start stuff
 
GOSUB mission_start_kenji5
 
IF HAS_DEATHARREST_BEEN_EXECUTED 
	GOSUB mission_kenji5_failed
ENDIF
 
GOSUB mission_cleanup_kenji5
 
MISSION_END
 
// Variables For Mission
 
VAR_INT number_of_peds ped_2_exists ped_2_blip ped_2 delete_oldest_ped_time	on_screen_counter_flag
VAR_INT ped_3_exists ped_3_blip ped_3 ped_4_exists ped_4_blip ped_4 dead_peds minimum_kills	reward_kills
VAR_INT ped_1_time ped_2_time ped_3_time ped_4_time oldest_ped_time oldest_ped random_direction
VAR_INT ped_1_blip ped_1_exists ped_1
VAR_INT ped_5_blip ped_5_exists ped_5 ped_5_time
VAR_INT ped_6_blip ped_6_exists ped_6 ped_6_time
VAR_INT ped_7_blip ped_7_exists ped_7 ped_7_time			 cs_yakuza2
VAR_INT ped_8_blip ped_8_exists ped_8 ped_8_time
VAR_INT ped_9_blip ped_9_exists ped_9 ped_9_time
VAR_INT ped_10_blip ped_10_exists ped_10 ped_10_time
VAR_INT ped_11_blip ped_11_exists ped_11 ped_11_time
VAR_INT ped_12_blip ped_12_exists ped_12 ped_12_time
VAR_INT ped_13_blip ped_13_exists ped_13 ped_13_time
VAR_INT ped_14_blip ped_14_exists ped_14 ped_14_time
VAR_INT ped_15_blip ped_15_exists ped_15 ped_15_time
 
VAR_FLOAT ped_15_x ped_15_y ped_15_z 
VAR_FLOAT ped_14_x ped_14_y ped_14_z 
VAR_FLOAT ped_13_x ped_13_y ped_13_z 
VAR_FLOAT ped_12_x ped_12_y ped_12_z 
VAR_FLOAT ped_11_x ped_11_y ped_11_z 
VAR_FLOAT ped_10_x ped_10_y ped_10_z 
VAR_FLOAT ped_9_x ped_9_y ped_9_z 
VAR_FLOAT ped_8_x ped_8_y ped_8_z 
VAR_FLOAT ped_7_x ped_7_y ped_7_z 
VAR_FLOAT ped_6_x ped_6_y ped_6_z 
VAR_FLOAT ped_5_x ped_5_y ped_5_z 
VAR_FLOAT ped_1_x ped_1_y ped_1_z 
VAR_FLOAT ped_2_x ped_2_y ped_2_z ped_3_x ped_3_y ped_3_z 
VAR_FLOAT ped_4_x ped_4_y ped_4_z random_commercial_x random_commercial_y garbage_x	garbage_y garbage_z
VAR_FLOAT difference_x difference_y sum_diff distance
 
// ****************************************Mission Start************************************
 
mission_start_kenji5:
 
flag_player_on_mission = 1
flag_player_on_kenji_mission = 1
 
REGISTER_MISSION_GIVEN
 
WAIT 0
 
SCRIPT_NAME kenji5
 
number_of_peds 			= 0
ped_2_exists 			= 0
delete_oldest_ped_time	= 0
on_screen_counter_flag  = 0
ped_3_exists  			= 0
ped_4_exists 			= 0
dead_peds  				= 0
minimum_kills  			= 0
ped_1_time  			= 0
ped_2_time  			= 0
ped_3_time 	 			= 0
ped_4_time  			= 0
oldest_ped_time  		= 0
oldest_ped  			= 0
random_direction 		= 0
ped_1_exists 			= 0
ped_5_exists  			= 0
ped_5_time 				= 0
ped_6_exists  			= 0
ped_6_time 				= 0
ped_7_exists  			= 0
ped_7_time 				= 0
ped_8_exists  			= 0
ped_8_time  			= 0
ped_9_exists  			= 0
ped_9_time				= 0
ped_10_exists  			= 0
ped_10_time	 			= 0
ped_11_exists  			= 0
ped_11_time	 			= 0
ped_12_exists  			= 0
ped_12_time				= 0
ped_13_exists  			= 0
ped_13_time	 			= 0
ped_14_exists  			= 0
ped_14_time	 			= 0
ped_15_exists  			= 0
ped_15_time	 			= 0
 
minimum_kills = 8
 
// ****************************************START OF CUTSCENE********************************
 
/*
SET_FADING_COLOUR 0 0 0
 
DO_FADE 1500 FADE_OUT
 
IF CAN_PLAYER_START_MISSION player
	MAKE_PLAYER_SAFE_FOR_CUTSCENE player
ELSE
	GOTO mission_kenji5_failed
ENDIF
 
SWITCH_STREAMING OFF
 
PRINT_BIG KM5 15000 2 // "SMACK DOWN"
*/
 
LOAD_SPECIAL_CHARACTER 1 KENJI
REQUEST_MODEL PED_GANG_YAKUZA_A
REQUEST_MODEL PED_GANG_YAKUZA_B
REQUEST_MODEL PED_GANG_YARDIE_A
LOAD_SPECIAL_MODEL cut_obj1 KENJIH
REQUEST_MODEL casino_garden 
 
/*
WHILE GET_FADING_STATUS
	WAIT 0
ENDWHILE
*/
 
LOAD_ALL_MODELS_NOW
 
WHILE NOT HAS_SPECIAL_CHARACTER_LOADED 1
OR NOT HAS_MODEL_LOADED PED_GANG_YAKUZA_A 
OR NOT HAS_MODEL_LOADED PED_GANG_YAKUZA_B
OR NOT HAS_MODEL_LOADED cut_obj1
OR NOT HAS_MODEL_LOADED casino_garden
	WAIT 0
ENDWHILE
 
LOAD_CUTSCENE K5_SD
 
SET_CUTSCENE_OFFSET 476.380 -1382.168 67.347
 
CREATE_CUTSCENE_OBJECT PED_PLAYER cs_player
SET_CUTSCENE_ANIM cs_player player
 
CREATE_CUTSCENE_OBJECT PED_SPECIAL1 cs_kenji
SET_CUTSCENE_ANIM cs_kenji kenji
 
CREATE_CUTSCENE_OBJECT PED_GANG_YAKUZA_A cs_yakuza
SET_CUTSCENE_ANIM cs_yakuza gang07
 
CREATE_CUTSCENE_OBJECT PED_GANG_YAKUZA_B cs_yakuza2
SET_CUTSCENE_ANIM cs_yakuza2 gang08
 
CREATE_CUTSCENE_HEAD cs_kenji cut_obj1 cs_kenjihead
SET_CUTSCENE_HEAD_ANIM cs_kenjihead kenji
 
//CREATE_CUTSCENE_HEAD cs_player cut_obj2 cs_playerhead
//SET_CUTSCENE_HEAD_ANIM cs_playerhead player
 
CLEAR_AREA 459.1 -1413.0 25.11 1.0 TRUE 
SET_PLAYER_COORDINATES player 459.1 -1413.0 25.11							   
SET_PLAYER_HEADING player 132.0
 
DO_FADE 1500 FADE_IN
 
SWITCH_RUBBISH OFF
 
START_CUTSCENE
 
// Displays cutscene text
 
GET_CUTSCENE_TIME cs_time
 
WHILE cs_time < 6121
	WAIT 0
	GET_CUTSCENE_TIME cs_time
ENDWHILE
 
PRINT_NOW KM5_A 7000 1 //"YOU! How fitting you should choose this moment to show your worthless face!"
 
WHILE cs_time < 11088
	WAIT 0
	GET_CUTSCENE_TIME cs_time
ENDWHILE
 
PRINT_NOW KM5_B 7000 1 //"It would appear your attempts to dissuade the Jamaicans"
 
WHILE cs_time < 13770
	WAIT 0
	GET_CUTSCENE_TIME cs_time
ENDWHILE
 
PRINT_NOW KM5_B1 7000 1 //"from becoming bed fellows with the Cartel were wholly inadequate!"
 
WHILE cs_time < 17324
	WAIT 0
	GET_CUTSCENE_TIME cs_time
ENDWHILE
 
PRINT_NOW KM5_C 7000 1 //"Yardie pushers line Liberty's streets selling packets of SPANK like they were selling hotdogs!"
 
WHILE cs_time < 22060
	WAIT 0
	GET_CUTSCENE_TIME cs_time
ENDWHILE
 
PRINT_NOW KM5_D 7000 1 //"Those Cartel pigs are laughing at us, at me!" 
 
WHILE cs_time < 24716
	WAIT 0
	GET_CUTSCENE_TIME cs_time
ENDWHILE
 
PRINT_NOW KM5_E 7000 1 //"I will give you one last chance to prove my sister's faith in you to be well founded!"
 
WHILE cs_time < 29220
	WAIT 0
	GET_CUTSCENE_TIME cs_time
ENDWHILE
 
PRINT_NOW KM5_F 7000 1 //"Run these scumbags into the ground and wash your shame in rivers of our enemies' blood!!!"
 
WHILE cs_time < 33666
	WAIT 0
	GET_CUTSCENE_TIME cs_time
ENDWHILE
 
DO_FADE 1500 FADE_OUT
 
WHILE NOT HAS_CUTSCENE_FINISHED
	WAIT 0
ENDWHILE
 
CLEAR_PRINTS
 
WHILE GET_FADING_STATUS
	WAIT 0
ENDWHILE
 
CLEAR_CUTSCENE
 
SWITCH_STREAMING ON
 
SWITCH_RUBBISH ON
 
DO_FADE 1500 FADE_IN 
 
SET_CAMERA_IN_FRONT_OF_PLAYER
 
//SET_VISIBILITY_OF_CLOSEST_OBJECT_OF_TYPE 890.9 -416.9 15.0 6.0 backdoor TRUE
 
UNLOAD_SPECIAL_CHARACTER 1
MARK_MODEL_AS_NO_LONGER_NEEDED PED_GANG_YAKUZA_A
MARK_MODEL_AS_NO_LONGER_NEEDED PED_GANG_YAKUZA_B
MARK_MODEL_AS_NO_LONGER_NEEDED cut_obj1
MARK_MODEL_AS_NO_LONGER_NEEDED casino_garden 
 
// *******************************************END OF CUTSCENE*******************************
 
 
WHILE NOT HAS_MODEL_LOADED PED_GANG_YARDIE_A
	WAIT 0
ENDWHILE
 
GOTO main_part_of_script
 
create_random_ped://///////////////////////////////////////////////////////////////////////////
 
IF delete_oldest_ped_time > 10000
	delete_oldest_ped_time = delete_oldest_ped_time - 5000
ENDIF
 
IF ped_1_exists = 0	
	generate_coord_ped_1:
	GENERATE_RANDOM_FLOAT_IN_RANGE -173.0 460.0 random_commercial_x
	GENERATE_RANDOM_FLOAT_IN_RANGE -1627.0 100.0 random_commercial_y
	GET_PLAYER_COORDINATES player garbage_x	garbage_y garbage_z
	GET_CLOSEST_CHAR_NODE random_commercial_x random_commercial_y garbage_z ped_1_x ped_1_y ped_1_z
	difference_x = garbage_x - ped_1_x
	difference_y = garbage_y - ped_1_y
	difference_x = difference_x * difference_x
	difference_y = difference_y * difference_y
	sum_diff = difference_x + difference_y
	SQRT sum_diff distance
	IF distance < 110.0
		GOTO generate_coord_ped_1
	ENDIF
	ADD_BLIP_FOR_COORD_OLD ped_1_x ped_1_y ped_1_z GREEN BLIP_ONLY ped_1_blip
	CHANGE_BLIP_SCALE ped_1_blip 3
	ped_1_exists = 1
	GET_GAME_TIMER ped_1_time
	++ number_of_peds
	RETURN
ENDIF
 
IF ped_2_exists = 0	
	generate_coord_ped_2:
	GENERATE_RANDOM_FLOAT_IN_RANGE -173.0 460.0 random_commercial_x
	GENERATE_RANDOM_FLOAT_IN_RANGE -1627.0 100.0 random_commercial_y
	GET_PLAYER_COORDINATES player garbage_x	garbage_y garbage_z
	GET_CLOSEST_CHAR_NODE random_commercial_x random_commercial_y garbage_z ped_2_x ped_2_y ped_2_z
	difference_x = garbage_x - ped_2_x
	difference_y = garbage_y - ped_2_y
	difference_x = difference_x * difference_x
	difference_y = difference_y * difference_y
	sum_diff = difference_x + difference_y
	SQRT sum_diff distance
	IF distance < 110.0
		GOTO generate_coord_ped_2
	ENDIF
	ADD_BLIP_FOR_COORD_OLD ped_2_x ped_2_y ped_2_z GREEN BLIP_ONLY ped_2_blip
	CHANGE_BLIP_SCALE ped_2_blip 3
	ped_2_exists = 1
	GET_GAME_TIMER ped_2_time
	++ number_of_peds
	RETURN
ENDIF
 
IF ped_3_exists = 0	
	generate_coord_ped_3:
	GENERATE_RANDOM_FLOAT_IN_RANGE -173.0 460.0 random_commercial_x
	GENERATE_RANDOM_FLOAT_IN_RANGE -1627.0 100.0 random_commercial_y
	GET_PLAYER_COORDINATES player garbage_x	garbage_y garbage_z
	GET_CLOSEST_CHAR_NODE random_commercial_x random_commercial_y garbage_z ped_3_x ped_3_y ped_3_z
	difference_x = garbage_x - ped_3_x
	difference_y = garbage_y - ped_3_y
	difference_x = difference_x * difference_x
	difference_y = difference_y * difference_y
	sum_diff = difference_x + difference_y
	SQRT sum_diff distance
	IF distance < 110.0
		GOTO generate_coord_ped_3
	ENDIF
	ADD_BLIP_FOR_COORD_OLD ped_3_x ped_3_y ped_3_z GREEN BLIP_ONLY ped_3_blip
	CHANGE_BLIP_SCALE ped_3_blip 3
	ped_3_exists = 1
	GET_GAME_TIMER ped_3_time
	++ number_of_peds
	RETURN
ENDIF
 
IF ped_4_exists = 0	
	generate_coord_ped_4:
	GENERATE_RANDOM_FLOAT_IN_RANGE -173.0 460.0 random_commercial_x
	GENERATE_RANDOM_FLOAT_IN_RANGE -1627.0 100.0 random_commercial_y
	GET_PLAYER_COORDINATES player garbage_x	garbage_y garbage_z
	GET_CLOSEST_CHAR_NODE random_commercial_x random_commercial_y garbage_z ped_4_x ped_4_y ped_4_z
	difference_x = garbage_x - ped_4_x
	difference_y = garbage_y - ped_4_y
	difference_x = difference_x * difference_x
	difference_y = difference_y * difference_y
	sum_diff = difference_x + difference_y
	SQRT sum_diff distance
	IF distance < 110.0
		GOTO generate_coord_ped_4
	ENDIF
	ADD_BLIP_FOR_COORD_OLD ped_4_x ped_4_y ped_4_z GREEN BLIP_ONLY ped_4_blip
	CHANGE_BLIP_SCALE ped_4_blip 3
	ped_4_exists = 1
	GET_GAME_TIMER ped_4_time
	++ number_of_peds
	RETURN
ENDIF
 
IF ped_5_exists = 0	
	generate_coord_ped_5:
	GENERATE_RANDOM_FLOAT_IN_RANGE -173.0 460.0 random_commercial_x
	GENERATE_RANDOM_FLOAT_IN_RANGE -1627.0 100.0 random_commercial_y
	GET_PLAYER_COORDINATES player garbage_x	garbage_y garbage_z
	GET_CLOSEST_CHAR_NODE random_commercial_x random_commercial_y garbage_z ped_5_x ped_5_y ped_5_z
	difference_x = garbage_x - ped_5_x
	difference_y = garbage_y - ped_5_y
	difference_x = difference_x * difference_x
	difference_y = difference_y * difference_y
	sum_diff = difference_x + difference_y
	SQRT sum_diff distance
	IF distance < 110.0
		GOTO generate_coord_ped_5
	ENDIF
	ADD_BLIP_FOR_COORD_OLD ped_5_x ped_5_y ped_5_z GREEN BLIP_ONLY ped_5_blip
	CHANGE_BLIP_SCALE ped_5_blip 3
	ped_5_exists = 1
	GET_GAME_TIMER ped_5_time
	++ number_of_peds
	RETURN
ENDIF
 
IF ped_6_exists = 0	
	generate_coord_ped_6:
	GENERATE_RANDOM_FLOAT_IN_RANGE -173.0 460.0 random_commercial_x
	GENERATE_RANDOM_FLOAT_IN_RANGE -1627.0 100.0 random_commercial_y
	GET_PLAYER_COORDINATES player garbage_x	garbage_y garbage_z
	GET_CLOSEST_CHAR_NODE random_commercial_x random_commercial_y garbage_z ped_6_x ped_6_y ped_6_z
	difference_x = garbage_x - ped_6_x
	difference_y = garbage_y - ped_6_y
	difference_x = difference_x * difference_x
	difference_y = difference_y * difference_y
	sum_diff = difference_x + difference_y
	SQRT sum_diff distance
	IF distance < 110.0
		GOTO generate_coord_ped_6
	ENDIF
	ADD_BLIP_FOR_COORD_OLD ped_6_x ped_6_y ped_6_z GREEN BLIP_ONLY ped_6_blip
	CHANGE_BLIP_SCALE ped_6_blip 3
	ped_6_exists = 1
	GET_GAME_TIMER ped_6_time
	++ number_of_peds
	RETURN
ENDIF
 
IF ped_7_exists = 0	
	generate_coord_ped_7:
	GENERATE_RANDOM_FLOAT_IN_RANGE -173.0 460.0 random_commercial_x
	GENERATE_RANDOM_FLOAT_IN_RANGE -1627.0 100.0 random_commercial_y
	GET_PLAYER_COORDINATES player garbage_x	garbage_y garbage_z
	GET_CLOSEST_CHAR_NODE random_commercial_x random_commercial_y garbage_z ped_7_x ped_7_y ped_7_z
	difference_x = garbage_x - ped_7_x
	difference_y = garbage_y - ped_7_y
	difference_x = difference_x * difference_x
	difference_y = difference_y * difference_y
	sum_diff = difference_x + difference_y
	SQRT sum_diff distance
	IF distance < 110.0
		GOTO generate_coord_ped_7
	ENDIF
	ADD_BLIP_FOR_COORD_OLD ped_7_x ped_7_y ped_7_z GREEN BLIP_ONLY ped_7_blip
	CHANGE_BLIP_SCALE ped_7_blip 3
	ped_7_exists = 1
	GET_GAME_TIMER ped_7_time
	++ number_of_peds
	RETURN
ENDIF
 
IF ped_8_exists = 0	
	generate_coord_ped_8:
	GENERATE_RANDOM_FLOAT_IN_RANGE -173.0 460.0 random_commercial_x
	GENERATE_RANDOM_FLOAT_IN_RANGE -1627.0 100.0 random_commercial_y
	GET_PLAYER_COORDINATES player garbage_x	garbage_y garbage_z
	GET_CLOSEST_CHAR_NODE random_commercial_x random_commercial_y garbage_z ped_8_x ped_8_y ped_8_z
	difference_x = garbage_x - ped_8_x
	difference_y = garbage_y - ped_8_y
	difference_x = difference_x * difference_x
	difference_y = difference_y * difference_y
	sum_diff = difference_x + difference_y
	SQRT sum_diff distance
	IF distance < 110.0
		GOTO generate_coord_ped_8
	ENDIF
	ADD_BLIP_FOR_COORD_OLD ped_8_x ped_8_y ped_8_z GREEN BLIP_ONLY ped_8_blip
	CHANGE_BLIP_SCALE ped_8_blip 3
	ped_8_exists = 1
	GET_GAME_TIMER ped_8_time
	++ number_of_peds
	RETURN
ENDIF
 
IF ped_9_exists = 0	
	generate_coord_ped_9:
	GENERATE_RANDOM_FLOAT_IN_RANGE -173.0 460.0 random_commercial_x
	GENERATE_RANDOM_FLOAT_IN_RANGE -1627.0 100.0 random_commercial_y
	GET_PLAYER_COORDINATES player garbage_x	garbage_y garbage_z
	GET_CLOSEST_CHAR_NODE random_commercial_x random_commercial_y garbage_z ped_9_x ped_9_y ped_9_z
	difference_x = garbage_x - ped_9_x
	difference_y = garbage_y - ped_9_y
	difference_x = difference_x * difference_x
	difference_y = difference_y * difference_y
	sum_diff = difference_x + difference_y
	SQRT sum_diff distance
	IF distance < 110.0
		GOTO generate_coord_ped_9
	ENDIF
	ADD_BLIP_FOR_COORD_OLD ped_9_x ped_9_y ped_9_z GREEN BLIP_ONLY ped_9_blip
	CHANGE_BLIP_SCALE ped_9_blip 3
	ped_9_exists = 1
	GET_GAME_TIMER ped_9_time
	++ number_of_peds
	RETURN
ENDIF
 
IF ped_10_exists = 0	
	generate_coord_ped_10:
	GENERATE_RANDOM_FLOAT_IN_RANGE -173.0 460.0 random_commercial_x
	GENERATE_RANDOM_FLOAT_IN_RANGE -1627.0 100.0 random_commercial_y
	GET_PLAYER_COORDINATES player garbage_x	garbage_y garbage_z
	GET_CLOSEST_CHAR_NODE random_commercial_x random_commercial_y garbage_z ped_10_x ped_10_y ped_10_z
	difference_x = garbage_x - ped_10_x
	difference_y = garbage_y - ped_10_y
	difference_x = difference_x * difference_x
	difference_y = difference_y * difference_y
	sum_diff = difference_x + difference_y
	SQRT sum_diff distance
	IF distance < 110.0
		GOTO generate_coord_ped_10
	ENDIF
	ADD_BLIP_FOR_COORD_OLD ped_10_x ped_10_y ped_10_z GREEN BLIP_ONLY ped_10_blip
	CHANGE_BLIP_SCALE ped_10_blip 3
	ped_10_exists = 1
	GET_GAME_TIMER ped_10_time
	++ number_of_peds
	RETURN
ENDIF
 
IF ped_11_exists = 0	
	generate_coord_ped_11:
	GENERATE_RANDOM_FLOAT_IN_RANGE -173.0 460.0 random_commercial_x
	GENERATE_RANDOM_FLOAT_IN_RANGE -1627.0 100.0 random_commercial_y
	GET_PLAYER_COORDINATES player garbage_x	garbage_y garbage_z
	GET_CLOSEST_CHAR_NODE random_commercial_x random_commercial_y garbage_z ped_11_x ped_11_y ped_11_z
	difference_x = garbage_x - ped_11_x
	difference_y = garbage_y - ped_11_y
	difference_x = difference_x * difference_x
	difference_y = difference_y * difference_y
	sum_diff = difference_x + difference_y
	SQRT sum_diff distance
	IF distance < 110.0
		GOTO generate_coord_ped_11
	ENDIF
	ADD_BLIP_FOR_COORD_OLD ped_11_x ped_11_y ped_11_z GREEN BLIP_ONLY ped_11_blip
	CHANGE_BLIP_SCALE ped_11_blip 3
	ped_11_exists = 1
	GET_GAME_TIMER ped_11_time
	++ number_of_peds
	RETURN
ENDIF
 
IF ped_12_exists = 0	
	generate_coord_ped_12:
	GENERATE_RANDOM_FLOAT_IN_RANGE -173.0 460.0 random_commercial_x
	GENERATE_RANDOM_FLOAT_IN_RANGE -1627.0 100.0 random_commercial_y
	GET_PLAYER_COORDINATES player garbage_x	garbage_y garbage_z
	GET_CLOSEST_CHAR_NODE random_commercial_x random_commercial_y garbage_z ped_12_x ped_12_y ped_12_z
	difference_x = garbage_x - ped_12_x
	difference_y = garbage_y - ped_12_y
	difference_x = difference_x * difference_x
	difference_y = difference_y * difference_y
	sum_diff = difference_x + difference_y
	SQRT sum_diff distance
	IF distance < 110.0
		GOTO generate_coord_ped_12
	ENDIF
	ADD_BLIP_FOR_COORD_OLD ped_12_x ped_12_y ped_12_z GREEN BLIP_ONLY ped_12_blip
	CHANGE_BLIP_SCALE ped_12_blip 3
	ped_12_exists = 1
	GET_GAME_TIMER ped_12_time
	++ number_of_peds
	RETURN
ENDIF
 
IF ped_13_exists = 0	
	generate_coord_ped_13:
	GENERATE_RANDOM_FLOAT_IN_RANGE -173.0 460.0 random_commercial_x
	GENERATE_RANDOM_FLOAT_IN_RANGE -1627.0 100.0 random_commercial_y
	GET_PLAYER_COORDINATES player garbage_x	garbage_y garbage_z
	GET_CLOSEST_CHAR_NODE random_commercial_x random_commercial_y garbage_z ped_13_x ped_13_y ped_13_z
	difference_x = garbage_x - ped_13_x
	difference_y = garbage_y - ped_13_y
	difference_x = difference_x * difference_x
	difference_y = difference_y * difference_y
	sum_diff = difference_x + difference_y
	SQRT sum_diff distance
	IF distance < 110.0
		GOTO generate_coord_ped_13
	ENDIF
	ADD_BLIP_FOR_COORD_OLD ped_13_x ped_13_y ped_13_z GREEN BLIP_ONLY ped_13_blip
	CHANGE_BLIP_SCALE ped_13_blip 3
	ped_13_exists = 1
	GET_GAME_TIMER ped_13_time
	++ number_of_peds
	RETURN
ENDIF
 
IF ped_14_exists = 0	
	generate_coord_ped_14:
	GENERATE_RANDOM_FLOAT_IN_RANGE -173.0 460.0 random_commercial_x
	GENERATE_RANDOM_FLOAT_IN_RANGE -1627.0 100.0 random_commercial_y
	GET_PLAYER_COORDINATES player garbage_x	garbage_y garbage_z
	GET_CLOSEST_CHAR_NODE random_commercial_x random_commercial_y garbage_z ped_14_x ped_14_y ped_14_z
	difference_x = garbage_x - ped_14_x
	difference_y = garbage_y - ped_14_y
	difference_x = difference_x * difference_x
	difference_y = difference_y * difference_y
	sum_diff = difference_x + difference_y
	SQRT sum_diff distance
	IF distance < 110.0
		GOTO generate_coord_ped_14
	ENDIF
	ADD_BLIP_FOR_COORD_OLD ped_14_x ped_14_y ped_14_z GREEN BLIP_ONLY ped_14_blip
	CHANGE_BLIP_SCALE ped_14_blip 3
	ped_14_exists = 1
	GET_GAME_TIMER ped_14_time
	++ number_of_peds
	RETURN
ENDIF
 
IF ped_15_exists = 0	
	generate_coord_ped_15:
	GENERATE_RANDOM_FLOAT_IN_RANGE -173.0 460.0 random_commercial_x
	GENERATE_RANDOM_FLOAT_IN_RANGE -1627.0 100.0 random_commercial_y
	GET_PLAYER_COORDINATES player garbage_x	garbage_y garbage_z
	GET_CLOSEST_CHAR_NODE random_commercial_x random_commercial_y garbage_z ped_15_x ped_15_y ped_15_z
	difference_x = garbage_x - ped_15_x
	difference_y = garbage_y - ped_15_y
	difference_x = difference_x * difference_x
	difference_y = difference_y * difference_y
	sum_diff = difference_x + difference_y
	SQRT sum_diff distance
	IF distance < 110.0
		GOTO generate_coord_ped_15
	ENDIF
	ADD_BLIP_FOR_COORD_OLD ped_15_x ped_15_y ped_15_z GREEN BLIP_ONLY ped_15_blip
	CHANGE_BLIP_SCALE ped_15_blip 3
	ped_15_exists = 1
	GET_GAME_TIMER ped_15_time
	++ number_of_peds
	RETURN
ENDIF
 
RETURN
 
 
main_part_of_script:///////////////////////////////////////////////////////////////////////////
 
ped_1_x	= 39.3
ped_1_y	= -880.6
ped_1_z	= 34.0
 
ped_2_x	= -55.4331
ped_2_y	= -974.3467
ped_2_z	= 25.4
 
delete_oldest_ped_time = 80000
 
ADD_BLIP_FOR_COORD_OLD ped_1_x ped_1_y ped_1_z GREEN BLIP_ONLY ped_1_blip
CHANGE_BLIP_SCALE ped_1_blip 3
 
ADD_BLIP_FOR_COORD_OLD ped_2_x ped_2_y ped_2_z GREEN BLIP_ONLY ped_2_blip
CHANGE_BLIP_SCALE ped_2_blip 3
 
PRINT_NOW KM5_6 5000 1 //"You must murder at least 8 Yardie dealers."
PRINT_SOON KM5_7 6000 1	//"Kill them quickly!  Once they've pushed their SPANK they're off the streets."
 
DISPLAY_ONSCREEN_COUNTER_WITH_STRING dead_peds COUNTER_DISPLAY_NUMBER KILLS
 
ped_1_exists = 1
ped_2_exists = 1
number_of_peds = 2
TIMERA = 0
 
WHILE number_of_peds > 0
 
	WAIT 0
 
	IF dead_peds > 0
		IF TIMERA > delete_oldest_ped_time
			TIMERA = 0
			GOSUB delete_oldest_ped
		ENDIF
	ENDIF
 
	IF ped_1_exists > 0
		IF ped_1_exists = 1
			IF LOCATE_PLAYER_ANY_MEANS_2D player ped_1_x ped_1_y 90.0 90.0 0
				CREATE_CHAR	PEDTYPE_GANG_YARDIE PED_GANG_YARDIE_A ped_1_x ped_1_y ped_1_z ped_1
    			GIVE_WEAPON_TO_CHAR	ped_1 WEAPONTYPE_UZI 999
				SET_CHAR_PERSONALITY ped_1 PEDSTAT_TOUGH_GUY
				SET_CHAR_THREAT_SEARCH ped_1 THREAT_GUN
				SET_CHAR_THREAT_SEARCH ped_1 THREAT_FAST_CAR
				SET_CHAR_THREAT_SEARCH ped_1 THREAT_PLAYER1
				SET_CHAR_THREAT_SEARCH ped_1 THREAT_PLAYER2
				SET_CHAR_THREAT_SEARCH ped_1 THREAT_PLAYER3
				SET_CHAR_THREAT_SEARCH ped_1 THREAT_PLAYER4
				SET_CHAR_ONLY_DAMAGED_BY_PLAYER ped_1 TRUE
				GENERATE_RANDOM_INT_IN_RANGE 0 8 random_direction
				CHAR_WANDER_DIR ped_1 random_direction
				REMOVE_BLIP ped_1_blip
				ADD_BLIP_FOR_CHAR_OLD ped_1 GREEN BOTH ped_1_blip
				CHANGE_BLIP_SCALE ped_1_blip 3
				ped_1_exists = 2
			ENDIF
		ENDIF
		IF ped_1_exists = 2
			IF IS_CHAR_DEAD ped_1
				REMOVE_BLIP ped_1_blip
				MARK_CHAR_AS_NO_LONGER_NEEDED ped_1
				ped_1_exists = 0
				++ dead_peds
				-- number_of_peds
				PRINT_NOW KM5_1 2000 1 // "One down, two more to kill."
				IF on_screen_counter_flag = 0
					PRINT_SOON KM5_7 6000 1	//"Kill them quickly!  Once they've pushed their SPANK they're off the streets."
					TIMERA = 0
					on_screen_counter_flag = 1
				ENDIF
				GOSUB create_random_ped
				GOSUB create_random_ped
			ENDIF
			IF ped_1_exists = 2
				IF NOT LOCATE_PLAYER_ANY_MEANS_CHAR_2D player ped_1 90.0 90.0 0
					GET_CHAR_COORDINATES ped_1 ped_1_x ped_1_y ped_1_z
					REMOVE_BLIP ped_1_blip
					ADD_BLIP_FOR_COORD_OLD ped_1_x ped_1_y ped_1_z GREEN BLIP_ONLY ped_1_blip
					CHANGE_BLIP_SCALE ped_1_blip 3
					DELETE_CHAR ped_1
					ped_1_exists = 1
				ENDIF
			ENDIF
		ENDIF
	ENDIF
 
	IF ped_2_exists > 0
		IF ped_2_exists = 1
			IF LOCATE_PLAYER_ANY_MEANS_2D player ped_2_x ped_2_y 90.0 90.0 0
				CREATE_CHAR	PEDTYPE_GANG_YARDIE PED_GANG_YARDIE_A ped_2_x ped_2_y ped_2_z ped_2
    			GIVE_WEAPON_TO_CHAR	ped_2 WEAPONTYPE_UZI 999
				SET_CHAR_PERSONALITY ped_2 PEDSTAT_TOUGH_GUY
				SET_CHAR_THREAT_SEARCH ped_2 THREAT_GUN
				SET_CHAR_THREAT_SEARCH ped_2 THREAT_FAST_CAR
				SET_CHAR_THREAT_SEARCH ped_2 THREAT_PLAYER1
				SET_CHAR_THREAT_SEARCH ped_2 THREAT_PLAYER2
				SET_CHAR_THREAT_SEARCH ped_2 THREAT_PLAYER3
				SET_CHAR_THREAT_SEARCH ped_2 THREAT_PLAYER4
				SET_CHAR_ONLY_DAMAGED_BY_PLAYER ped_2 TRUE
				REMOVE_BLIP ped_2_blip
				ADD_BLIP_FOR_CHAR_OLD ped_2 GREEN BOTH ped_2_blip
				CHANGE_BLIP_SCALE ped_2_blip 3
				ped_2_exists = 2
			ENDIF
		ENDIF
		IF ped_2_exists = 2
			IF IS_CHAR_DEAD ped_2
				REMOVE_BLIP ped_2_blip
				MARK_CHAR_AS_NO_LONGER_NEEDED ped_2
				ped_2_exists = 0
				++ dead_peds
				-- number_of_peds
				PRINT_NOW KM5_1 2000 1 // "One down, two more to kill."
				IF on_screen_counter_flag = 0
					PRINT_SOON KM5_7 6000 1	//"Kill them quickly!  Once they've pushed their SPANK they're off the streets."
					TIMERA = 0
					on_screen_counter_flag = 1
				ENDIF
				GOSUB create_random_ped
				GOSUB create_random_ped
			ENDIF
			IF ped_2_exists = 2
				IF NOT LOCATE_PLAYER_ANY_MEANS_CHAR_2D player ped_2 90.0 90.0 0
					GET_CHAR_COORDINATES ped_2 ped_2_x ped_2_y ped_2_z
					REMOVE_BLIP ped_2_blip
					ADD_BLIP_FOR_COORD_OLD ped_2_x ped_2_y ped_2_z GREEN BLIP_ONLY ped_2_blip
					CHANGE_BLIP_SCALE ped_2_blip 3
					DELETE_CHAR ped_2
					ped_2_exists = 1
				ENDIF
			ENDIF
		ENDIF
	ENDIF
 
	IF ped_3_exists > 0
		IF ped_3_exists = 1
			IF LOCATE_PLAYER_ANY_MEANS_2D player ped_3_x ped_3_y 90.0 90.0 0
				CREATE_CHAR	PEDTYPE_GANG_YARDIE PED_GANG_YARDIE_A ped_3_x ped_3_y ped_3_z ped_3
    			GIVE_WEAPON_TO_CHAR	ped_3 WEAPONTYPE_UZI 999
				SET_CHAR_PERSONALITY ped_3 PEDSTAT_TOUGH_GUY
				SET_CHAR_THREAT_SEARCH ped_3 THREAT_GUN
				SET_CHAR_THREAT_SEARCH ped_3 THREAT_FAST_CAR
				SET_CHAR_THREAT_SEARCH ped_3 THREAT_PLAYER1
				SET_CHAR_THREAT_SEARCH ped_3 THREAT_PLAYER2
				SET_CHAR_THREAT_SEARCH ped_3 THREAT_PLAYER3
				SET_CHAR_THREAT_SEARCH ped_3 THREAT_PLAYER4
				SET_CHAR_ONLY_DAMAGED_BY_PLAYER ped_3 TRUE
				GENERATE_RANDOM_INT_IN_RANGE 0 8 random_direction
				CHAR_WANDER_DIR ped_3 random_direction
				REMOVE_BLIP ped_3_blip
				ADD_BLIP_FOR_CHAR_OLD ped_3 GREEN BOTH ped_3_blip
				CHANGE_BLIP_SCALE ped_3_blip 3
				ped_3_exists = 2
			ENDIF
		ENDIF
		IF ped_3_exists = 2
			IF IS_CHAR_DEAD ped_3
				REMOVE_BLIP ped_3_blip
				MARK_CHAR_AS_NO_LONGER_NEEDED ped_3
				ped_3_exists = 0
				++ dead_peds
				-- number_of_peds
				PRINT_NOW KM5_1 2000 1 // "One down, two more to kill."
				GOSUB create_random_ped
				GOSUB create_random_ped
			ENDIF
			IF ped_3_exists = 2
				IF NOT LOCATE_PLAYER_ANY_MEANS_CHAR_2D player ped_3 90.0 90.0 0
					GET_CHAR_COORDINATES ped_3 ped_3_x ped_3_y ped_3_z
					REMOVE_BLIP ped_3_blip
					ADD_BLIP_FOR_COORD_OLD ped_3_x ped_3_y ped_3_z GREEN BLIP_ONLY ped_3_blip
					CHANGE_BLIP_SCALE ped_3_blip 3
					DELETE_CHAR ped_3
					ped_3_exists = 1
				ENDIF
			ENDIF
		ENDIF
	ENDIF
 
	IF ped_4_exists > 0
		IF ped_4_exists = 1
			IF LOCATE_PLAYER_ANY_MEANS_2D player ped_4_x ped_4_y 90.0 90.0 0
				CREATE_CHAR	PEDTYPE_GANG_YARDIE PED_GANG_YARDIE_A ped_4_x ped_4_y ped_4_z ped_4
    			GIVE_WEAPON_TO_CHAR	ped_4 WEAPONTYPE_UZI 999
				SET_CHAR_PERSONALITY ped_4 PEDSTAT_TOUGH_GUY
				SET_CHAR_THREAT_SEARCH ped_4 THREAT_GUN
				SET_CHAR_THREAT_SEARCH ped_4 THREAT_FAST_CAR
				SET_CHAR_THREAT_SEARCH ped_4 THREAT_PLAYER1
				SET_CHAR_THREAT_SEARCH ped_4 THREAT_PLAYER2
				SET_CHAR_THREAT_SEARCH ped_4 THREAT_PLAYER3
				SET_CHAR_THREAT_SEARCH ped_4 THREAT_PLAYER4
				SET_CHAR_ONLY_DAMAGED_BY_PLAYER ped_4 TRUE
				GENERATE_RANDOM_INT_IN_RANGE 0 8 random_direction
				CHAR_WANDER_DIR ped_4 random_direction
				REMOVE_BLIP ped_4_blip
				ADD_BLIP_FOR_CHAR_OLD ped_4 GREEN BOTH ped_4_blip
				CHANGE_BLIP_SCALE ped_4_blip 3
				ped_4_exists = 2
			ENDIF
		ENDIF
		IF ped_4_exists = 2
			IF IS_CHAR_DEAD ped_4
				REMOVE_BLIP ped_4_blip
				MARK_CHAR_AS_NO_LONGER_NEEDED ped_4
				ped_4_exists = 0
				++ dead_peds
				-- number_of_peds
				PRINT_NOW KM5_1 2000 1 // "One down, two more to kill."
				GOSUB create_random_ped
				GOSUB create_random_ped
			ENDIF
			IF ped_4_exists = 2
				IF NOT LOCATE_PLAYER_ANY_MEANS_CHAR_2D player ped_4 90.0 90.0 0
					GET_CHAR_COORDINATES ped_4 ped_4_x ped_4_y ped_4_z
					REMOVE_BLIP ped_4_blip
					ADD_BLIP_FOR_COORD_OLD ped_4_x ped_4_y ped_4_z GREEN BLIP_ONLY ped_4_blip
					CHANGE_BLIP_SCALE ped_4_blip 3
					DELETE_CHAR ped_4
					ped_4_exists = 1
				ENDIF
			ENDIF
		ENDIF
	ENDIF
 
	IF ped_5_exists > 0
		IF ped_5_exists = 1
			IF LOCATE_PLAYER_ANY_MEANS_2D player ped_5_x ped_5_y 90.0 90.0 0
				CREATE_CHAR	PEDTYPE_GANG_YARDIE PED_GANG_YARDIE_A ped_5_x ped_5_y ped_5_z ped_5
    			GIVE_WEAPON_TO_CHAR	ped_5 WEAPONTYPE_UZI 999
				SET_CHAR_PERSONALITY ped_5 PEDSTAT_TOUGH_GUY
				SET_CHAR_THREAT_SEARCH ped_5 THREAT_GUN
				SET_CHAR_THREAT_SEARCH ped_5 THREAT_FAST_CAR
				SET_CHAR_THREAT_SEARCH ped_5 THREAT_PLAYER1
				SET_CHAR_THREAT_SEARCH ped_5 THREAT_PLAYER2
				SET_CHAR_THREAT_SEARCH ped_5 THREAT_PLAYER3
				SET_CHAR_THREAT_SEARCH ped_5 THREAT_PLAYER4
				SET_CHAR_ONLY_DAMAGED_BY_PLAYER ped_5 TRUE
				GENERATE_RANDOM_INT_IN_RANGE 0 8 random_direction
				CHAR_WANDER_DIR ped_5 random_direction
				REMOVE_BLIP ped_5_blip
				ADD_BLIP_FOR_CHAR_OLD ped_5 GREEN BOTH ped_5_blip
				CHANGE_BLIP_SCALE ped_5_blip 3
				ped_5_exists = 2
			ENDIF
		ENDIF
		IF ped_5_exists = 2
			IF IS_CHAR_DEAD ped_5
				REMOVE_BLIP ped_5_blip
				MARK_CHAR_AS_NO_LONGER_NEEDED ped_5
				ped_5_exists = 0
				++ dead_peds
				-- number_of_peds
				PRINT_NOW KM5_1 2000 1 // "One down, two more to kill."
				GOSUB create_random_ped
				GOSUB create_random_ped
			ENDIF
			IF ped_5_exists = 2
				IF NOT LOCATE_PLAYER_ANY_MEANS_CHAR_2D player ped_5 90.0 90.0 0
					GET_CHAR_COORDINATES ped_5 ped_5_x ped_5_y ped_5_z
					REMOVE_BLIP ped_5_blip
					ADD_BLIP_FOR_COORD_OLD ped_5_x ped_5_y ped_5_z GREEN BLIP_ONLY ped_5_blip
					CHANGE_BLIP_SCALE ped_5_blip 3
					DELETE_CHAR ped_5
					ped_5_exists = 1
				ENDIF
			ENDIF
		ENDIF
	ENDIF
 
	IF ped_6_exists > 0
		IF ped_6_exists = 1
			IF LOCATE_PLAYER_ANY_MEANS_2D player ped_6_x ped_6_y 90.0 90.0 0
				CREATE_CHAR	PEDTYPE_GANG_YARDIE PED_GANG_YARDIE_A ped_6_x ped_6_y ped_6_z ped_6
    			GIVE_WEAPON_TO_CHAR	ped_6 WEAPONTYPE_UZI 999
				SET_CHAR_PERSONALITY ped_6 PEDSTAT_TOUGH_GUY
				SET_CHAR_THREAT_SEARCH ped_6 THREAT_GUN
				SET_CHAR_THREAT_SEARCH ped_6 THREAT_FAST_CAR
				SET_CHAR_THREAT_SEARCH ped_6 THREAT_PLAYER1
				SET_CHAR_THREAT_SEARCH ped_6 THREAT_PLAYER2
				SET_CHAR_THREAT_SEARCH ped_6 THREAT_PLAYER3
				SET_CHAR_THREAT_SEARCH ped_6 THREAT_PLAYER4
				SET_CHAR_ONLY_DAMAGED_BY_PLAYER ped_6 TRUE
				GENERATE_RANDOM_INT_IN_RANGE 0 8 random_direction
				CHAR_WANDER_DIR ped_6 random_direction
				REMOVE_BLIP ped_6_blip
				ADD_BLIP_FOR_CHAR_OLD ped_6 GREEN BOTH ped_6_blip
				CHANGE_BLIP_SCALE ped_6_blip 3
				ped_6_exists = 2
			ENDIF
		ENDIF
		IF ped_6_exists = 2
			IF IS_CHAR_DEAD ped_6
				REMOVE_BLIP ped_6_blip
				MARK_CHAR_AS_NO_LONGER_NEEDED ped_6
				ped_6_exists = 0
				++ dead_peds
				-- number_of_peds
				PRINT_NOW KM5_1 2000 1 // "One down, two more to kill."
				GOSUB create_random_ped
				GOSUB create_random_ped
			ENDIF
			IF ped_6_exists = 2
				IF NOT LOCATE_PLAYER_ANY_MEANS_CHAR_2D player ped_6 90.0 90.0 0
					GET_CHAR_COORDINATES ped_6 ped_6_x ped_6_y ped_6_z
					REMOVE_BLIP ped_6_blip
					ADD_BLIP_FOR_COORD_OLD ped_6_x ped_6_y ped_6_z GREEN BLIP_ONLY ped_6_blip
					CHANGE_BLIP_SCALE ped_6_blip 3
					DELETE_CHAR ped_6
					ped_6_exists = 1
				ENDIF
			ENDIF
		ENDIF
	ENDIF
 
	IF ped_7_exists > 0
		IF ped_7_exists = 1
			IF LOCATE_PLAYER_ANY_MEANS_2D player ped_7_x ped_7_y 90.0 90.0 0
				CREATE_CHAR	PEDTYPE_GANG_YARDIE PED_GANG_YARDIE_A ped_7_x ped_7_y ped_7_z ped_7
    			GIVE_WEAPON_TO_CHAR	ped_7 WEAPONTYPE_UZI 999
				SET_CHAR_PERSONALITY ped_7 PEDSTAT_TOUGH_GUY
				SET_CHAR_THREAT_SEARCH ped_7 THREAT_GUN
				SET_CHAR_THREAT_SEARCH ped_7 THREAT_FAST_CAR
				SET_CHAR_THREAT_SEARCH ped_7 THREAT_PLAYER1
				SET_CHAR_THREAT_SEARCH ped_7 THREAT_PLAYER2
				SET_CHAR_THREAT_SEARCH ped_7 THREAT_PLAYER3
				SET_CHAR_THREAT_SEARCH ped_7 THREAT_PLAYER4
				SET_CHAR_ONLY_DAMAGED_BY_PLAYER ped_7 TRUE
				GENERATE_RANDOM_INT_IN_RANGE 0 8 random_direction
				CHAR_WANDER_DIR ped_7 random_direction
				REMOVE_BLIP ped_7_blip
				ADD_BLIP_FOR_CHAR_OLD ped_7 GREEN BOTH ped_7_blip
				CHANGE_BLIP_SCALE ped_7_blip 3
				ped_7_exists = 2
			ENDIF
		ENDIF
		IF ped_7_exists = 2
			IF IS_CHAR_DEAD ped_7
				REMOVE_BLIP ped_7_blip
				MARK_CHAR_AS_NO_LONGER_NEEDED ped_7
				ped_7_exists = 0
				++ dead_peds
				-- number_of_peds
				PRINT_NOW KM5_1 2000 1 // "One down, two more to kill."
				GOSUB create_random_ped
				GOSUB create_random_ped
			ENDIF
			IF ped_7_exists = 2
				IF NOT LOCATE_PLAYER_ANY_MEANS_CHAR_2D player ped_7 90.0 90.0 0
					GET_CHAR_COORDINATES ped_7 ped_7_x ped_7_y ped_7_z
					REMOVE_BLIP ped_7_blip
					ADD_BLIP_FOR_COORD_OLD ped_7_x ped_7_y ped_7_z GREEN BLIP_ONLY ped_7_blip
					CHANGE_BLIP_SCALE ped_7_blip 3
					DELETE_CHAR ped_7
					ped_7_exists = 1
				ENDIF
			ENDIF
		ENDIF
	ENDIF
 
	IF ped_8_exists > 0
		IF ped_8_exists = 1
			IF LOCATE_PLAYER_ANY_MEANS_2D player ped_8_x ped_8_y 90.0 90.0 0
				CREATE_CHAR	PEDTYPE_GANG_YARDIE PED_GANG_YARDIE_A ped_8_x ped_8_y ped_8_z ped_8
    			GIVE_WEAPON_TO_CHAR	ped_8 WEAPONTYPE_UZI 999
				SET_CHAR_PERSONALITY ped_8 PEDSTAT_TOUGH_GUY
				SET_CHAR_THREAT_SEARCH ped_8 THREAT_GUN
				SET_CHAR_THREAT_SEARCH ped_8 THREAT_FAST_CAR
				SET_CHAR_THREAT_SEARCH ped_8 THREAT_PLAYER1
				SET_CHAR_THREAT_SEARCH ped_8 THREAT_PLAYER2
				SET_CHAR_THREAT_SEARCH ped_8 THREAT_PLAYER3
				SET_CHAR_THREAT_SEARCH ped_8 THREAT_PLAYER4
				SET_CHAR_ONLY_DAMAGED_BY_PLAYER ped_8 TRUE
				GENERATE_RANDOM_INT_IN_RANGE 0 8 random_direction
				CHAR_WANDER_DIR ped_8 random_direction
				REMOVE_BLIP ped_8_blip
				ADD_BLIP_FOR_CHAR_OLD ped_8 GREEN BOTH ped_8_blip
				CHANGE_BLIP_SCALE ped_8_blip 3
				ped_8_exists = 2
			ENDIF
		ENDIF
		IF ped_8_exists = 2
			IF IS_CHAR_DEAD ped_8
				REMOVE_BLIP ped_8_blip
				MARK_CHAR_AS_NO_LONGER_NEEDED ped_8
				ped_8_exists = 0
				++ dead_peds
				-- number_of_peds
				PRINT_NOW KM5_1 2000 1 // "One down, two more to kill."
				GOSUB create_random_ped
				GOSUB create_random_ped
			ENDIF
			IF ped_8_exists = 2
				IF NOT LOCATE_PLAYER_ANY_MEANS_CHAR_2D player ped_8 90.0 90.0 0
					GET_CHAR_COORDINATES ped_8 ped_8_x ped_8_y ped_8_z
					REMOVE_BLIP ped_8_blip
					ADD_BLIP_FOR_COORD_OLD ped_8_x ped_8_y ped_8_z GREEN BLIP_ONLY ped_8_blip
					CHANGE_BLIP_SCALE ped_8_blip 3
					DELETE_CHAR ped_8
					ped_8_exists = 1
				ENDIF
			ENDIF
		ENDIF
	ENDIF
 
	IF ped_9_exists > 0
		IF ped_9_exists = 1
			IF LOCATE_PLAYER_ANY_MEANS_2D player ped_9_x ped_9_y 90.0 90.0 0
				CREATE_CHAR	PEDTYPE_GANG_YARDIE PED_GANG_YARDIE_A ped_9_x ped_9_y ped_9_z ped_9
    			GIVE_WEAPON_TO_CHAR	ped_9 WEAPONTYPE_UZI 999
				SET_CHAR_PERSONALITY ped_9 PEDSTAT_TOUGH_GUY
				SET_CHAR_THREAT_SEARCH ped_9 THREAT_GUN
				SET_CHAR_THREAT_SEARCH ped_9 THREAT_FAST_CAR
				SET_CHAR_THREAT_SEARCH ped_9 THREAT_PLAYER1
				SET_CHAR_THREAT_SEARCH ped_9 THREAT_PLAYER2
				SET_CHAR_THREAT_SEARCH ped_9 THREAT_PLAYER3
				SET_CHAR_THREAT_SEARCH ped_9 THREAT_PLAYER4
				SET_CHAR_ONLY_DAMAGED_BY_PLAYER ped_9 TRUE
				GENERATE_RANDOM_INT_IN_RANGE 0 8 random_direction
				CHAR_WANDER_DIR ped_9 random_direction
				REMOVE_BLIP ped_9_blip
				ADD_BLIP_FOR_CHAR_OLD ped_9 GREEN BOTH ped_9_blip
				CHANGE_BLIP_SCALE ped_9_blip 3
				ped_9_exists = 2
			ENDIF
		ENDIF
		IF ped_9_exists = 2
			IF IS_CHAR_DEAD ped_9
				REMOVE_BLIP ped_9_blip
				MARK_CHAR_AS_NO_LONGER_NEEDED ped_9
				ped_9_exists = 0
				++ dead_peds
				-- number_of_peds
				PRINT_NOW KM5_1 2000 1 // "One down, two more to kill."
				GOSUB create_random_ped
				GOSUB create_random_ped
			ENDIF
			IF ped_9_exists = 2
				IF NOT LOCATE_PLAYER_ANY_MEANS_CHAR_2D player ped_9 90.0 90.0 0
					GET_CHAR_COORDINATES ped_9 ped_9_x ped_9_y ped_9_z
					REMOVE_BLIP ped_9_blip
					ADD_BLIP_FOR_COORD_OLD ped_9_x ped_9_y ped_9_z GREEN BLIP_ONLY ped_9_blip
					CHANGE_BLIP_SCALE ped_9_blip 3
					DELETE_CHAR ped_9
					ped_9_exists = 1
				ENDIF
			ENDIF
		ENDIF
	ENDIF
 
	IF ped_10_exists > 0
		IF ped_10_exists = 1
			IF LOCATE_PLAYER_ANY_MEANS_2D player ped_10_x ped_10_y 90.0 90.0 0
				CREATE_CHAR	PEDTYPE_GANG_YARDIE PED_GANG_YARDIE_A ped_10_x ped_10_y ped_10_z ped_10
    			GIVE_WEAPON_TO_CHAR	ped_10 WEAPONTYPE_UZI 999
				SET_CHAR_PERSONALITY ped_10 PEDSTAT_TOUGH_GUY
				SET_CHAR_THREAT_SEARCH ped_10 THREAT_GUN
				SET_CHAR_THREAT_SEARCH ped_10 THREAT_FAST_CAR
				SET_CHAR_THREAT_SEARCH ped_10 THREAT_PLAYER1
				SET_CHAR_THREAT_SEARCH ped_10 THREAT_PLAYER2
				SET_CHAR_THREAT_SEARCH ped_10 THREAT_PLAYER3
				SET_CHAR_THREAT_SEARCH ped_10 THREAT_PLAYER4
				SET_CHAR_ONLY_DAMAGED_BY_PLAYER ped_10 TRUE
				GENERATE_RANDOM_INT_IN_RANGE 0 8 random_direction
				CHAR_WANDER_DIR ped_10 random_direction
				REMOVE_BLIP ped_10_blip
				ADD_BLIP_FOR_CHAR_OLD ped_10 GREEN BOTH ped_10_blip
				CHANGE_BLIP_SCALE ped_10_blip 3
				ped_10_exists = 2
			ENDIF
		ENDIF
		IF ped_10_exists = 2
			IF IS_CHAR_DEAD ped_10
				REMOVE_BLIP ped_10_blip
				MARK_CHAR_AS_NO_LONGER_NEEDED ped_10
				ped_10_exists = 0
				++ dead_peds
				-- number_of_peds
				PRINT_NOW KM5_1 2000 1 // "One down, two more to kill."
				GOSUB create_random_ped
				GOSUB create_random_ped
			ENDIF
			IF ped_10_exists = 2
				IF NOT LOCATE_PLAYER_ANY_MEANS_CHAR_2D player ped_10 90.0 90.0 0
					GET_CHAR_COORDINATES ped_10 ped_10_x ped_10_y ped_10_z
					REMOVE_BLIP ped_10_blip
					ADD_BLIP_FOR_COORD_OLD ped_10_x ped_10_y ped_10_z GREEN BLIP_ONLY ped_10_blip
					CHANGE_BLIP_SCALE ped_10_blip 3
					DELETE_CHAR ped_10
					ped_10_exists = 1
				ENDIF
			ENDIF
		ENDIF
	ENDIF
 
	IF ped_11_exists > 0
		IF ped_11_exists = 1
			IF LOCATE_PLAYER_ANY_MEANS_2D player ped_11_x ped_11_y 90.0 90.0 0
				CREATE_CHAR	PEDTYPE_GANG_YARDIE PED_GANG_YARDIE_A ped_11_x ped_11_y ped_11_z ped_11
    			GIVE_WEAPON_TO_CHAR	ped_11 WEAPONTYPE_UZI 999
				SET_CHAR_PERSONALITY ped_11 PEDSTAT_TOUGH_GUY
				SET_CHAR_THREAT_SEARCH ped_11 THREAT_GUN
				SET_CHAR_THREAT_SEARCH ped_11 THREAT_FAST_CAR
				SET_CHAR_THREAT_SEARCH ped_11 THREAT_PLAYER1
				SET_CHAR_THREAT_SEARCH ped_11 THREAT_PLAYER2
				SET_CHAR_THREAT_SEARCH ped_11 THREAT_PLAYER3
				SET_CHAR_THREAT_SEARCH ped_11 THREAT_PLAYER4
				SET_CHAR_ONLY_DAMAGED_BY_PLAYER ped_11 TRUE
				GENERATE_RANDOM_INT_IN_RANGE 0 8 random_direction
				CHAR_WANDER_DIR ped_11 random_direction
				REMOVE_BLIP ped_11_blip
				ADD_BLIP_FOR_CHAR_OLD ped_11 GREEN BOTH ped_11_blip
				CHANGE_BLIP_SCALE ped_11_blip 3
				ped_11_exists = 2
			ENDIF
		ENDIF
		IF ped_11_exists = 2
			IF IS_CHAR_DEAD ped_11
				REMOVE_BLIP ped_11_blip
				MARK_CHAR_AS_NO_LONGER_NEEDED ped_11
				ped_11_exists = 0
				++ dead_peds
				-- number_of_peds
				PRINT_NOW KM5_1 2000 1 // "One down, two more to kill."
				GOSUB create_random_ped
				GOSUB create_random_ped
			ENDIF
			IF ped_11_exists = 2
				IF NOT LOCATE_PLAYER_ANY_MEANS_CHAR_2D player ped_11 90.0 90.0 0
					GET_CHAR_COORDINATES ped_11 ped_11_x ped_11_y ped_11_z
					REMOVE_BLIP ped_11_blip
					ADD_BLIP_FOR_COORD_OLD ped_11_x ped_11_y ped_11_z GREEN BLIP_ONLY ped_11_blip
					CHANGE_BLIP_SCALE ped_11_blip 3
					DELETE_CHAR ped_11
					ped_11_exists = 1
				ENDIF
			ENDIF
		ENDIF
	ENDIF
 
	IF ped_12_exists > 0
		IF ped_12_exists = 1
			IF LOCATE_PLAYER_ANY_MEANS_2D player ped_12_x ped_12_y 90.0 90.0 0
				CREATE_CHAR	PEDTYPE_GANG_YARDIE PED_GANG_YARDIE_A ped_12_x ped_12_y ped_12_z ped_12
    			GIVE_WEAPON_TO_CHAR	ped_12 WEAPONTYPE_UZI 999
				SET_CHAR_PERSONALITY ped_12 PEDSTAT_TOUGH_GUY
				SET_CHAR_THREAT_SEARCH ped_12 THREAT_GUN
				SET_CHAR_THREAT_SEARCH ped_12 THREAT_FAST_CAR
				SET_CHAR_THREAT_SEARCH ped_12 THREAT_PLAYER1
				SET_CHAR_THREAT_SEARCH ped_12 THREAT_PLAYER2
				SET_CHAR_THREAT_SEARCH ped_12 THREAT_PLAYER3
				SET_CHAR_THREAT_SEARCH ped_12 THREAT_PLAYER4
				SET_CHAR_ONLY_DAMAGED_BY_PLAYER ped_12 TRUE
				GENERATE_RANDOM_INT_IN_RANGE 0 8 random_direction
				CHAR_WANDER_DIR ped_12 random_direction
				REMOVE_BLIP ped_12_blip
				ADD_BLIP_FOR_CHAR_OLD ped_12 GREEN BOTH ped_12_blip
				CHANGE_BLIP_SCALE ped_12_blip 3
				ped_12_exists = 2
			ENDIF
		ENDIF
		IF ped_12_exists = 2
			IF IS_CHAR_DEAD ped_12
				REMOVE_BLIP ped_12_blip
				MARK_CHAR_AS_NO_LONGER_NEEDED ped_12
				ped_12_exists = 0
				++ dead_peds
				-- number_of_peds
				PRINT_NOW KM5_1 2000 1 // "One down, two more to kill."
				GOSUB create_random_ped
				GOSUB create_random_ped
			ENDIF
			IF ped_12_exists = 2
				IF NOT LOCATE_PLAYER_ANY_MEANS_CHAR_2D player ped_12 90.0 90.0 0
					GET_CHAR_COORDINATES ped_12 ped_12_x ped_12_y ped_12_z
					REMOVE_BLIP ped_12_blip
					ADD_BLIP_FOR_COORD_OLD ped_12_x ped_12_y ped_12_z GREEN BLIP_ONLY ped_12_blip
					CHANGE_BLIP_SCALE ped_12_blip 3
					DELETE_CHAR ped_12
					ped_12_exists = 1
				ENDIF
			ENDIF
		ENDIF
	ENDIF
 
	IF ped_13_exists > 0
		IF ped_13_exists = 1
			IF LOCATE_PLAYER_ANY_MEANS_2D player ped_13_x ped_13_y 90.0 90.0 0
				CREATE_CHAR	PEDTYPE_GANG_YARDIE PED_GANG_YARDIE_A ped_13_x ped_13_y ped_13_z ped_13
    			GIVE_WEAPON_TO_CHAR	ped_13 WEAPONTYPE_UZI 999
				SET_CHAR_PERSONALITY ped_13 PEDSTAT_TOUGH_GUY
				SET_CHAR_THREAT_SEARCH ped_13 THREAT_GUN
				SET_CHAR_THREAT_SEARCH ped_13 THREAT_FAST_CAR
				SET_CHAR_THREAT_SEARCH ped_13 THREAT_PLAYER1
				SET_CHAR_THREAT_SEARCH ped_13 THREAT_PLAYER2
				SET_CHAR_THREAT_SEARCH ped_13 THREAT_PLAYER3
				SET_CHAR_THREAT_SEARCH ped_13 THREAT_PLAYER4
				SET_CHAR_ONLY_DAMAGED_BY_PLAYER ped_13 TRUE
				GENERATE_RANDOM_INT_IN_RANGE 0 8 random_direction
				CHAR_WANDER_DIR ped_13 random_direction
				REMOVE_BLIP ped_13_blip
				ADD_BLIP_FOR_CHAR_OLD ped_13 GREEN BOTH ped_13_blip
				CHANGE_BLIP_SCALE ped_13_blip 3
				ped_13_exists = 2
			ENDIF
		ENDIF
		IF ped_13_exists = 2
			IF IS_CHAR_DEAD ped_13
				REMOVE_BLIP ped_13_blip
				MARK_CHAR_AS_NO_LONGER_NEEDED ped_13
				ped_13_exists = 0
				++ dead_peds
				-- number_of_peds
				PRINT_NOW KM5_1 2000 1 // "One down, two more to kill."
				GOSUB create_random_ped
				GOSUB create_random_ped
			ENDIF
			IF ped_13_exists = 2
				IF NOT LOCATE_PLAYER_ANY_MEANS_CHAR_2D player ped_13 90.0 90.0 0
					GET_CHAR_COORDINATES ped_13 ped_13_x ped_13_y ped_13_z
					REMOVE_BLIP ped_13_blip
					ADD_BLIP_FOR_COORD_OLD ped_13_x ped_13_y ped_13_z GREEN BLIP_ONLY ped_13_blip
					CHANGE_BLIP_SCALE ped_13_blip 3
					DELETE_CHAR ped_13
					ped_13_exists = 1
				ENDIF
			ENDIF
		ENDIF
	ENDIF
 
	IF ped_14_exists > 0
		IF ped_14_exists = 1
			IF LOCATE_PLAYER_ANY_MEANS_2D player ped_14_x ped_14_y 90.0 90.0 0
				CREATE_CHAR	PEDTYPE_GANG_YARDIE PED_GANG_YARDIE_A ped_14_x ped_14_y ped_14_z ped_14
    			GIVE_WEAPON_TO_CHAR	ped_14 WEAPONTYPE_UZI 999
				SET_CHAR_PERSONALITY ped_14 PEDSTAT_TOUGH_GUY
				SET_CHAR_THREAT_SEARCH ped_14 THREAT_GUN
				SET_CHAR_THREAT_SEARCH ped_14 THREAT_FAST_CAR
				SET_CHAR_THREAT_SEARCH ped_14 THREAT_PLAYER1
				SET_CHAR_THREAT_SEARCH ped_14 THREAT_PLAYER2
				SET_CHAR_THREAT_SEARCH ped_14 THREAT_PLAYER3
				SET_CHAR_THREAT_SEARCH ped_14 THREAT_PLAYER4
				SET_CHAR_ONLY_DAMAGED_BY_PLAYER ped_14 TRUE
				GENERATE_RANDOM_INT_IN_RANGE 0 8 random_direction
				CHAR_WANDER_DIR ped_14 random_direction
				REMOVE_BLIP ped_14_blip
				ADD_BLIP_FOR_CHAR_OLD ped_14 GREEN BOTH ped_14_blip
				CHANGE_BLIP_SCALE ped_14_blip 3
				ped_14_exists = 2
			ENDIF
		ENDIF
		IF ped_14_exists = 2
			IF IS_CHAR_DEAD ped_14
				REMOVE_BLIP ped_14_blip
				MARK_CHAR_AS_NO_LONGER_NEEDED ped_14
				ped_14_exists = 0
				++ dead_peds
				-- number_of_peds
				PRINT_NOW KM5_1 2000 1 // "One down, two more to kill."
				GOSUB create_random_ped
				GOSUB create_random_ped
			ENDIF
			IF ped_14_exists = 2
				IF NOT LOCATE_PLAYER_ANY_MEANS_CHAR_2D player ped_14 90.0 90.0 0
					GET_CHAR_COORDINATES ped_14 ped_14_x ped_14_y ped_14_z
					REMOVE_BLIP ped_14_blip
					ADD_BLIP_FOR_COORD_OLD ped_14_x ped_14_y ped_14_z GREEN BLIP_ONLY ped_14_blip
					CHANGE_BLIP_SCALE ped_14_blip 3
					DELETE_CHAR ped_14
					ped_14_exists = 1
				ENDIF
			ENDIF
		ENDIF
	ENDIF
 
	IF ped_15_exists > 0
		IF ped_15_exists = 1
			IF LOCATE_PLAYER_ANY_MEANS_2D player ped_15_x ped_15_y 90.0 90.0 0
				CREATE_CHAR	PEDTYPE_GANG_YARDIE PED_GANG_YARDIE_A ped_15_x ped_15_y ped_15_z ped_15
    			GIVE_WEAPON_TO_CHAR	ped_15 WEAPONTYPE_UZI 999
				SET_CHAR_PERSONALITY ped_15 PEDSTAT_TOUGH_GUY
				SET_CHAR_THREAT_SEARCH ped_15 THREAT_GUN
				SET_CHAR_THREAT_SEARCH ped_15 THREAT_FAST_CAR
				SET_CHAR_THREAT_SEARCH ped_15 THREAT_PLAYER1
				SET_CHAR_THREAT_SEARCH ped_15 THREAT_PLAYER2
				SET_CHAR_THREAT_SEARCH ped_15 THREAT_PLAYER3
				SET_CHAR_THREAT_SEARCH ped_15 THREAT_PLAYER4
				SET_CHAR_ONLY_DAMAGED_BY_PLAYER ped_15 TRUE
				GENERATE_RANDOM_INT_IN_RANGE 0 8 random_direction
				CHAR_WANDER_DIR ped_15 random_direction
				REMOVE_BLIP ped_15_blip
				ADD_BLIP_FOR_CHAR_OLD ped_15 GREEN BOTH ped_15_blip
				CHANGE_BLIP_SCALE ped_15_blip 3
				ped_15_exists = 2
			ENDIF
		ENDIF
		IF ped_15_exists = 2
			IF IS_CHAR_DEAD ped_15
				REMOVE_BLIP ped_15_blip
				MARK_CHAR_AS_NO_LONGER_NEEDED ped_15
				ped_15_exists = 0
				++ dead_peds
				-- number_of_peds
				PRINT_NOW KM5_1 2000 1 // "One down, two more to kill."
				GOSUB create_random_ped
				GOSUB create_random_ped
			ENDIF
			IF ped_15_exists = 2
				IF NOT LOCATE_PLAYER_ANY_MEANS_CHAR_2D player ped_15 90.0 90.0 0
					GET_CHAR_COORDINATES ped_15 ped_15_x ped_15_y ped_15_z
					REMOVE_BLIP ped_15_blip
					ADD_BLIP_FOR_COORD_OLD ped_15_x ped_15_y ped_15_z GREEN BLIP_ONLY ped_15_blip
					CHANGE_BLIP_SCALE ped_15_blip 3
					DELETE_CHAR ped_15
					ped_15_exists = 1
				ENDIF
			ENDIF
		ENDIF
	ENDIF
 
ENDWHILE
 
IF dead_peds > minimum_kills
OR dead_peds = minimum_kills
	GOTO mission_kenji5_passed
ELSE
	GOTO mission_kenji5_failed
ENDIF
 
 
delete_oldest_ped://///////////////////////////////////////////////////////////////////////////
 
oldest_ped = 0
 
GET_GAME_TIMER oldest_ped_time
 
IF ped_1_exists = 1
AND ped_1_time < oldest_ped_time
	oldest_ped = 1
	oldest_ped_time = ped_1_time
ENDIF
 
IF ped_2_exists = 1
AND ped_2_time < oldest_ped_time
	oldest_ped = 2
	oldest_ped_time = ped_2_time
ENDIF
 
IF ped_3_exists = 1
AND ped_3_time < oldest_ped_time
	oldest_ped = 3
	oldest_ped_time = ped_3_time
ENDIF
 
IF ped_4_exists = 1
AND ped_4_time < oldest_ped_time
	oldest_ped = 4
	oldest_ped_time = ped_4_time
ENDIF
 
IF ped_5_exists = 1
AND ped_5_time < oldest_ped_time
	oldest_ped = 5
	oldest_ped_time = ped_5_time
ENDIF
 
IF ped_6_exists = 1
AND ped_6_time < oldest_ped_time
	oldest_ped = 6
	oldest_ped_time = ped_6_time
ENDIF
 
IF ped_7_exists = 1
AND ped_7_time < oldest_ped_time
	oldest_ped = 7
	oldest_ped_time = ped_7_time
ENDIF
 
IF ped_8_exists = 1
AND ped_8_time < oldest_ped_time
	oldest_ped = 8
	oldest_ped_time = ped_8_time
ENDIF
 
IF ped_9_exists = 1
AND ped_9_time < oldest_ped_time
	oldest_ped = 9
	oldest_ped_time = ped_9_time
ENDIF
 
IF ped_10_exists = 1
AND ped_10_time < oldest_ped_time
	oldest_ped = 10
	oldest_ped_time = ped_10_time
ENDIF
 
IF ped_11_exists = 1
AND ped_11_time < oldest_ped_time
	oldest_ped = 11
	oldest_ped_time = ped_11_time
ENDIF
 
IF ped_12_exists = 1
AND ped_12_time < oldest_ped_time
	oldest_ped = 12
	oldest_ped_time = ped_12_time
ENDIF
 
IF ped_13_exists = 1
AND ped_13_time < oldest_ped_time
	oldest_ped = 13
	oldest_ped_time = ped_13_time
ENDIF
 
IF ped_14_exists = 1
AND ped_14_time < oldest_ped_time
	oldest_ped = 14
	oldest_ped_time = ped_14_time
ENDIF
 
IF ped_15_exists = 1
AND ped_15_time < oldest_ped_time
	oldest_ped = 15
	oldest_ped_time = ped_15_time
ENDIF
 
///////////////////////////////////////
 
IF oldest_ped = 1
	REMOVE_BLIP ped_1_blip
	MARK_CHAR_AS_NO_LONGER_NEEDED ped_1
	PRINT_NOW KM5_2 2000 1 // "A Yardie has gone to ground."
	ped_1_exists = 0
	-- number_of_peds
ENDIF
 
IF oldest_ped = 2
	REMOVE_BLIP ped_2_blip
	MARK_CHAR_AS_NO_LONGER_NEEDED ped_2
	PRINT_NOW KM5_2 2000 1 // "A Yardie has gone to ground."
	ped_2_exists = 0
	-- number_of_peds
ENDIF
 
IF oldest_ped = 3
	REMOVE_BLIP ped_3_blip
	MARK_CHAR_AS_NO_LONGER_NEEDED ped_3
	PRINT_NOW KM5_2 2000 1 // "A Yardie has gone to ground."
	ped_3_exists = 0
	-- number_of_peds
ENDIF
 
IF oldest_ped = 4
	REMOVE_BLIP ped_4_blip
	MARK_CHAR_AS_NO_LONGER_NEEDED ped_4
	PRINT_NOW KM5_2 2000 1 // "A Yardie has gone to ground."
	ped_4_exists = 0
	-- number_of_peds
ENDIF
 
IF oldest_ped = 5
	REMOVE_BLIP ped_5_blip
	MARK_CHAR_AS_NO_LONGER_NEEDED ped_5
	PRINT_NOW KM5_2 2000 1 // "A Yardie has gone to ground."
	ped_5_exists = 0
	-- number_of_peds
ENDIF
 
IF oldest_ped = 6
	REMOVE_BLIP ped_6_blip
	MARK_CHAR_AS_NO_LONGER_NEEDED ped_6
	PRINT_NOW KM5_2 2000 1 // "A Yardie has gone to ground."
	ped_6_exists = 0
	-- number_of_peds
ENDIF
 
IF oldest_ped = 7
	REMOVE_BLIP ped_7_blip
	MARK_CHAR_AS_NO_LONGER_NEEDED ped_7
	PRINT_NOW KM5_2 2000 1 // "A Yardie has gone to ground."
	ped_7_exists = 0
	-- number_of_peds
ENDIF
 
IF oldest_ped = 8
	REMOVE_BLIP ped_8_blip
	MARK_CHAR_AS_NO_LONGER_NEEDED ped_8
	PRINT_NOW KM5_2 2000 1 // "A Yardie has gone to ground."
	ped_8_exists = 0
	-- number_of_peds
ENDIF
 
IF oldest_ped = 9
	REMOVE_BLIP ped_9_blip
	MARK_CHAR_AS_NO_LONGER_NEEDED ped_9
	PRINT_NOW KM5_2 2000 1 // "A Yardie has gone to ground."
	ped_9_exists = 0
	-- number_of_peds
ENDIF
 
IF oldest_ped = 10
	REMOVE_BLIP ped_10_blip
	MARK_CHAR_AS_NO_LONGER_NEEDED ped_10
	PRINT_NOW KM5_2 2000 1 // "A Yardie has gone to ground."
	ped_10_exists = 0
	-- number_of_peds
ENDIF
 
IF oldest_ped = 11
	REMOVE_BLIP ped_11_blip
	MARK_CHAR_AS_NO_LONGER_NEEDED ped_11
	PRINT_NOW KM5_2 2000 1 // "A Yardie has gone to ground."
	ped_11_exists = 0
	-- number_of_peds
ENDIF
 
IF oldest_ped = 12
	REMOVE_BLIP ped_12_blip
	MARK_CHAR_AS_NO_LONGER_NEEDED ped_12
	PRINT_NOW KM5_2 2000 1 // "A Yardie has gone to ground."
	ped_12_exists = 0
	-- number_of_peds
ENDIF
 
IF oldest_ped = 13
	REMOVE_BLIP ped_13_blip
	MARK_CHAR_AS_NO_LONGER_NEEDED ped_13
	PRINT_NOW KM5_2 2000 1 // "A Yardie has gone to ground."
	ped_13_exists = 0
	-- number_of_peds
ENDIF
 
IF oldest_ped = 14
	REMOVE_BLIP ped_14_blip
	MARK_CHAR_AS_NO_LONGER_NEEDED ped_14
	PRINT_NOW KM5_2 2000 1 // "A Yardie has gone to ground."
	ped_14_exists = 0
	-- number_of_peds
ENDIF
 
IF oldest_ped = 15
	REMOVE_BLIP ped_15_blip
	MARK_CHAR_AS_NO_LONGER_NEEDED ped_15
	PRINT_NOW KM5_2 2000 1 // "A Yardie has gone to ground."
	ped_15_exists = 0
	-- number_of_peds
ENDIF
 
RETURN
 
}
 
// Mission Kenji5 failed
 
mission_kenji5_failed:
PRINT_BIG ( M_FAIL ) 5000 1
PRINT_WITH_NUMBER_NOW KM5_3 minimum_kills 3000 1 // "You failed to kill at least ~1~ yardies."
RETURN
 
 
 
// mission Kenji5 passed
 
mission_kenji5_passed:
 
flag_kenji_mission5_passed = 1
PRINT_WITH_NUMBER_BIG m_pass 10000 5000 1
ADD_SCORE player 10000
IF dead_peds = 8
	PRINT_WITH_NUMBER_NOW KM5_4 dead_peds 3000 1 // "Congratulations you killed ~1~ Yardies."
ELSE
	reward_kills = dead_peds - minimum_kills
	reward_kills = reward_kills * 1000
	PRINT_WITH_2_NUMBERS_NOW KM5_5 dead_peds reward_kills 3000 1 // "Congratulations you killed ~1~ Yardies."
ENDIF	
CLEAR_WANTED_LEVEL player
REGISTER_MISSION_PASSED	KM5
PLAY_MISSION_PASSED_TUNE 1
PLAYER_MADE_PROGRESS 1
REMOVE_BLIP kenji_contact_blip
RETURN
 
 
 
// mission cleanup
 
mission_cleanup_kenji5:
 
flag_player_on_mission = 0
flag_player_on_kenji_mission = 0
 
REMOVE_BLIP ped_1_blip
REMOVE_BLIP ped_2_blip
REMOVE_BLIP ped_3_blip
REMOVE_BLIP ped_4_blip
REMOVE_BLIP ped_5_blip
REMOVE_BLIP ped_6_blip
REMOVE_BLIP ped_7_blip
REMOVE_BLIP ped_8_blip
 
REMOVE_BLIP ped_9_blip
REMOVE_BLIP ped_10_blip
REMOVE_BLIP ped_11_blip
REMOVE_BLIP ped_12_blip
REMOVE_BLIP ped_13_blip
REMOVE_BLIP ped_14_blip
REMOVE_BLIP ped_15_blip
 
CLEAR_ONSCREEN_COUNTER dead_peds
 
MARK_MODEL_AS_NO_LONGER_NEEDED PED_GANG_YARDIE_A
 
MISSION_HAS_FINISHED
 
RETURN
п · о · р
GTA III Grand Theft Auto III
Форматы файлов.a3d.anm.col.cfg.dff.dat.gxt.ide.ifp.img/.dir.ipl.raw/.sdt.rep.sc.scm.set.txd.zon
Документацияcarcols.datCHASE.DATCULLZONE.DATcuts.imgdefault.datfistfite.datflight.datgta3.exegta3.dat
gta3.imggta3.zonhandling.cfgmain.scmmap.datmap.zonobject.datparticle.cfgped.datpedgrp.dat
pedstats.datsfx.rawsurface.datTimeCyc.DATtracks.dattrain.datwater.datwaterpro.datweapon.dat
ИнструментыCLEOClump ViewerCol-IO‎Collision File Editor IIData toolDFF Viewerdffxbox2pcG-ToolsGTA Garage Mod Manager
GXT EditorGTA3 Limit AdjusterGTA3 Mission BuilderGTA3 PatcherIMG ToolKam's Max ScriptsMap Editor
Mod GeneratorMod InstallerMoo MapperPS2 TXD ModPS2 TXD ViewerResourse HackerRotation Calculator
RW AnalyzeViceTXDWater EditorSanny BuilderTXD ToolTXD WorkshopYAIEZModeler
Туториалыраздел в разработке
Классические МодыGPS RadarBye-Bye BikiniUltimate Stunt ParkThe SphereMiss LibertyIllandoIntercity HighwayShoreside Bridge
Rockstar HeightsLighthouse BridgeBlade FunparkOrbital CityLakeside IslandLiberty PenitentiaryJEM Island
Illando HelixCliff Climbing Mountain
Глобальные МодыReal GTA3Twenty TenSnow CityFrosted WinterUltimateBeta modX-box modBad BusinessGTA3 HDUltra mod
OpenTunnelsBack to the Future
МультиплеерMulti Theft AutoLiberty Unleashed
Исходники4x48ballambulanceasukaasusbcameracar_gencatcopcardebugdemodiablofiretruckfrankgates
genstufhealthhjhoodimportintrojoeykenjiloveluigimayhemmeatpickupsrampagerayrcswitch
taxitoniusjwantedyard