// Team Tiny Town
// 2005-10-16
// by Sektor

PLAYER_PED player1 = (  83.5 , 181.0 , 255.0 ) 10 180  // red
PLAYER_PED player2 = ( 106.0 , 194.0 , 255.0 )  6 270 // blue
PLAYER_PED player3 = (  84.5 , 181.0 , 255.0 ) 10 180  // red
PLAYER_PED player4 = ( 106.5 , 194.0 , 255.0 )  6 270 // blue
PLAYER_PED player5 = (  85.5 , 181.0 , 255.0 ) 10 180  // red
PLAYER_PED player6 = ( 107.0 , 194.0 , 255.0 )  6 270 // blue

ONSCREEN_COUNTER redscore_onscreen
ONSCREEN_COUNTER bluescore_onscreen
counter  red_score  = 0
counter  blue_score = 0
counter  loop       = 1
car_data redcar
car_data redcar2
car_data redcar3
car_data bluecar
car_data bluecar2
car_data bluecar3
//arrow_data arrow
//arrow_data bluearrow

GENERATOR rocket_01 = ( 114.0 , 195.0 , 2.0 ) 359 COLLECT_02 7500 7500 10
GENERATOR electro_01 = ( 98.0 , 158.9 , 2.0 ) 359 COLLECT_03 7500 7500 10
GENERATOR molotov_01 = ( 50.5 , 172.5 , 4.0 ) 359 COLLECT_04 7500 7500 10
GENERATOR uzi_01 = ( 111.5 , 170.6 , 2.0 ) 359 COLLECT_01 7500 7500 10
GENERATOR shotgun_01 = ( 78.5 , 192.5 , 2.0 ) 359 COLLECT_06 7500 7500 10
GENERATOR mine_01 = ( 73.5 , 179.5 , 5.0 ) 359 COLLECT_17 7500 7500 5
GENERATOR flame_01 = ( 60.0 , 186.5 , 4.0 ) 359 COLLECT_08 7500 7500 10
GENERATOR health_01 = ( 62.5 , 171.5 , 4.0 ) 359 COLLECT_30 7500 7500 99
GENERATOR car_uzi_01 = ( 118.5 , 177.5 , 2.0 ) 359 COLLECT_18 7500 7500 10
GENERATOR rocket_02 = ( 89.5 , 185.5 , 2.0 ) 359 COLLECT_02 7500 7500 10 // change to COLLECT_34 for invul
GENERATOR uzi_02 = ( 71.5 , 170.5 , 3.0 ) 359 COLLECT_01 7500 7500 10
GENERATOR molotov_02 = ( 68.0 , 194.5 , 4.0 ) 359 COLLECT_04 7500 7500 10
GENERATOR gang_01 = ( 63.0 , 184.0 , 2.0 ) 359 COLLECT_40 7500 7500 10
GENERATOR armour_01 = ( 100.5 , 173.5 , 2.0 ) 359 COLLECT_31 7500 7500

LEVELSTART 

SWITCH_GENERATOR ( rocket_01 , ON )
SWITCH_GENERATOR ( electro_01 , ON )
SWITCH_GENERATOR ( molotov_01 , ON )
SWITCH_GENERATOR ( uzi_01 , ON )
SWITCH_GENERATOR ( shotgun_01 , ON )
SWITCH_GENERATOR ( mine_01 , ON )
SWITCH_GENERATOR ( flame_01 , ON )
SWITCH_GENERATOR ( health_01 , ON )
SWITCH_GENERATOR ( car_uzi_01 , ON )
SWITCH_GENERATOR ( rocket_02 , ON )
SWITCH_GENERATOR ( uzi_02 , ON )
SWITCH_GENERATOR ( molotov_02 , ON )
SWITCH_GENERATOR ( gang_01 , ON )
SWITCH_GENERATOR ( armour_01 , ON )

redcar  = CREATE_CAR (  83.0 , 182.8  ) 28 180 buick END
redcar2  = CREATE_CAR (  84.0 , 182.8  ) 28 180 buick END
redcar3  = CREATE_CAR (  85.0 , 182.8  ) 28 180 buick END
bluecar = CREATE_CAR ( 108.5 , 194.5  )  3 90 buick END
bluecar2 = CREATE_CAR ( 108.5 , 195.5  )  3 90 buick END
bluecar3 = CREATE_CAR ( 107.0 , 192.0  )  3 180 buick END

ADD_ONSCREEN_COUNTER  ( redscore_onscreen  , red_score  )
ADD_ONSCREEN_COUNTER  ( bluescore_onscreen , blue_score )

//point_arrow_at ( arrow, redcar )
//level_end_point_arrow_at ( bluearrow, bluecar )

WHILE_EXEC ( loop = 1 )

if ( red_score > 9 )
   add_score ( player1, 99999999 )
   add_score ( player3, 99999999 )
   add_score ( player5, 99999999 )
endif

if ( blue_score > 9 )
   add_score ( player2, 99999999 )
   add_score ( player4, 99999999 )
   add_score ( player6, 99999999 )
endif

IF ((( HAS_CHARACTER_DIED ( player1 ))
  OR ( HAS_CHARACTER_DIED ( player3 )))
  OR ( HAS_CHARACTER_DIED ( player5 )))  
  IF ( NOT ( delay (60) ))
      ++blue_score
      clear_onscreen_counter ( redscore_onscreen )
      clear_onscreen_counter ( bluescore_onscreen )
      ADD_ONSCREEN_COUNTER  ( redscore_onscreen  , red_score  )
      ADD_ONSCREEN_COUNTER  ( bluescore_onscreen , blue_score )
  ENDIF
ENDIF

IF ((( HAS_CHARACTER_DIED ( player2 ))
  OR ( HAS_CHARACTER_DIED ( player4 )))
  OR ( HAS_CHARACTER_DIED ( player6 )))  
  IF ( NOT ( delay (60) ))
      ++red_score
      clear_onscreen_counter ( redscore_onscreen )
      clear_onscreen_counter ( bluescore_onscreen )
      ADD_ONSCREEN_COUNTER  ( redscore_onscreen  , red_score  )
      ADD_ONSCREEN_COUNTER  ( bluescore_onscreen , blue_score )
  ENDIF
ENDIF

ENDWHILE

LEVELEND
