// Decompiled from "mollyparty.scr" Using Epic GTA2 Script Decompiler by T.M.

PLAYER_PED p1 = (26.0, 19.5, 3.0) 6 270
PLAYER_PED p2 = (27.0, 19.5, 3.0) 9 90
PLAYER_PED p3 = (26.0, 20.5, 3.0) 6 270
PLAYER_PED p4 = (27.0, 20.5, 3.0) 9 90
PLAYER_PED p5 = (26.0, 21.5, 3.0) 6 270
PLAYER_PED p6 = (27.0, 21.5, 3.0) 9 90

CAR_DATA tvvan = (112.9, 128.4) 0 90 TVVAN
CAR_DATA swatvan1 = (114.9, 127.0,1.0) 0 345 SWATVAN
CAR_DATA swatvan2 = (120.9, 135.7) 0 315 SWATVAN
CAR_DATA swatvan3 = (123.1, 136.0) 0 190 SWATVAN
CAR_DATA swatvan4 = (121.6, 127.4) 0 90 SWATVAN
CAR_DATA fbi1 = (128.0, 126.0) 0 355 EDSELFBI
CAR_DATA fbi2 = (128.0, 127.4) 0 185 EDSELFBI
PARKED_CAR_DATA trailer = (104.0,205.0) 19 90 TRUKTRNS

MAP_ZONE tatort = ( 0 , 0 , 0 , 1000 , 1000 , 0 , 0 , 0 , 0 , 1000 , 0)
MAP_ZONE swat
MAP_ZONE tango

COUNTER playerCount=1

COUNTER p_swat=0

COUNTER p1_swat=0
COUNTER p2_swat=0
COUNTER p3_swat=0
COUNTER p4_swat=0
COUNTER p5_swat=0
COUNTER p6_swat=0

COUNTER p_h=0

COUNTER p1_h=0
COUNTER p2_h=0
COUNTER p3_h=0
COUNTER p4_h=0
COUNTER p5_h=0
COUNTER p6_h=0

CAR_DATA p_car

CAR_DATA p1_car
CAR_DATA p2_car
CAR_DATA p3_car
CAR_DATA p4_car
CAR_DATA p5_car
CAR_DATA p6_car


COUNTER resc=0
/*
COUNTER resc1=0
COUNTER resc2=0
COUNTER resc3=0
COUNTER resc4=0
*/

COUNTER current_player=0

COUNTER whileloop = 1


ARROW_DATA arrowTerror
ARROW_DATA arrowSafe

//machine+armor
GENERATOR swat1 = (118.25, 203.5, 3.0) 0 COLLECT_01 10 10 20
GENERATOR swat2 = (118.75, 203.5, 3.0) 0 COLLECT_31 10 10 10

//machine+grenades
GENERATOR swat3 = (118.25, 204.5, 3.0) 0 COLLECT_01 10 10 20
GENERATOR swat4 = (118.75, 204.5, 3.0) 0 COLLECT_05 10 10 10

//silenced
GENERATOR swat5 = (118.25, 205.5, 3.0) 0 COLLECT_09 10 10 20
GENERATOR swat6 = (118.75, 205.5, 3.0) 0 COLLECT_36 10 10 -1

//shotgun+armor
GENERATOR swat7 = (118.25, 206.5, 3.0) 0 COLLECT_06 10 10 20
GENERATOR swat8 = (118.75, 206.5, 3.0) 0 COLLECT_31 10 10 10

//invisble
GENERATOR swat9 = (118.5, 207.5, 3.0) 0 COLLECT_39 10 10 -1


//Double Pistol+double damage
GENERATOR tango1 = (124.25, 203.5, 3.0) 0 COLLECT_35 10 10 -1
GENERATOR tango2 = (124.75, 203.5, 3.0) 0 COLLECT_10 10 10 30

//molotov+shotgun
GENERATOR tango3 = (124.25, 204.5, 3.0) 0 COLLECT_04 10 10 10
GENERATOR tango4 = (124.75, 204.5, 3.0) 0 COLLECT_06 10 10 20

//Flamer
GENERATOR tango5 = (124.5, 205.5, 3.0) 0 COLLECT_08 10 10 10

//Rockets
GENERATOR tango6 = (124.5, 206.5, 3.0) 0 COLLECT_02 10 10 2

//Double+Fast
GENERATOR tango7 = (124.25, 207.5, 3.0) 0 COLLECT_35 10 10 -1
GENERATOR tango8 = (124.75, 207.5, 3.0) 0 COLLECT_36 10 10 -1


//Health in house
GENERATOR health = (109.5, 194.5, 3.0) 0 COLLECT_30  900 1000 -1


//molotov on roof
GENERATOR molov1 = (106.6, 133.4, 5.0) 0 COLLECT_04 400 600 5
GENERATOR molov2 = (107.0, 124.5, 6.0) 0 COLLECT_04 400 600 5

//electro finger
GENERATOR whatawitch = (109.5, 195.5, 3.0) 0 COLLECT_37 400 600 -1

//machine gun
GENERATOR gun1 = (126.5, 130.5, 6.0) 0 COLLECT_01 400 600 10


GENERATOR speedy = (119.6, 161.3, 3.0) 0 COLLECT_36 900 1000 -1

GENERATOR gun2 = (119.7, 180.7, 3.0) 0 COLLECT_09 400 600 10


//Objects

OBJ_DATA tower1  = (121.8, 134.2, 2.0) 0 TOWER
OBJ_DATA tower2  = (123.2, 134.2, 2.0) 0 TOWER 

OBJ_DATA box_obj  = (111.5, 179.6, 3.0) 0 BOXES 

OBJ_DATA fire_obj1  = (117.4, 179.4, 3.4) 0 FIRE
OBJ_DATA fire_obj2  = (117.7, 163.8, 3.0) 0 FIRE
OBJ_DATA fire_obj3  = (117.3, 163.4, 3.0) 0 FIRE
OBJ_DATA fire_obj4  = (118.0, 179.2, 4.0) 0 FIRE
OBJ_DATA fire_obj5  = (117.8, 179.7, 3.8) 0 FIRE

OBJ_DATA road_block  = (113.9, 128.5, 1.0) 90 ROADBLOCK
OBJ_DATA road_block1  = (113.9, 127.5, 1.0) 90 ROADBLOCK
OBJ_DATA road_block2  = (113.9, 125.5, 1.0) 90 ROADBLOCK


OBJ_DATA road_block3  = (128.2, 128.7, 1.0) 90 ROADBLOCK


OBJ_DATA phone  = (112.7, 176.3, 3.0) 90 PHONE 
OBJ_DATA bush  = (113.7, 176.3, 3.0) 90 BUSH  
OBJ_DATA bin  = (111.7, 176.3, 3.0) 90 BIN 
OBJ_DATA blaster  = (114.6, 177.5, 3.0) 0 BLASTER

OBJ_DATA hydrant  = (124.9, 128.9, 1.0) 0 HYDRANT


FORWARD mission_timer:
     //12 minutes in sec*frames per second(30)
	COUNTER timer_value=21600
	TIMER_DATA timer

	THREAD_TRIGGER mission_trigger = THREAD_WAIT_FOR_CHAR_IN_AREA_ANY_MEANS(
                                p1, 121.0, 204.5, 3.2, 4.0,4.0, mission_timer:)
SOUND techclub = (146.5, 119.5, 2.0) PRISON_RIOT PLAY_INSTANT

ONSCREEN_COUNTER screen

mission_timer:
 // Setup
  DELAY_HERE (360) // wait for Time Limit to go away

 // ADD_ONSCREEN_COUNTER (screen, timer_value) // test
	 DISPLAY_TIMER (timer, 720)

	 WHILE_EXEC (timer_value>0)
	   --timer_value
	 ENDWHILE
RETURN

LEVELSTART

SET_AMBIENT_LEVEL (0.2, 60)
DECLARE_POLICELEVEL (4)

techclub = CREATE_SOUND (146.5, 119.5, 2.0) PRISON_RIOT PLAY_FOREVER END

//ADD_ONSCREEN_COUNTER(screen,resc)

SET_CAR_EMERG_LIGHTS (swatvan1, ON)
SET_CAR_EMERG_LIGHTS (swatvan3, ON)
SET_CAR_EMERG_LIGHTS (fbi1, ON)
SET_CAR_EMERG_LIGHTS (fbi2, ON)

CHAR_DATA p

CHAR_DATA p_fan
CHAR_DATA p1_fan
CHAR_DATA p2_fan
CHAR_DATA p3_fan
CHAR_DATA p4_fan
CHAR_DATA p5_fan
CHAR_DATA p6_fan

CHAR_DATA h1 = (109.5, 165.5, 3.0) 22 180 NO_OCCUPATION
CHAR_DATA h2 = (111.5, 165.5, 3.0) 22 180 NO_OCCUPATION
CHAR_DATA h3 = (112.5, 165.5, 3.0) 22 90 NO_OCCUPATION
CHAR_DATA h4 = (110.5, 161.5, 3.0) 22 0 NO_OCCUPATION

COUNTER h1_saved=0
COUNTER h2_saved=0
COUNTER h3_saved=0
COUNTER h4_saved=0


CHAR_DATA gogoGirl = (146.5, 121.6, 1.0) 26 0 NO_OCCUPATION
SET_CHAR_GRAPHIC_TYPE (gogoGirl ,DUMMY_GRAPHIC , 26 ) 


ADD_PATROL_POINT(gogoGirl,147.4, 121.3, 1.0)

ADD_PATROL_POINT(gogoGirl,146.3, 122.1, 1.0)

SET_CHAR_MAX_RUNSPEED ( gogoGirl, 10000.0 )

/*
ADD_PATROL_POINT(gogoGirl,145.2, 121.3, 1.0)
ADD_PATROL_POINT(gogoGirl,145.3, 122.3, 1.0)
ADD_PATROL_POINT(gogoGirl,145.2, 121.3, 1.0)

ADD_PATROL_POINT(gogoGirl,147.2, 121.3, 1.0)
ADD_PATROL_POINT(gogoGirl,147.3, 122.3, 1.0)
ADD_PATROL_POINT(gogoGirl,147.2, 121.3, 1.0)
*/

SET_CHAR_THREAT_SEARCH(gogoGirl,NO_THREATS)
	SET_CHAR_THREAT_REACTION (gogoGirl, NO_REACTION)
	SET_CHAR_INVINCIBLE ( gogoGirl , ON )

//determine player count
IF ( CHECK_CHARACTER_HEALTH ( p1 , 0 ))
++playerCount
ENDIF
IF ( CHECK_CHARACTER_HEALTH ( p2 , 0 ))
++playerCount
ENDIF
IF ( CHECK_CHARACTER_HEALTH ( p3 , 0 ))
++playerCount
ENDIF
IF ( CHECK_CHARACTER_HEALTH ( p4 , 0 ))
++playerCount
ENDIF
IF ( CHECK_CHARACTER_HEALTH ( p5 , 0 ))
++playerCount
ENDIF
IF ( CHECK_CHARACTER_HEALTH ( p6 , 0 ))
++playerCount
ENDIF

EXEC

	SWITCH_GENERATOR (swat1, ON)
		SWITCH_GENERATOR (swat2, ON)
		SWITCH_GENERATOR (swat3, ON)
		SWITCH_GENERATOR (swat4, ON)
		SWITCH_GENERATOR (swat5, ON)
		SWITCH_GENERATOR (swat6, ON)
		SWITCH_GENERATOR (swat7, ON)
		SWITCH_GENERATOR (swat8, ON)
		SWITCH_GENERATOR (swat9, ON)


		SWITCH_GENERATOR (tango1, ON)
		SWITCH_GENERATOR (tango2, ON)
		SWITCH_GENERATOR (tango3, ON)
		SWITCH_GENERATOR (tango4, ON)
		SWITCH_GENERATOR (tango5, ON)
		SWITCH_GENERATOR (tango6, ON)
		SWITCH_GENERATOR (tango7, ON)
		SWITCH_GENERATOR (tango8, ON)
          
          
	SWITCH_GENERATOR (molov1, ON)
	SWITCH_GENERATOR (molov2, ON)
	SWITCH_GENERATOR (whatawitch, ON)
	SWITCH_GENERATOR (health, ON)
     
     
	SWITCH_GENERATOR (gun1, ON)
	SWITCH_GENERATOR (gun2, ON)
	SWITCH_GENERATOR (speedy, ON)


	// POINT_ARROW_AT(arrowTerror,116.0, 150.0, 3.0)
 	//POINT_ARROW_AT(arrowSafe,126.0, 123.0, 7.0)
ENDEXEC

SET_CHAR_THREAT_SEARCH(h1,NO_THREATS)
	SET_CHAR_THREAT_REACTION (h1, NO_REACTION)
	SET_CHAR_INVINCIBLE ( h1 , ON )

	SET_CHAR_THREAT_SEARCH(h2,NO_THREATS)
	SET_CHAR_THREAT_REACTION (h2, NO_REACTION)
     SET_CHAR_INVINCIBLE ( h2 , ON )

	SET_CHAR_THREAT_SEARCH(h3,NO_THREATS)
	SET_CHAR_THREAT_REACTION (h3, NO_REACTION)
	SET_CHAR_INVINCIBLE ( h3 , ON )

	SET_CHAR_THREAT_SEARCH(h4,NO_THREATS)
	SET_CHAR_THREAT_REACTION (h4, NO_REACTION)
	SET_CHAR_INVINCIBLE ( h4 , ON )
     
     DISPLAY_BRIEF ( 1540) //Intro text
    DISPLAY_BRIEF ( 1601) //Intro text
     

WHILE_EXEC (whileloop = 1)

SET current_player=1
		WHILE_EXEC(current_player<playerCount)
			IF(current_player=1)
				SET p=(p1+0)
				SET p_swat=(p1_swat+0)
				SET p_fan=(p1_fan+0)
				SET p_h=(p1_h+0)
				SET p_car=(p1_car+0)
			ENDIF
			IF(current_player=2)
				SET p=(p2+0)
				SET p_swat=(p2_swat+0)
				SET p_fan=(p2_fan+0)
				SET p_h=(p2_h+0)
				SET p_car=(p2_car+0)
			ENDIF
			IF(current_player=3)
				SET p=(p3+0)
				SET p_swat=(p3_swat+0)
				SET p_fan=(p3_fan+0)
				SET p_h=(p3_h+0)
				SET p_car=(p3_car+0)
			ENDIF
			IF(current_player=4)
				SET p=(p4+0)
				SET p_swat=(p4_swat+0)
				SET p_fan=(p4_fan+0)
				SET p_h=(p4_h+0)
				SET p_car=(p4_car+0)
			ENDIF
			IF(current_player=5)
				SET p=(p5+0)
				SET p_swat=(p5_swat+0)
				SET p_fan=(p5_fan+0)
				SET p_h=(p5_h+0)
				SET p_car=(p5_car+0)
			ENDIF
			IF(current_player=6)
				SET p=(p6+0)
				SET p_swat=(p6_swat+0)
				SET p_fan=(p6_fan+0)
				SET p_h=(p6_h+0)
				SET p_car=(p6_car+0)
			ENDIF

			IF ( CHECK_CHARACTER_HEALTH ( p , 0 ))

				//make players in start zone invincible 
				IF(IS_CHAR_IN_ZONE ( p , start))
					SET_CHAR_INVINCIBLE(p,ON)
                         GIVE_WEAPON(p,PISTOL,1)
				ENDIF
                    
                    IF(IS_CHAR_IN_ZONE ( p , chSwat))
					SET p_swat=1
                         WARP_FROM_CAR_TO_POINT (p, 120.5, 205.5, 4.3, 270)
				ENDIF
                    
                    IF(IS_CHAR_IN_ZONE ( p , chTango))
					SET p_swat=0
                         WARP_FROM_CAR_TO_POINT (p, 122.5, 205.5, 4.3, 90)
				ENDIF
				
//##LIGHTSWITCH JUST FOR TESTING
				IF (LOCATE_CHARACTER_ANY_MEANS(p, 102.50, 136.50, 1.00, 1.00, 1.00))
								 SET_AMBIENT_LEVEL (1.0, 60)
				ENDIF 
				IF (LOCATE_CHARACTER_ANY_MEANS(p, 104.50, 136.50, 1.00, 1.00, 1.00))
								 SET_AMBIENT_LEVEL (0.3, 60)
				ENDIF 
//#####################################################################################
//#SWAT MAP # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
//#####################################################################################
				IF (LOCATE_CHARACTER_ANY_MEANS(p, 120.50, 208.5, 4.00, 1.00, 1.00)) 						//mapbutton
				 WARP_FROM_CAR_TO_POINT (p, 25.50, 51.5, 1.3, 55) 																					   //map
				ENDIF
  		IF (LOCATE_CHARACTER_ANY_MEANS(p, 29.2, 54.2, 1.00, 1.00, 1.00)) 						   //map end
				 WARP_FROM_CAR_TO_POINT (p, 120.5, 205.5, 4.3, 270)  																					//weaponchoice
				ENDIF

//#####################################################################################
//#TERROR MAP # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
//#####################################################################################
				IF (LOCATE_CHARACTER_ANY_MEANS(p, 122.50, 208.5, 4.00, 1.00, 1.00)) 						//mapbutton
				 WARP_FROM_CAR_TO_POINT (p, 25.50, 61.5, 1.3, 55) 																					   //map
				ENDIF
  		IF (LOCATE_CHARACTER_ANY_MEANS(p, 29.2, 64.2, 1.00, 1.00, 1.00)) 						   //map end
				 WARP_FROM_CAR_TO_POINT (p, 122.5, 205.5, 4.3, 90)   																	 			//weaponchoice
				ENDIF	
							
//#####################################################################################
//#Kidnapgarden # House # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
//#####################################################################################
     /*
				IF (LOCATE_CHARACTER_ANY_MEANS(p, 125.50, 131.50, 5.00, 1.00, 1.00))						//rooftop
     IF( (p_fan > 0)OR(p_fan<0) )
      IF(LOCATE_CHARACTER_ANY_MEANS(p_fan, 125.50, 131.50, 5.00, 2.50, 2.50)) //rooftop
       DELETE_ITEM (p_fan)
       p_fan = CREATE_CHAR (118.50, 149.50, 4.30) 22 0 NO_OCCUPATION END						//5th floor
						 SET_CHAR_OBJECTIVE(p_fan, GOTO_CHAR_ON_FOOT, p)
       SET_CHAR_THREAT_SEARCH(p_fan,NO_THREATS)
				   SET_CHAR_THREAT_REACTION (p_fan, NO_REACTION)
						ENDIF
     ENDIF
     WARP_FROM_CAR_TO_POINT (p, 117.50, 149.50, 3.30, 270) 																			//5th floor
				ENDIF
				//-																																																																							
				IF (LOCATE_CHARACTER_ANY_MEANS(p, 118.50, 149.50, 4.00, 1.00, 1.00))						//5th floor
     IF((p_fan > 0)OR(p_fan<0))
      IF (LOCATE_CHARACTER_ANY_MEANS(p_fan, 118.50, 149.50, 3.00, 2.50, 2.50))//5th floor
       DELETE_ITEM (p_fan)
       p_fan = CREATE_CHAR (124.50, 131.50, 6.30) 22 0 NO_OCCUPATION END						//rooftop
						 SET_CHAR_OBJECTIVE(p_fan, GOTO_CHAR_ON_FOOT, p)
       SET_CHAR_THREAT_SEARCH(p_fan,NO_THREATS)
				   SET_CHAR_THREAT_REACTION (p_fan, NO_REACTION)                          
						ENDIF
     ENDIF
				 WARP_FROM_CAR_TO_POINT (p, 124.50, 131.50, 6.30, 270) 																			// rooftop
				ENDIF
                    */
                    
                    IF (LOCATE_CHARACTER_ANY_MEANS(p, 125.50, 131.50, 5.00, 1.00, 1.00))						//rooftop
					IF(NOT(p_fan=0))
      IF(LOCATE_CHARACTER_ANY_MEANS(p_fan, 125.50, 131.50, 5.00, 2.50, 2.50)) //rooftop
       DELETE_ITEM (p_fan)
      p_fan = CREATE_CHAR (118.50, 164.50, 4.30) 22 0 NO_OCCUPATION END						//4th floor
						 SET_CHAR_OBJECTIVE(p_fan, GOTO_CHAR_ON_FOOT, p)
       SET_CHAR_THREAT_SEARCH(p_fan,NO_THREATS)
				   SET_CHAR_THREAT_REACTION (p_fan, NO_REACTION)
						ENDIF
     ENDIF
     WARP_FROM_CAR_TO_POINT (p, 117.50, 164.50, 3.30, 270) 	//4th floor
				ENDIF
				//-																																																																							
				IF (LOCATE_CHARACTER_ANY_MEANS(p, 118.50, 164.50, 4.00, 1.00, 1.00))							//4th floor
					IF(NOT(p_fan=0))
      IF (LOCATE_CHARACTER_ANY_MEANS(p_fan, 118.50, 164.50, 3.00, 2.50, 2.50))//4th floor
       DELETE_ITEM (p_fan)
       p_fan = CREATE_CHAR (124.50, 131.50, 6.30) 22 0 NO_OCCUPATION END						//rooftop
						 SET_CHAR_OBJECTIVE(p_fan, GOTO_CHAR_ON_FOOT, p)
       SET_CHAR_THREAT_SEARCH(p_fan,NO_THREATS)
				   SET_CHAR_THREAT_REACTION (p_fan, NO_REACTION)                          
						ENDIF
     ENDIF
				 WARP_FROM_CAR_TO_POINT (p, 124.50, 131.50, 6.30, 270) 																			// rooftop
				ENDIF
                    
                    
				//-----------------------------------------------------------------------------------
                    /*
				IF (LOCATE_CHARACTER_ANY_MEANS(p, 118.50, 148.50, 2.00, 1.00, 1.00)) 					//5th floor
     IF ( (p_fan > 0)OR(p_fan<0) )
      IF (LOCATE_CHARACTER_ANY_MEANS(p_fan, 118.50, 148.50, 2.00, 2.50, 2.50))//5th floor
       DELETE_ITEM(p_fan)
       p_fan = CREATE_CHAR (118.50, 164.50, 4.30) 22 0 NO_OCCUPATION END						//4th floor
				   SET_CHAR_OBJECTIVE(p_fan, GOTO_CHAR_ON_FOOT, p)
       SET_CHAR_THREAT_SEARCH(p_fan,NO_THREATS)
	      SET_CHAR_THREAT_REACTION (p_fan, NO_REACTION) 
			   ENDIF
     ENDIF
     WARP_FROM_CAR_TO_POINT (p, 117.50, 164.50, 3.30, 270) 																   //4th floor
				ENDIF
				//-																																																																							
				IF (LOCATE_CHARACTER_ANY_MEANS(p, 118.50, 164.50, 4.00, 1.00, 1.00))						//4th floor
				 IF ((p_fan > 0)OR(p_fan<0) )
      IF (LOCATE_CHARACTER_ANY_MEANS(p_fan, 118.50, 164.50, 3.00, 2.50, 2.50))//4th floor
       DELETE_ITEM(p_fan)
       p_fan = CREATE_CHAR (118.50, 148.50, 2.30) 22 0 NO_OCCUPATION END
						 SET_CHAR_OBJECTIVE(p_fan, GOTO_CHAR_ON_FOOT, p)
       SET_CHAR_THREAT_SEARCH(p_fan,NO_THREATS)
				   SET_CHAR_THREAT_REACTION (p_fan, NO_REACTION) 																									//5th floor
				  ENDIF
     ENDIF
			  WARP_FROM_CAR_TO_POINT (p, 117.50, 148.50, 3.30, 270) 																			//5th floor
    ENDIF
    
    */
				//-----------------------------------------------------------------------------------
				IF (LOCATE_CHARACTER_ANY_MEANS(p, 113.50, 160.7, 3.00, 1.00, 1.00)) 						//4th floor (fire)
					IF(NOT(p_fan=0))
      IF(LOCATE_CHARACTER_ANY_MEANS(p_fan, 113.50, 160.7, 3.00, 2.50, 2.50)) 	//4th floor (fire)
       DELETE_ITEM(p_fan)
       p_fan = CREATE_CHAR (121.50, 129.5, 4.0) 22 0 NO_OCCUPATION END
				   SET_CHAR_OBJECTIVE(p_fan, GOTO_CHAR_ON_FOOT, p)
    			SET_CHAR_THREAT_SEARCH(p_fan,NO_THREATS)
	   			SET_CHAR_THREAT_REACTION (p_fan, NO_REACTION) 																									//4thfireesc
						ENDIF
     ENDIF
				 WARP_FROM_CAR_TO_POINT (p, 121.50, 128.7, 4.3, 180) 																					//4thfireesc
				ENDIF
				//-																																																																							
				IF (LOCATE_CHARACTER_ANY_MEANS(p, 121.50, 129.3, 4.00, 1.00, 1.00))							//4thfireesc
					IF(NOT(p_fan=0))
      IF (LOCATE_CHARACTER_ANY_MEANS(p_fan, 121.50, 129.3, 4.00, 2.50, 2.50))	//4thfireesc
       DELETE_ITEM (p_fan)
       p_fan = CREATE_CHAR (113.50, 160.5, 3.0) 22 0 NO_OCCUPATION END
						 SET_CHAR_OBJECTIVE(p_fan, GOTO_CHAR_ON_FOOT, p)
       SET_CHAR_THREAT_SEARCH(p_fan,NO_THREATS)
				   SET_CHAR_THREAT_REACTION (p_fan, NO_REACTION) 																									//4th floor (fire)
			   ENDIF
     ENDIF
				 WARP_FROM_CAR_TO_POINT (p, 113.50, 161.3, 3.3, 0) 																							//4th floor (fire)
				ENDIF
								//-------------------------------------------------------------------------------
				IF (LOCATE_CHARACTER_ANY_MEANS(p, 110.50, 175.7, 3.00, 1.00, 1.00)) 						//3rd floor (fire)
					IF(NOT(p_fan=0))
      IF (LOCATE_CHARACTER_ANY_MEANS(p_fan, 110.50, 175.7, 3.00, 2.50, 2.500))//3rd floor (fire)
       DELETE_ITEM(p_fan)
       p_fan = CREATE_CHAR (118.50, 129.5, 3.0) 22 0 NO_OCCUPATION END								//3rdfireesc
							SET_CHAR_OBJECTIVE(p_fan, GOTO_CHAR_ON_FOOT, p)
       SET_CHAR_THREAT_SEARCH(p_fan,NO_THREATS)
			   	SET_CHAR_THREAT_REACTION (p_fan, NO_REACTION) 																									
						ENDIF
     ENDIF
			  WARP_FROM_CAR_TO_POINT (p, 118.50, 128.7, 3.3, 180) 																					//3rdfireesc
				ENDIF
				//-																																																																							
				IF (LOCATE_CHARACTER_ANY_MEANS(p, 118.50, 129.3, 3.00, 1.00, 1.00))							//3rdfireesc
					IF(NOT(p_fan=0))
      IF (LOCATE_CHARACTER_ANY_MEANS(p_fan, 118.50, 129.3, 3.00, 2.50, 2.50))	//3rdfireesc
       DELETE_ITEM (p_fan)
       p_fan = CREATE_CHAR (110.50, 175.5, 3.0) 22 0 NO_OCCUPATION END								//3rd floor (fire)
						 SET_CHAR_OBJECTIVE(p_fan, GOTO_CHAR_ON_FOOT, p)
       SET_CHAR_THREAT_SEARCH(p_fan,NO_THREATS)
				   SET_CHAR_THREAT_REACTION (p_fan, NO_REACTION) 																									
						ENDIF
     ENDIF
				 WARP_FROM_CAR_TO_POINT (p, 110.50, 176.3, 3.3, 0) 																							//3rd floor (fire)
				ENDIF
				//-----------------------------------------------------------------------------------
				IF (LOCATE_CHARACTER_ANY_MEANS(p, 118.50, 178.50, 2.00, 1.00, 1.00)) 					//3rd floor
					IF(NOT(p_fan=0))
      IF(LOCATE_CHARACTER_ANY_MEANS(p_fan, 118.50, 178.50, 2.00, 2.50, 2.50))	//3rd floor
       DELETE_ITEM(p_fan)
       p_fan = CREATE_CHAR (117.50, 194.50, 4.30) 22 0 NO_OCCUPATION END						//2nd floor
						 SET_CHAR_OBJECTIVE(p_fan, GOTO_CHAR_ON_FOOT, p)
       SET_CHAR_THREAT_SEARCH(p_fan,NO_THREATS)
				   SET_CHAR_THREAT_REACTION (p_fan, NO_REACTION) 																									
						ENDIF
     ENDIF
				 WARP_FROM_CAR_TO_POINT (p, 117.50, 194.50, 3.30, 270) 																			//2nd floor
				ENDIF
				//-																																																																							
				IF (LOCATE_CHARACTER_ANY_MEANS(p, 118.50, 194.50, 4.00, 1.00, 1.00))						//2nd floor
					IF(NOT(p_fan=0))
      IF (LOCATE_CHARACTER_ANY_MEANS(p_fan, 118.50, 194.50, 3.00, 2.50, 2.50))//2nd floor
       DELETE_ITEM(p_fan)
       p_fan = CREATE_CHAR (117.50, 178.50, 2.30) 22 0 NO_OCCUPATION END
						 SET_CHAR_OBJECTIVE(p_fan, GOTO_CHAR_ON_FOOT, p)
       SET_CHAR_THREAT_SEARCH(p_fan,NO_THREATS)
				   SET_CHAR_THREAT_REACTION (p_fan, NO_REACTION)																										//3rd floor
						ENDIF
     ENDIF
				 WARP_FROM_CAR_TO_POINT (p, 117.50, 178.50, 3.30, 270) 																			//3rd floor
				ENDIF
				//-----------------------------------------------------------------------------------
				IF (LOCATE_CHARACTER_ANY_MEANS(p, 114.50, 196.80, 2.00, 1.00, 1.00)) 					//groundlvl
					IF(NOT(p_fan=0))
      IF(LOCATE_CHARACTER_ANY_MEANS(p_fan, 114.50, 196.80, 2.00,2.50, 2.50))		//groundlvl
       DELETE_ITEM (p_fan)
       p_fan = CREATE_CHAR (122.50, 133.90, 1.3) 22 0 NO_OCCUPATION END							//courtyard
						 SET_CHAR_OBJECTIVE(p_fan, GOTO_CHAR_ON_FOOT, p)
       SET_CHAR_THREAT_SEARCH(p_fan,NO_THREATS)
				   SET_CHAR_THREAT_REACTION (p_fan, NO_REACTION) 																									
						ENDIF
     ENDIF
				 WARP_FROM_CAR_TO_POINT (p, 122.50, 133.90, 1.30, 0) 																					//courtyard
				ENDIF
				//-																																																																							
				IF (LOCATE_CHARACTER_ANY_MEANS(p, 122.50, 133.20, 1.00, 1.00, 1.00))						//courtyard
				IF(NOT(p_fan=0))
      IF (LOCATE_CHARACTER_ANY_MEANS(p_fan, 122.50, 133.20, 1.00, 2.50, 2.50))//courtyard
       DELETE_ITEM (p_fan)
       p_fan = CREATE_CHAR (114.50, 196.10, 2.30) 22 0 NO_OCCUPATION END
						 SET_CHAR_OBJECTIVE(p_fan, GOTO_CHAR_ON_FOOT, p)
       SET_CHAR_THREAT_SEARCH(p_fan,NO_THREATS)
				   SET_CHAR_THREAT_REACTION (p_fan, NO_REACTION) 																									//groundlvl
			   ENDIF
     ENDIF
				 WARP_FROM_CAR_TO_POINT (p, 114.50, 196.10, 2.30, 180) 																			//groundlvl
				ENDIF
				//----------------------------------------------------------------------------------
				IF (LOCATE_CHARACTER_ANY_MEANS(p, 114.50, 190.20, 2.00, 1.00, 1.00)) 					//entrance
				IF(NOT(p_fan=0))
      IF(LOCATE_CHARACTER_ANY_MEANS(p_fan, 114.50, 190.20, 2.00, 2.50, 2.50))	//entrance
       DELETE_ITEM (p_fan)
       p_fan = CREATE_CHAR (122.50, 129.20, 1.3) 22 0 NO_OCCUPATION END							//street
						 SET_CHAR_OBJECTIVE(p_fan, GOTO_CHAR_ON_FOOT, p)
       SET_CHAR_THREAT_SEARCH(p_fan,NO_THREATS)
				   SET_CHAR_THREAT_REACTION (p_fan, NO_REACTION) 																									
						ENDIF
     ENDIF
				 WARP_FROM_CAR_TO_POINT (p, 122.50, 129.20, 1.30, 180) 																			//street
				ENDIF
				//-																																																																							
				IF (LOCATE_CHARACTER_ANY_MEANS(p, 122.50, 129.80, 1.00, 1.00, 1.00))						//street
				IF(NOT(p_fan=0))
      IF (LOCATE_CHARACTER_ANY_MEANS(p_fan, 122.50, 129.80, 1.00, 2.50, 2.50))//street
       DELETE_ITEM (p_fan)
       p_fan = CREATE_CHAR (114.50, 190.80, 2.30) 22 0 NO_OCCUPATION END						//entrance
				   SET_CHAR_OBJECTIVE(p_fan, GOTO_CHAR_ON_FOOT, p)
       SET_CHAR_THREAT_SEARCH(p_fan,NO_THREATS)
			    SET_CHAR_THREAT_REACTION (p_fan, NO_REACTION) 																									
						ENDIF
     ENDIF
				 WARP_FROM_CAR_TO_POINT (p, 114.50, 190.80, 2.30, 0) 																					//entrance
				ENDIF
//######################################################################################
//# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
//######################################################################################

				//Spawn points for SWAT
				IF(LOCATE_CHARACTER_ON_FOOT(p,118.5, 203.5, 3.0,1.0,1.0))
					SWITCH_GENERATOR (swat1, OFF)
					SWITCH_GENERATOR (swat2, OFF)
				ENDIF
				IF(LOCATE_CHARACTER_ON_FOOT(p,118.5, 204.5, 3.0,1.0,1.0))
					SWITCH_GENERATOR (swat3, OFF)
					SWITCH_GENERATOR (swat4, OFF)
				ENDIF
				IF(LOCATE_CHARACTER_ON_FOOT(p,118.5, 205.5, 3.0,1.0,1.0))
					SWITCH_GENERATOR (swat5, OFF)
					SWITCH_GENERATOR (swat6, OFF)
				ENDIF
				IF(LOCATE_CHARACTER_ON_FOOT(p,118.5, 206.5, 3.0,1.0,1.0))
					SWITCH_GENERATOR (swat7, OFF)
					SWITCH_GENERATOR (swat8, OFF)
				ENDIF
                    IF(LOCATE_CHARACTER_ON_FOOT(p,118.5, 207.5, 3.0,1.0,1.0))
					SWITCH_GENERATOR (swat9, OFF)
				ENDIF


				IF(IS_CHAR_IN_GANGZONE ( p , swat))
					SET_CHAR_GRAPHIC_TYPE (p, EMERG_GRAPHIC, -1)
					SET_CHAR_INVINCIBLE ( p , OFF )
					SWITCH_GENERATOR (swat1, ON)
					SWITCH_GENERATOR (swat2, ON)
					SWITCH_GENERATOR (swat3, ON)
					SWITCH_GENERATOR (swat4, ON)
					SWITCH_GENERATOR (swat5, ON)
					SWITCH_GENERATOR (swat6, ON)
					SWITCH_GENERATOR (swat7, ON)
					SWITCH_GENERATOR (swat8, ON)
					SWITCH_GENERATOR (swat9, ON)
				//	WARP_FROM_CAR_TO_POINT (p, 122.4, 131.5, 6.2, 180)
                         
                         IF(IS_CHAR_IN_ZONE ( p , swa1))
					     WARP_FROM_CAR_TO_POINT ( p , 122.5, 123.5, 7.5 , 0 )
                         ENDIF 
                         IF(IS_CHAR_IN_ZONE ( p , swa2))
					     WARP_FROM_CAR_TO_POINT ( p , 110.5, 138.6, 1.3 , 90 )
                         ENDIF 
                         IF(IS_CHAR_IN_ZONE ( p , swa3))
					     WARP_FROM_CAR_TO_POINT ( p , 122.5, 123.5, 7.5 , 0 )
                         ENDIF
                         IF(IS_CHAR_IN_ZONE ( p , swa4))
					     WARP_FROM_CAR_TO_POINT ( p , 126.5, 125.6, 1.3 , 0 )
                         ENDIF
                         IF(IS_CHAR_IN_ZONE ( p , swa5))
					     WARP_FROM_CAR_TO_POINT ( p , 120.4, 123.5, 6.3 , 0 )
                         ENDIF
                    
				ENDIF


				//Spawn points for tangos

				IF(LOCATE_CHARACTER_ON_FOOT(p,124.5, 203.5, 3.0,1.0,1.0))
					SWITCH_GENERATOR (tango1, OFF)
					SWITCH_GENERATOR (tango2, OFF)
				ENDIF
				IF(LOCATE_CHARACTER_ON_FOOT(p,124.5, 204.5, 3.0,1.0,1.0))
					SWITCH_GENERATOR (tango3, OFF)
					SWITCH_GENERATOR (tango4, OFF)
				ENDIF
				IF(LOCATE_CHARACTER_ON_FOOT(p,124.5, 205.5, 3.0,1.0,1.0))
					SWITCH_GENERATOR (tango5, OFF)
				ENDIF
				IF(LOCATE_CHARACTER_ON_FOOT(p,124.5, 206.5, 3.0,1.0,1.0))
					SWITCH_GENERATOR (tango6, OFF)
				ENDIF
				IF(LOCATE_CHARACTER_ON_FOOT(p,124.5, 207.5, 3.0,1.0,1.0))
					SWITCH_GENERATOR (tango7, OFF)
					SWITCH_GENERATOR (tango8, OFF)
				ENDIF

				IF(IS_CHAR_IN_GANGZONE ( p , tango))
					SET_CHAR_GRAPHIC_TYPE (p, EMERG_GRAPHIC, 10)
					SET_CHAR_INVINCIBLE ( p , OFF )
					SWITCH_GENERATOR (tango1, ON)
					SWITCH_GENERATOR (tango2, ON)
					SWITCH_GENERATOR (tango3, ON)
					SWITCH_GENERATOR (tango4, ON)
					SWITCH_GENERATOR (tango5, ON)
					SWITCH_GENERATOR (tango6, ON)
					SWITCH_GENERATOR (tango7, ON)
					SWITCH_GENERATOR (tango8, ON)
                         
                         IF(IS_CHAR_IN_ZONE ( p , tan1))
					     WARP_FROM_CAR_TO_POINT (p, 112.5, 180.5, 3.3, 180)
                         ENDIF 
                         IF(IS_CHAR_IN_ZONE ( p , tan2))
					     WARP_FROM_CAR_TO_POINT (p,111.5, 161.4, 3.3, 0)
                         ENDIF 
                         IF(IS_CHAR_IN_ZONE ( p , tan3))
					     WARP_FROM_CAR_TO_POINT (p, 117.5, 133.5, 6.3, 90)
                         ENDIF 
                         IF(IS_CHAR_IN_ZONE ( p , tan4))
					     WARP_FROM_CAR_TO_POINT ( p , 109.5, 131.5, 5.3 , 180 )
                         ENDIF 
                         IF(IS_CHAR_IN_ZONE ( p , tan5))
					     WARP_FROM_CAR_TO_POINT ( p , 127.5, 134.5, 1.3 , 270 )
                         ENDIF 
                         
				ENDIF
                    
                    IF(p_swat=0)
                         ALTER_WANTED_LEVEL_NO_DROP ( p , 2 )     
                         IF(HAS_CHARACTER_DIED(p))
                              IF(NOT(IS_CHARACTER_IN_ANY_CAR (p)))
                                   WARP_FROM_CAR_TO_POINT (p, 122.5, 205.5, 4.3, 90)
                              ENDIF
                         ENDIF
                    ENDIF


				IF(p_swat=1)
     CLEAR_WANTED_LEVEL (p)
     
                         IF(HAS_CHARACTER_DIED(p))
                              IF(NOT(IS_CHARACTER_IN_ANY_CAR (p)))
                              WARP_FROM_CAR_TO_POINT (p, 120.5, 205.5, 4.3, 270)
                              ENDIF
                         ENDIF
     
     
					IF(NOT(p_fan=0))
 					
						IF(IS_CHAR_OBJECTIVE_PASSED(p_fan))
	 				 IF(IS_CHARACTER_IN_MODEL(p,SWATVAN))
		 				 STORE_CAR_CHARACTER_IS_IN (p, p_car)
			 				SET_CHAR_OBJECTIVE (p_fan, ENTER_CAR_AS_PASSENGER, p_car)
       ENDIF
       IF(NOT(IS_CHARACTER_IN_ANY_CAR (p)))
        IF(IS_CHARACTER_IN_ANY_CAR (p_fan))
         SET_CHAR_OBJECTIVE (p_fan, LEAVE_CAR, p_car)
        ENDIF
        IF(NOT(IS_CHARACTER_IN_ANY_CAR (p_fan)))
						   SET_CHAR_OBJECTIVE(p_fan, GOTO_CHAR_ON_FOOT, p)
        ENDIF
       ENDIF
		    ENDIF

                         //hostage saved
					IF(IS_CHAR_IN_ZONE ( p_fan , safety ))
                              //DELETE_ITEM(p_fan)
                              
                              IF(p_h=1)
                                   SEt h1_saved=1
                              ENDIF
                              IF(p_h=2)
                                   SEt h2_saved=1
                              ENDIF
                              IF(p_h=3)
                                   SEt h3_saved=1
                              ENDIF
                              IF(p_h=4)
                                   SEt h4_saved=1
                              ENDIF
                              
                              SET_CHAR_OBJECTIVE(p_fan,GOTO_AREA_ON_FOOT,126.0, 123.0, 7.0 )
                              ++resc
						SET p_fan=0
                              SET p_h=0
                              
                              IF(resc=1)
                                   DISPLAY_BRIEF(5032) //nice
                              ENDIF
                              IF(resc=2)
                                   DISPLAY_BRIEF(5051) // raspberry ripple
                              ENDIF
                              IF(resc=3)
                                   DISPLAY_BRIEF(5050) //choctastic
                              ENDIF
					ENDIF

                       
					ENDIF
                         
                         
					IF(NOT(p_fan=0))
                           //cop with hostage died
                          IF( (HAS_CHARACTER_DIED(p)) OR (HAS_CHARACTER_DIED(p_fan)))
						 DELETE_ITEM (p_fan)
						IF(p_h=1)
                                   h1 = CREATE_CHAR (109.5, 165.5, 3.5) 22 180 NO_OCCUPATION END
							SET p_fan=(h1+0)
						ENDIF
						IF(p_h=2)
							h2 = CREATE_CHAR (111.5, 165.5, 3.5) 22 0 NO_OCCUPATION END
							SET p_fan=(h2+0)
						ENDIF
						IF(p_h=3)
					  h3 = CREATE_CHAR (112.5, 165.5, 3.5) 22 0 NO_OCCUPATION END
							SET p_fan=(h3+0)
						ENDIF
						IF(p_h=4)
							h4 = CREATE_CHAR (110.5, 161.5, 3.5) 22 0 NO_OCCUPATION END
							SET p_fan=(h4+0)
						ENDIF
						SET_CHAR_THREAT_SEARCH(p_fan,NO_THREATS)
						SET_CHAR_THREAT_REACTION (p_fan, NO_REACTION)
						SET_CHAR_INVINCIBLE ( p_fan , ON )

						SET p_fan=0
                              SET p_h=0
						ENDIF
                         ENDIF


					//Make hostages follow near player
					IF(p_fan=0)

                              IF(h1_saved=0)
						IF(LOCATE_ANOTHER_CHARACTER_ON_FOOT (p,h1,0.5,0.5) )
						     SET_CHAR_OBJECTIVE(h1, GOTO_CHAR_ON_FOOT, p)
							SET p_fan=(h1+0)
                                   SET p_h=1
						     SET_CHAR_INVINCIBLE ( p_fan , OFF )
                                    DISPLAY_BRIEF(6150) //gangsta
						ENDIF
                              ENDIF
                              IF(h2_saved=0)
						IF(LOCATE_ANOTHER_CHARACTER_ON_FOOT (p,h2,0.5,0.5) )
							SET_CHAR_OBJECTIVE(h2, GOTO_CHAR_ON_FOOT, p)
							SET p_fan=(h2+0)
                                   SET p_h=2
						     SET_CHAR_INVINCIBLE ( p_fan , OFF )
                                   DISPLAY_BRIEF(6152) //elvis
						ENDIF
                              ENDIF
                              IF(h3_saved=0)
						IF(LOCATE_ANOTHER_CHARACTER_ON_FOOT (p,h3,0.5,0.5) )
							SET_CHAR_OBJECTIVE(h3, GOTO_CHAR_ON_FOOT, p)
							SET p_fan=(h3+0)
                                   SET p_h=3
						     SET_CHAR_INVINCIBLE ( p_fan , OFF )
                                   DISPLAY_BRIEF(6153) //memme
						ENDIF
                              ENDIF
                              IF(h4_saved=0)
						IF(LOCATE_ANOTHER_CHARACTER_ON_FOOT (p,h4,0.5,0.5) )
							SET_CHAR_OBJECTIVE(h4, GOTO_CHAR_ON_FOOT, p)
							SET p_fan=(h4+0)
                                   SET p_h=4
						     SET_CHAR_INVINCIBLE ( p_fan , OFF )
                                    DISPLAY_BRIEF(6151) //chinese
						ENDIF
                              ENDIF

					ENDIF

				ENDIF


				IF(current_player=1)
					SET p1_swat=(p_swat+0)
					SET p1_fan=(p_fan+0)
					SET p1_h=(p_h+0)
					SET p1_car=(p_car+0)
				ENDIF
				IF(current_player=2)
					SET p2_swat=(p_swat+0)
					SET p2_fan=(p_fan+0)
					SET p2_h=(p_h+0)
					SET p2_car=(p_car+0)
				ENDIF
				IF(current_player=3)
					SET p3_swat=(p_swat+0)
					SET p3_fan=(p_fan+0)
					SET p3_h=(p_h+0)
					SET p3_car=(p_car+0)
				ENDIF
				IF(current_player=4)
					SET p4_swat=(p_swat+0)
					SET p4_fan=(p_fan+0)
					SET p4_h=(p_h+0)
					SET p4_car=(p_car+0)
				ENDIF
				IF(current_player=5)
					SET p5_swat=(p_swat+0)
					SET p5_fan=(p_fan+0)
					SET p5_h=(p_h+0)
					SET p5_car=(p_car+0)
				ENDIF
				IF(current_player=6)
					SET p6_swat=(p_swat+0)
					SET p6_fan=(p_fan+0)
					SET p6_h=(p_h+0)
					SET p6_car=(p_car+0)
				ENDIF

			ENDIF
			++current_player
		ENDWHILE
          
          
          IF ((IS_CAR_WRECKED (swatvan4)) OR ( NOT(IS_ITEM_ONSCREEN (swatvan4))) )
           IF(NOT(IS_CAR_IN_BLOCK(swatvan4, 121.6, 127.4, 1.0, 1.0, 1.0)))
               PUT_CAR_ON_TRAILER (swatvan4, trailer)
               DELETE_ITEM (swatvan4)
               swatvan4 = CREATE_CAR (121.6, 127.4, 2.0) 0 90 SWATVAN END
               GIVE_DRIVER_AND_BRAKE ( swatvan4 )
           ENDIF
          ENDIF
          
        /*  
//Car respawns
IF (IS_CAR_WRECKED (swatvan4))
 //IF (NOT (IS_POINT_ONSCREEN (121.6, 127.4, 1.0)) )
  IF (IS_CAR_IN_BLOCK(swatvan4, 121.6, 127.4, 1.0, 1.0, 1.0))
   PUT_CAR_ON_TRAILER (swatvan4, trailer)
   ENDIF
 DELETE_ITEM (swatvan4)
 swatvan4 = CREATE_CAR (121.6, 127.4, 2.0) 0 90 SWATVAN END
 GIVE_DRIVER_AND_BRAKE ( swatvan4 )
 //ENDIF
ENDIF
IF (NOT(IS_CAR_IN_BLOCK(swatvan4, 121.6, 127.4, 1.0, 1.0, 1.0)))
 IF (NOT(IS_ITEM_ONSCREEN (swatvan4)))
  //IF (NOT (IS_POINT_ONSCREEN (121.6, 127.4, 1.0)) )
   DELETE_ITEM (swatvan4)
   swatvan4 = CREATE_CAR (121.6, 127.4, 2.0) 0 90 SWATVAN END
   GIVE_DRIVER_AND_BRAKE ( swatvan4 )
  //ENDIF
 ENDIF
ENDIF
          */

		 IF(resc=4)   //( (resc1=1) AND (resc2=1) ) AND ((resc3=1) AND (resc4=1) ))
			SET whileloop=0
		 ENDIF

		 IF(timer_value=0)
			SET whileloop=0
		 ENDIF

	ENDWHILE
     
     
     IF(resc=4)   //( (resc1=1) AND (resc2=1) ) AND ((resc3=1) AND (resc4=1) ))
	          DISPLAY_MESSAGE (1124) // JOB COMPLETE!
               
               DELAY_HERE (200)
               
                SET current_player=1
		     WHILE_EXEC(current_player<playerCount)
			     IF(current_player=1)
                         SET p=(p1+0)
				     SET p_swat=(p1_swat+0)
			     ENDIF
			     IF(current_player=2)
                         SET p=(p2+0)
			          SET p_swat=(p2_swat+0)
			     ENDIF
			     IF(current_player=3)
                         SET p=(p3+0)
			     	SET p_swat=(p3_swat+0)
			     ENDIF
			     IF(current_player=4)
                         SET p=(p4+0)
		     		SET p_swat=(p4_swat+0)
		     	ENDIF
		     	IF(current_player=5)
                         SET p=(p5+0)
			     	SET p_swat=(p5_swat+0)
		     	ENDIF
		     	IF(current_player=6)
                         SET p=(p6+0)
			     	SET p_swat=(p6_swat+0)
		     	ENDIF

			     IF ( CHECK_CHARACTER_HEALTH ( p , 0 ))
                    IF(p_swat=1)
                         ADD_SCORE (p, 1000000)
                    ENDIF
                    ENDIF
                    
			++current_player
               ENDWHILE
               
		 ENDIF
           
            IF(timer_value=0)
			DISPLAY_MESSAGE (1125) // JOB FAILED
               
               DELAY_HERE (300)
               
               SET current_player=1
		     WHILE_EXEC(current_player<playerCount)
			      IF(current_player=1)
                         SET p=(p1+0)
				     SET p_swat=(p1_swat+0)
			     ENDIF
			     IF(current_player=2)
                         SET p=(p2+0)
			          SET p_swat=(p2_swat+0)
			     ENDIF
			     IF(current_player=3)
                         SET p=(p3+0)
			     	SET p_swat=(p3_swat+0)
			     ENDIF
			     IF(current_player=4)
                         SET p=(p4+0)
		     		SET p_swat=(p4_swat+0)
		     	ENDIF
		     	IF(current_player=5)
                         SET p=(p5+0)
			     	SET p_swat=(p5_swat+0)
		     	ENDIF
		     	IF(current_player=6)
                         SET p=(p6+0)
			     	SET p_swat=(p6_swat+0)
		     	ENDIF
			
                    IF ( CHECK_CHARACTER_HEALTH ( p , 0 ))

                    IF(p_swat=0)
                         ADD_SCORE (p, 1000000)
                    ENDIF
                    
                    ENDIF
                    
			++current_player
               ENDWHILE
               
		 ENDIF
     
     
           FINISH_LEVEL(NO_BONUS)
LEVELEND
