








PLAYER_PED p1 = (54.0, 55.0, 7.0) 10 90
COUNTER p1_expunch = 1
COUNTER p1_trg_punched = 0
CHAR_DATA p1_punched

PLAYER_PED p2 = (56.0, 55.0, 7.0) 11 270
COUNTER p2_expunch = 1
COUNTER p2_trg_punched = 0
CHAR_DATA p2_punched

PLAYER_PED p3 = (54.0, 54.0, 7.0) 12 45
COUNTER p3_expunch = 1
COUNTER p3_trg_punched = 0
CHAR_DATA p3_punched

PLAYER_PED p4 = (56.0, 56.0, 7.0) 13 225
COUNTER p4_expunch = 1
COUNTER p4_trg_punched = 0
CHAR_DATA p4_punched

PLAYER_PED p5 = (54.0, 56.0, 7.0) 14 135
COUNTER p5_expunch = 1
COUNTER p5_trg_punched = 0
CHAR_DATA p5_punched

PLAYER_PED p6 = (56.0, 54.0, 7.0) 15 315
COUNTER p6_expunch = 1
COUNTER p6_trg_punched = 0
CHAR_DATA p6_punched










GENERATOR elec_1 = (57.0, 57.0, 7.0) 0 COLLECT_03 400 400 1
GENERATOR fingers_1 = (57.0, 53.0, 7.0) 0 COLLECT_36 400 400 1
GENERATOR elec_2 = (53.0, 53.0, 7.0) 0 COLLECT_03 400 400 1
GENERATOR fingers_2 = (53.0, 57.0, 7.0) 0 COLLECT_36 400 400 1



SET_GANG_INFO ( high  , 12 , rocket_launcher , rocket_launcher , rocket_launcher , 5 , 110.5 , 109.5 , 2.0 , 1 , ICECREAM , 1 )
MAP_ZONE info_l = ( 500 , 100 , 100 , 100 , 600 , 50 , 50 , 50 , 800 , 50 , 0 ) 

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

ONSCREEN_COUNTER dummy_osc

COUNTER loop = 1
LEVELSTART



SWITCH_GENERATOR   ( elec_1 , ON )
SWITCH_GENERATOR   ( fingers_1 , ON )
SWITCH_GENERATOR   ( elec_2 , ON )
SWITCH_GENERATOR   ( fingers_2 , ON )


WHILE_EXEC ( loop = 1 )

SET psum=0
SET dsum=0
SET tsum=0

IF (CHECK_CHARACTER_HEALTH(p1, 0))
	SET_CHAR_INVINCIBLE (p1, ON)
	GIVE_WEAPON (  p1 , rocket_launcher, 99 )
	GIVE_WEAPON (  p1 , molotov, 99 )
	
	
	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_SMALL (p1_punched)
			SET p1_trg_punched = 0
		ENDIF
	ENDIF
	
	
	CHANGE_GANG_CHAR_RESPECT (high, p1, -5)
	IF (control=1)
		SET_ALL_CONTROLS_STATUS (p1, ON)
	ENDIF
	IF (control=0)
		SET_ALL_CONTROLS_STATUS (p1, OFF)
	ENDIF
	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)
	ENDIF

ENDIF


IF (CHECK_CHARACTER_HEALTH(p2, 0))
	SET_CHAR_INVINCIBLE (p2, ON)
	GIVE_WEAPON (  p2 , rocket_launcher, 99 )
	GIVE_WEAPON (  p2 , molotov, 99 )
	
	
	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 ( 0 ) ) )
			EXPLODE_SMALL (p2_punched)
			SET p2_trg_punched = 0
		ENDIF
	ENDIF
	

	CHANGE_GANG_CHAR_RESPECT (high, p2, -5)
	IF (control=1)
		SET_ALL_CONTROLS_STATUS (p2, ON)
	ELSE
		SET_ALL_CONTROLS_STATUS (p2, OFF)
	ENDIF
	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, 6.0, 20.0, 20.0) )))
		IF (CHECK_CHARACTER_HEALTH(p2, 1))
			KILL_CHAR (p2)
		ENDIF
		SET dsum = (dsum+1)
	ENDIF
ENDIF

IF (CHECK_CHARACTER_HEALTH(p3, 0))
	SET_CHAR_INVINCIBLE (p3, ON)
	GIVE_WEAPON (  p3 , rocket_launcher, 99 )
	GIVE_WEAPON (  p3 , molotov, 99 )
	
	
	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 ( 0 ) ) )
			EXPLODE_SMALL (p3_punched)
			SET p3_trg_punched = 0
		ENDIF
	ENDIF
	

	CHANGE_GANG_CHAR_RESPECT (high, p3, -5)
	IF (control=1)
		SET_ALL_CONTROLS_STATUS (p3, ON)
	ELSE
		SET_ALL_CONTROLS_STATUS (p3, OFF)
	ENDIF
	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, 6.0, 20.0, 20.0) )))
		IF (CHECK_CHARACTER_HEALTH(p3, 1))
			KILL_CHAR (p3)
		ENDIF
		SET dsum = (dsum+1)
	ENDIF
ENDIF

IF (CHECK_CHARACTER_HEALTH(p4, 0))
	SET_CHAR_INVINCIBLE (p4, ON)
	GIVE_WEAPON (  p4 , rocket_launcher, 99 )
	GIVE_WEAPON (  p4 , molotov, 99 )
	
	
	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 ( 0 ) ) )
			EXPLODE_SMALL (p4_punched)
			SET p4_trg_punched = 0
		ENDIF
	ENDIF
	

	CHANGE_GANG_CHAR_RESPECT (high, p4, -5)
	IF (control=1)
		SET_ALL_CONTROLS_STATUS (p4, ON)
	ELSE
		SET_ALL_CONTROLS_STATUS (p4, OFF)
	ENDIF
	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, 6.0, 20.0, 20.0) )))
		IF (CHECK_CHARACTER_HEALTH(p4, 1))
			KILL_CHAR (p4)
		ENDIF
		SET dsum = (dsum+1)
	ENDIF
ENDIF

IF (CHECK_CHARACTER_HEALTH(p5, 0))
	SET_CHAR_INVINCIBLE (p5, ON)
	GIVE_WEAPON (  p5 , rocket_launcher, 99 )
	GIVE_WEAPON (  p5 , molotov, 99 )
	
	
	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 ( 0 ) ) )
			EXPLODE_SMALL (p5_punched)
			SET p5_trg_punched = 0
		ENDIF
	ENDIF
	

	CHANGE_GANG_CHAR_RESPECT (high, p5, -5)
	IF (control=1)
		SET_ALL_CONTROLS_STATUS (p5, ON)
	ELSE
		SET_ALL_CONTROLS_STATUS (p5, OFF)
	ENDIF
	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, 6.0, 20.0, 20.0) )))
		IF (CHECK_CHARACTER_HEALTH(p5, 1))
			KILL_CHAR (p5)
		ENDIF
		SET dsum = (dsum+1)
	ENDIF
ENDIF

IF (CHECK_CHARACTER_HEALTH(p6, 0))
	SET_CHAR_INVINCIBLE (p6, ON)
	GIVE_WEAPON (  p6 , rocket_launcher, 99 )
	GIVE_WEAPON (  p6 , molotov, 99 )
	
	
	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 ( 0 ) ) )
			EXPLODE_SMALL (p6_punched)
			SET p6_trg_punched = 0
		ENDIF
	ENDIF
	

	CHANGE_GANG_CHAR_RESPECT (high, p6, -5)
	IF (control=1)
		SET_ALL_CONTROLS_STATUS (p6, ON)
	ELSE
		SET_ALL_CONTROLS_STATUS (p6, OFF)
	ENDIF
	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, 6.0, 20.0, 20.0) )))
		IF (CHECK_CHARACTER_HEALTH(p6, 1))
			KILL_CHAR (p6)
		ENDIF
		SET dsum = (dsum+1)
	ENDIF
ENDIF





	SET tsum = (psum-dsum)
	IF (tsum>=1)
		SET control=1
	ENDIF
	IF (tsum<1)
		SET control=0
	ENDIF


	
ENDWHILE

LEVELEND
