
//{ //Header
// Blast City - High Land - Shoreless Immortality - Tiny
// script and map by Elypter
// for details look at bc_hl_tiny_readme.txt 
// bc_hl_tiny.mis Compiled by Elypter on Freitag, 30. September 2011 with codesmith
//}

//{ //Declares
//{ //PlayerInits
PLAYER_PED p1 = (53.5, 55.5, 255.0) 10 90 
PLAYER_PED p2 = (55.5, 55.5, 255.0) 11 270
PLAYER_PED p3 = (53.5, 54.5, 255.0) 12 45 
PLAYER_PED p4 = (55.5, 56.5, 255.0) 13 225
PLAYER_PED p5 = (53.5, 56.5, 255.0) 14 135
PLAYER_PED p6 = (55.5, 54.5, 255.0) 15 315
//}

//{ //PlayerDeclares
    //{ //Player1
    COUNTER p1_expunch = 1
    COUNTER p1_trg_punched = 0
    CHAR_DATA p1_punched
    COUNTER p1_trg_gren = 0
    //}

    //{ //Player2
    COUNTER p2_expunch = 1
    COUNTER p2_trg_punched = 0
    CHAR_DATA p2_punched
    COUNTER p2_trg_gren = 0
    //}

    //{ //Player3
    COUNTER p3_expunch = 1
    COUNTER p3_trg_punched = 0
    CHAR_DATA p3_punched
    COUNTER p3_trg_gren = 0
    //}

    //{ //Player4
    COUNTER p4_expunch = 1
    COUNTER p4_trg_punched = 0
    CHAR_DATA p4_punched
    COUNTER p4_trg_gren = 0
    //}

    //{ //Player5
    COUNTER p5_expunch = 1
    COUNTER p5_trg_punched = 0
    CHAR_DATA p5_punched
    COUNTER p5_trg_gren = 0
    //}

    //{ //Player6
    COUNTER p6_expunch = 1
    COUNTER p6_trg_punched = 0
    CHAR_DATA p6_punched
    COUNTER p6_trg_gren = 0
    //}

//}

//#region declare
GENERATOR elec_1 = (56.0, 57.0, 7.0) 0 COLLECT_03 400 400 1
GENERATOR grenade_1 = (56.0, 54.0, 7.0) 0 COLLECT_04 400 400 99
GENERATOR fastr_1 = (53.0, 54.0, 7.0) 0 COLLECT_36 400 400 1
GENERATOR molotov_1 = (53.0, 57.0, 7.0) 0 COLLECT_05 400 400 99
//#endregion

//DESTRUCTOR dest1 = ( 55.0 , 55.0 , 6.0 ) (20.0 , 20.0)


MAP_ZONE info_l = ( 500 , 100 , 100 , 100 , 600 , 50 , 50 , 50 , 800 , 50 , 0 ) //no gang cars

COUNTER control = 1
COUNTER psum = 0
COUNTER dsum = 0
COUNTER osum = 0
COUNTER tsum = 0

ONSCREEN_COUNTER dummy_osc

COUNTER loop = 1
//}

LEVELSTART

//{ //Init
//ADD_ONSCREEN_COUNTER  (   dummy_osc  ,  tsum )

//#region init
SWITCH_GENERATOR   ( elec_1 , ON )
SWITCH_GENERATOR   ( grenade_1 , ON )
SWITCH_GENERATOR   ( fastr_1 , ON )
SWITCH_GENERATOR   ( molotov_1 , ON )
//#endregion
//}

WHILE_EXEC ( loop = 1 )

//{ //PlayerChecks
IF (CHECK_CHARACTER_HEALTH(p1, 0))
	
	SET_CHAR_INVINCIBLE (p1, ON)
	GIVE_WEAPON (  p1 , rocket_launcher, 99 )
	
	//{ //EXPLODE PUNCH
	IF ((( HAS_CHAR_PUNCHED_SOMEONE ( p1 ) ) AND ( p1_trg_punched = 0 ) ) AND ( p1_expunch = 1))
		STORE_LAST_CHAR_PUNCHED ( p1 , p1_punched )
		SET p1_trg_punched = 1
	ENDIF
	IF (( p1_trg_punched = 1 ) AND ( p1_expunch = 1))
		IF ( NOT ( DELAY ( 1 ) ) )
			EXPLODE (p1)
			SET p1_trg_punched = 0
		ENDIF
	ENDIF
	//}
	
	//{ //Molotov hit explosion
	IF((CHECK_WEAPON_TYPE_HIT_CHAR (p1, BY_ROCKET_LAUNCHER)) AND (CHECK_CHAR_CURR_WEAPON (p1, MOLOTOV)))
		EXPLODE_LARGE(p1)
	ENDIF
	//}
	
	IF(CHECK_CHAR_CURR_WEAPON (p1, GRENADE))
		IF ( p1_trg_gren > 0)
			--p1_trg_gren
		ENDIF
		IF ( p1_trg_gren = 0)
			EXPLODE_SMALL (p1)
			SET p1_trg_gren = 50
		ENDIF
	ENDIF
	IF(NOT(CHECK_CHAR_CURR_WEAPON (p1, GRENADE)))
		SET p1_trg_gren = 0
	ENDIF
	
	//{ //Controls ON/OFF
	IF (control=1)
		SET_ALL_CONTROLS_STATUS (p1, ON)
	ENDIF
	IF (control=0)
		SET_ALL_CONTROLS_STATUS (p1, OFF)
	ENDIF
	//}
	
	//{ //Death routines
	SET psum = (psum+1)
	IF(HAS_CHARACTER_DIED(p1))
		SET dsum = (dsum+1)
	ENDIF
	IF ( (IS_CHAR_FALLING(p1)) OR (NOT ( LOCATE_CHARACTER_ANY_MEANS ( p1, 55.0, 55.0, 7.0, 20.0, 20.0) )))
		IF (CHECK_CHARACTER_HEALTH(p1, 1))
			KILL_CHAR (p1)
		ENDIF
		SET dsum = (dsum+1)
		SET p1_trg_gren = 0
	ENDIF
	//}
ENDIF   

IF (CHECK_CHARACTER_HEALTH(p2, 0))
	
	SET_CHAR_INVINCIBLE (p2, ON)
	GIVE_WEAPON (  p2 , rocket_launcher, 99 )
	
	//{ //EXPLODE PUNCH
	IF ((( HAS_CHAR_PUNCHED_SOMEONE ( p2 ) ) AND ( p2_trg_punched = 0 ) ) AND ( p2_expunch = 1))
		STORE_LAST_CHAR_PUNCHED ( p2 , p2_punched )
		SET p2_trg_punched = 1
	ENDIF
	IF (( p2_trg_punched = 1 ) AND ( p2_expunch = 1))
		IF ( NOT ( DELAY ( 1 ) ) )
			EXPLODE (p2)
			SET p2_trg_punched = 0
		ENDIF
	ENDIF
	//}
	
	//{ //Molotov hit explosion
	IF((CHECK_WEAPON_TYPE_HIT_CHAR (p2, BY_ROCKET_LAUNCHER)) AND (CHECK_CHAR_CURR_WEAPON (p2, MOLOTOV)))
		EXPLODE_LARGE(p2)
	ENDIF
	//}
	
	IF(CHECK_CHAR_CURR_WEAPON (p2, GRENADE))
		IF ( p2_trg_gren > 0)
			--p2_trg_gren
		ENDIF
		IF ( p2_trg_gren = 0)
			EXPLODE_SMALL (p2)
			SET p2_trg_gren = 50
		ENDIF
	ENDIF
	IF(NOT(CHECK_CHAR_CURR_WEAPON (p2, GRENADE)))
		SET p2_trg_gren = 0
	ENDIF
	
	//{ //Controls ON/OFF
	IF (control=1)
		SET_ALL_CONTROLS_STATUS (p2, ON)
	ENDIF
	IF (control=0)
		SET_ALL_CONTROLS_STATUS (p2, OFF)
	ENDIF
	//}
	
	//{ //Death routines
	SET psum = (psum+1)
	IF(HAS_CHARACTER_DIED(p2))
		SET dsum = (dsum+1)
	ENDIF
	IF ( (IS_CHAR_FALLING(p2)) OR (NOT ( LOCATE_CHARACTER_ANY_MEANS ( p2, 55.0, 55.0, 7.0, 20.0, 20.0) )))
		IF (CHECK_CHARACTER_HEALTH(p2, 1))
			KILL_CHAR (p2)
		ENDIF
		SET dsum = (dsum+1)
		SET p2_trg_gren = 0
	ENDIF
	//}
ENDIF   

IF (CHECK_CHARACTER_HEALTH(p3, 0))
	
	SET_CHAR_INVINCIBLE (p3, ON)
	GIVE_WEAPON (  p3 , rocket_launcher, 99 )
	
	//{ //EXPLODE PUNCH
	IF ((( HAS_CHAR_PUNCHED_SOMEONE ( p3 ) ) AND ( p3_trg_punched = 0 ) ) AND ( p3_expunch = 1))
		STORE_LAST_CHAR_PUNCHED ( p3 , p3_punched )
		SET p3_trg_punched = 1
	ENDIF
	IF (( p3_trg_punched = 1 ) AND ( p3_expunch = 1))
		IF ( NOT ( DELAY ( 1 ) ) )
			EXPLODE (p3)
			SET p3_trg_punched = 0
		ENDIF
	ENDIF
	//}
	
	//{ //Molotov hit explosion
	IF((CHECK_WEAPON_TYPE_HIT_CHAR (p3, BY_ROCKET_LAUNCHER)) AND (CHECK_CHAR_CURR_WEAPON (p3, MOLOTOV)))
		EXPLODE_LARGE(p3)
	ENDIF
	//}
	
	IF(CHECK_CHAR_CURR_WEAPON (p3, GRENADE))
		IF ( p3_trg_gren > 0)
			--p3_trg_gren
		ENDIF
		IF ( p3_trg_gren = 0)
			EXPLODE_SMALL (p3)
			SET p3_trg_gren = 50
		ENDIF
	ENDIF
	IF(NOT(CHECK_CHAR_CURR_WEAPON (p3, GRENADE)))
		SET p3_trg_gren = 0
	ENDIF
	
	//{ //Controls ON/OFF
	IF (control=1)
		SET_ALL_CONTROLS_STATUS (p3, ON)
	ENDIF
	IF (control=0)
		SET_ALL_CONTROLS_STATUS (p3, OFF)
	ENDIF
	//}
	
	//{ //Death routines
	SET psum = (psum+1)
	IF(HAS_CHARACTER_DIED(p3))
		SET dsum = (dsum+1)
	ENDIF
	IF ( (IS_CHAR_FALLING(p3)) OR (NOT ( LOCATE_CHARACTER_ANY_MEANS ( p3, 55.0, 55.0, 7.0, 20.0, 20.0) )))
		IF (CHECK_CHARACTER_HEALTH(p3, 1))
			KILL_CHAR (p3)
		ENDIF
		SET dsum = (dsum+1)
		SET p3_trg_gren = 0
	ENDIF
	//}
ENDIF   

IF (CHECK_CHARACTER_HEALTH(p4, 0))
	
	SET_CHAR_INVINCIBLE (p4, ON)
	GIVE_WEAPON (  p4 , rocket_launcher, 99 )
	
	//{ //EXPLODE PUNCH
	IF ((( HAS_CHAR_PUNCHED_SOMEONE ( p4 ) ) AND ( p4_trg_punched = 0 ) ) AND ( p4_expunch = 1))
		STORE_LAST_CHAR_PUNCHED ( p4 , p4_punched )
		SET p4_trg_punched = 1
	ENDIF
	IF (( p4_trg_punched = 1 ) AND ( p4_expunch = 1))
		IF ( NOT ( DELAY ( 1 ) ) )
			EXPLODE (p4)
			SET p4_trg_punched = 0
		ENDIF
	ENDIF
	//}
	
	//{ //Molotov hit explosion
	IF((CHECK_WEAPON_TYPE_HIT_CHAR (p4, BY_ROCKET_LAUNCHER)) AND (CHECK_CHAR_CURR_WEAPON (p4, MOLOTOV)))
		EXPLODE_LARGE(p4)
	ENDIF
	//}
	
	IF(CHECK_CHAR_CURR_WEAPON (p4, GRENADE))
		IF ( p4_trg_gren > 0)
			--p4_trg_gren
		ENDIF
		IF ( p4_trg_gren = 0)
			EXPLODE_SMALL (p4)
			SET p4_trg_gren = 50
		ENDIF
	ENDIF
	IF(NOT(CHECK_CHAR_CURR_WEAPON (p4, GRENADE)))
		SET p4_trg_gren = 0
	ENDIF
	
	//{ //Controls ON/OFF
	IF (control=1)
		SET_ALL_CONTROLS_STATUS (p4, ON)
	ENDIF
	IF (control=0)
		SET_ALL_CONTROLS_STATUS (p4, OFF)
	ENDIF
	//}
	
	//{ //Death routines
	SET psum = (psum+1)
	IF(HAS_CHARACTER_DIED(p4))
		SET dsum = (dsum+1)
	ENDIF
	IF ( (IS_CHAR_FALLING(p4)) OR (NOT ( LOCATE_CHARACTER_ANY_MEANS ( p4, 55.0, 55.0, 7.0, 20.0, 20.0) )))
		IF (CHECK_CHARACTER_HEALTH(p4, 1))
			KILL_CHAR (p4)
		ENDIF
		SET dsum = (dsum+1)
		SET p4_trg_gren = 0
	ENDIF
	//}
ENDIF   

IF (CHECK_CHARACTER_HEALTH(p5, 0))
	
	SET_CHAR_INVINCIBLE (p5, ON)
	GIVE_WEAPON (  p5 , rocket_launcher, 99 )
	
	//{ //EXPLODE PUNCH
	IF ((( HAS_CHAR_PUNCHED_SOMEONE ( p5 ) ) AND ( p5_trg_punched = 0 ) ) AND ( p5_expunch = 1))
		STORE_LAST_CHAR_PUNCHED ( p5 , p5_punched )
		SET p5_trg_punched = 1
	ENDIF
	IF (( p5_trg_punched = 1 ) AND ( p5_expunch = 1))
		IF ( NOT ( DELAY ( 1 ) ) )
			EXPLODE (p5)
			SET p5_trg_punched = 0
		ENDIF
	ENDIF
	//}
	
	//{ //Molotov hit explosion
	IF((CHECK_WEAPON_TYPE_HIT_CHAR (p5, BY_ROCKET_LAUNCHER)) AND (CHECK_CHAR_CURR_WEAPON (p5, MOLOTOV)))
		EXPLODE_LARGE(p5)
	ENDIF
	//}
	
	IF(CHECK_CHAR_CURR_WEAPON (p5, GRENADE))
		IF ( p5_trg_gren > 0)
			--p5_trg_gren
		ENDIF
		IF ( p5_trg_gren = 0)
			EXPLODE_SMALL (p5)
			SET p5_trg_gren = 50
		ENDIF
	ENDIF
	IF(NOT(CHECK_CHAR_CURR_WEAPON (p5, GRENADE)))
		SET p5_trg_gren = 0
	ENDIF
	
	//{ //Controls ON/OFF
	IF (control=1)
		SET_ALL_CONTROLS_STATUS (p5, ON)
	ENDIF
	IF (control=0)
		SET_ALL_CONTROLS_STATUS (p5, OFF)
	ENDIF
	//}
	
	//{ //Death routines
	SET psum = (psum+1)
	IF(HAS_CHARACTER_DIED(p5))
		SET dsum = (dsum+1)
	ENDIF
	IF ( (IS_CHAR_FALLING(p5)) OR (NOT ( LOCATE_CHARACTER_ANY_MEANS ( p5, 55.0, 55.0, 7.0, 20.0, 20.0) )))
		IF (CHECK_CHARACTER_HEALTH(p5, 1))
			KILL_CHAR (p5)
		ENDIF
		SET dsum = (dsum+1)
		SET p5_trg_gren = 0
	ENDIF
	//}
ENDIF   

IF (CHECK_CHARACTER_HEALTH(p6, 0))
	
	SET_CHAR_INVINCIBLE (p6, ON)
	GIVE_WEAPON (  p6 , rocket_launcher, 99 )
	
	//{ //EXPLODE PUNCH
	IF ((( HAS_CHAR_PUNCHED_SOMEONE ( p6 ) ) AND ( p6_trg_punched = 0 ) ) AND ( p6_expunch = 1))
		STORE_LAST_CHAR_PUNCHED ( p6 , p6_punched )
		SET p6_trg_punched = 1
	ENDIF
	IF (( p6_trg_punched = 1 ) AND ( p6_expunch = 1))
		IF ( NOT ( DELAY ( 1 ) ) )
			EXPLODE (p6)
			SET p6_trg_punched = 0
		ENDIF
	ENDIF
	//}
	
	//{ //Molotov hit explosion
	IF((CHECK_WEAPON_TYPE_HIT_CHAR (p6, BY_ROCKET_LAUNCHER)) AND (CHECK_CHAR_CURR_WEAPON (p6, MOLOTOV)))
		EXPLODE_LARGE(p6)
	ENDIF
	//}
	
	IF(CHECK_CHAR_CURR_WEAPON (p6, GRENADE))
		IF ( p6_trg_gren > 0)
			--p6_trg_gren
		ENDIF
		IF ( p6_trg_gren = 0)
			EXPLODE_SMALL (p6)
			SET p6_trg_gren = 50
		ENDIF
	ENDIF
	IF(NOT(CHECK_CHAR_CURR_WEAPON (p6, GRENADE)))
		SET p6_trg_gren = 0
	ENDIF
	
	//{ //Controls ON/OFF
	IF (control=1)
		SET_ALL_CONTROLS_STATUS (p6, ON)
	ENDIF
	IF (control=0)
		SET_ALL_CONTROLS_STATUS (p6, OFF)
	ENDIF
	//}
	
	//{ //Death routines
	SET psum = (psum+1)
	IF(HAS_CHARACTER_DIED(p6))
		SET dsum = (dsum+1)
	ENDIF
	IF ( (IS_CHAR_FALLING(p6)) OR (NOT ( LOCATE_CHARACTER_ANY_MEANS ( p6, 55.0, 55.0, 7.0, 20.0, 20.0) )))
		IF (CHECK_CHARACTER_HEALTH(p6, 1))
			KILL_CHAR (p6)
		ENDIF
		SET dsum = (dsum+1)
		SET p6_trg_gren = 0
	ENDIF
	//}
ENDIF   


//}

//{ //Player Freeze Control
SET tsum = (psum-dsum)
IF ((tsum>=2) OR (psum=1))
	SET control=1
ELSE
	SET control=0
ENDIF
SET psum=0
SET dsum=0
SET tsum=0
//}
	
ENDWHILE

LEVELEND