
//{ //Header
// On Line
// script and map by Elypter
// for details look at onl_readme.txt 
// onl.mis Compiled by Elypter on Dienstag, 11. Oktober 2011 with codesmith

// addons:
//#region header
//#endregion 
//}

//{ //Declares
//{ //PlayerDefines
PLAYER_PED p1 = (251.5, 85.0, 255.0) 5 60  
PLAYER_PED p2 = (253.5, 86.0, 255.0) 7 240 
PLAYER_PED p3 = (251.5, 86.0, 255.0) 8 120 
PLAYER_PED p4 = (253.5, 85.0, 255.0) 11 300
PLAYER_PED p5 = (252.5, 86.5, 255.0) 13 180
PLAYER_PED p6 = (252.5, 84.5, 255.0) 10 0  
//}

//{ //PlayerDeclares
    //{ //Player1
    //#region player_declare
	//#endregion
	
    //}

    //{ //Player2
    //#region player_declare
	//#endregion
	
    //}

    //{ //Player3
    //#region player_declare
	//#endregion
	
    //}

    //{ //Player4
    //#region player_declare
	//#endregion
	
    //}

    //{ //Player5
    //#region player_declare
	//#endregion
	
    //}

    //{ //Player6
    //#region player_declare
	//#endregion
	
    //}

//}

//#region declare
//#endregion

//{ //Collectibles


//}

//{ //Towers
OBJ_DATA tower01 = (243.5, 80.5, 6.1) 0 TOWER
OBJ_DATA tower02 = (242.5, 81.5, 6.1) 0 TOWER
OBJ_DATA tower03 = (243.5, 81.5, 6.1) 0 TOWER
OBJ_DATA tower04 = (244.5, 81.5, 6.1) 0 TOWER
OBJ_DATA tower05 = (243.5, 82.5, 6.1) 0 TOWER

OBJ_DATA tower31 = (243.5, 83.5, 6.1) 0 TOWER
OBJ_DATA tower32 = (242.5, 84.5, 6.1) 0 TOWER
OBJ_DATA tower33 = (243.5, 84.5, 6.1) 0 TOWER
OBJ_DATA tower34 = (244.5, 84.5, 6.1) 0 TOWER
OBJ_DATA tower35 = (243.5, 85.5, 6.1) 0 TOWER

OBJ_DATA tower61 = (243.5, 86.5, 6.1) 0 TOWER
OBJ_DATA tower62 = (242.5, 87.5, 6.1) 0 TOWER
OBJ_DATA tower63 = (243.5, 87.5, 6.1) 0 TOWER
OBJ_DATA tower64 = (244.5, 87.5, 6.1) 0 TOWER
OBJ_DATA tower65 = (243.5, 88.5, 6.1) 0 TOWER

OBJ_DATA tower91 = (243.5, 89.5, 6.1) 0 TOWER
OBJ_DATA tower92 = (242.5, 90.5, 6.1) 0 TOWER
OBJ_DATA tower93 = (243.5, 90.5, 6.1) 0 TOWER
OBJ_DATA tower94 = (244.5, 90.5, 6.1) 0 TOWER
OBJ_DATA tower95 = (243.5, 91.5, 6.1) 0 TOWER

//}

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

ONSCREEN_COUNTER dummy_osc

COUNTER loop = 1
//}

LEVELSTART

//{ //Init
//#region init
//#endregion

//ADD_ONSCREEN_COUNTER  (   dummy_osc  ,  tsum )


//}

WHILE_EXEC ( loop = 1 )

//{ //PlayerChecks
IF (CHECK_CHARACTER_HEALTH(p1, 0))
	//#region player_loop
	//#endregion

	GIVE_WEAPON (  p1 , rocket_launcher, 99 )
	
	//{ //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 (NOT ( LOCATE_CHARACTER_ANY_MEANS ( p1, 127.0, 127.0, 7.0, 256.0, 256.0) )) 
		IF (CHECK_CHARACTER_HEALTH(p1, 1))
			KILL_CHAR (p1)
		ENDIF
		SET dsum = (dsum+1)
	ENDIF
	//}
ENDIF   

IF (CHECK_CHARACTER_HEALTH(p2, 0))
	//#region player_loop
	//#endregion

	GIVE_WEAPON (  p2 , rocket_launcher, 99 )
	
	//{ //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 (NOT ( LOCATE_CHARACTER_ANY_MEANS ( p2, 127.0, 127.0, 7.0, 256.0, 256.0) )) 
		IF (CHECK_CHARACTER_HEALTH(p2, 1))
			KILL_CHAR (p2)
		ENDIF
		SET dsum = (dsum+1)
	ENDIF
	//}
ENDIF   

IF (CHECK_CHARACTER_HEALTH(p3, 0))
	//#region player_loop
	//#endregion

	GIVE_WEAPON (  p3 , rocket_launcher, 99 )
	
	//{ //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 (NOT ( LOCATE_CHARACTER_ANY_MEANS ( p3, 127.0, 127.0, 7.0, 256.0, 256.0) )) 
		IF (CHECK_CHARACTER_HEALTH(p3, 1))
			KILL_CHAR (p3)
		ENDIF
		SET dsum = (dsum+1)
	ENDIF
	//}
ENDIF   

IF (CHECK_CHARACTER_HEALTH(p4, 0))
	//#region player_loop
	//#endregion

	GIVE_WEAPON (  p4 , rocket_launcher, 99 )
	
	//{ //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 (NOT ( LOCATE_CHARACTER_ANY_MEANS ( p4, 127.0, 127.0, 7.0, 256.0, 256.0) )) 
		IF (CHECK_CHARACTER_HEALTH(p4, 1))
			KILL_CHAR (p4)
		ENDIF
		SET dsum = (dsum+1)
	ENDIF
	//}
ENDIF   

IF (CHECK_CHARACTER_HEALTH(p5, 0))
	//#region player_loop
	//#endregion

	GIVE_WEAPON (  p5 , rocket_launcher, 99 )
	
	//{ //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 (NOT ( LOCATE_CHARACTER_ANY_MEANS ( p5, 127.0, 127.0, 7.0, 256.0, 256.0) )) 
		IF (CHECK_CHARACTER_HEALTH(p5, 1))
			KILL_CHAR (p5)
		ENDIF
		SET dsum = (dsum+1)
	ENDIF
	//}
ENDIF   

IF (CHECK_CHARACTER_HEALTH(p6, 0))
	//#region player_loop
	//#endregion

	GIVE_WEAPON (  p6 , rocket_launcher, 99 )
	
	//{ //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 (NOT ( LOCATE_CHARACTER_ANY_MEANS ( p6, 127.0, 127.0, 7.0, 256.0, 256.0) )) 
		IF (CHECK_CHARACTER_HEALTH(p6, 1))
			KILL_CHAR (p6)
		ENDIF
		SET dsum = (dsum+1)
	ENDIF
	//}
ENDIF   

//}

//#region loop
//#endregion 

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

LEVELEND