// player's normal start position
PLAYER_PED p1 = (181.5, 225.5, 6.0) 5 0
PLAYER_PED p2 = (189.5, 242.5, 6.0) 6 0
PLAYER_PED p3 = (202.5, 227.5, 6.0) 5 0
PLAYER_PED p4 = (206.5, 242.5, 6.0) 6 0
PLAYER_PED p5 = (228.5, 228.5, 6.0) 5 0
PLAYER_PED p6 = (226.5, 242.5, 6.0) 6 0
PARKED_CAR_DATA auto1 = (71.5, 77.5) 0 0 GT24640

GENERATOR molotov1 = (72.5, 77.5) 0 COLLECT_04 80 120 20
GENERATOR egun = (80.5, 69.7) 0 COLLECT_03 80 120 40
GENERATOR flamer = (85.5, 71.5, 4.0) 0 COLLECT_08 80 120 50
GENERATOR grenade1 = (80.5, 69.3) 0 COLLECT_05 25 120 25
GENERATOR grenade2 = (72.4, 68.5) 0 COLLECT_05 25 120 25
GENERATOR fast = (80.5, 68.4, 5.0) 0 COLLECT_36 1 120 1
GENERATOR health = (80.5, 78.4) 0 COLLECT_30 1 120 1
CHAR_DATA p
COUNTER mainloop = 1
COUNTER current_player = 1
COUNTER playerCount=1
COUNTER hollowpath = 0
COUNTER hollowpath2 = 0
COUNTER p1_trg_horn = 0
COUNTER bomb_trig1 = 0
COUNTER c_liftup = 0
COUNTER c_liftdown = 0
COUNTER pweapon = 0
COUNTER p1weapon = 0
COUNTER p2weapon = 0
COUNTER p3weapon = 0
COUNTER p4weapon = 0
COUNTER p5weapon = 0
COUNTER p6weapon = 0

SOUND liftup = (71.50, 78.50, 5.00) ROCKET_LAUNCH_FAIL_CLICK PLAY_INSTANT
SOUND liftdown = (71.50, 78.50, 5.00) DETECTED_MUMBLE PLAY_INSTANT
SOUND bns = (76.50, 69.50, 3.00) BOMB_TICK_SHIT PLAY_INSTANT
SOUND bns2 = (76.50, 77.50, 3.00) YEEHA_BOMB PLAY_INSTANT
SOUND bes = (80.50, 73.50, 3.00) BOMB_TICK_SHIT PLAY_INSTANT
SOUND bes2 = (72.50, 73.50, 3.00) YEEHA_BOMB PLAY_INSTANT
SOUND bss = (76.50, 69.50, 3.00) BOMB_TICK_SHIT PLAY_INSTANT
SOUND bss2 = (76.50, 77.50, 3.00) YEEHA_BOMB PLAY_INSTANT
SOUND bws = (76.50, 69.50, 3.00) BOMB_TICK_SHIT PLAY_INSTANT
SOUND bws2 = (76.50, 77.50, 3.00) YEEHA_BOMB PLAY_INSTANT
SOUND hollowpsound = (76.50, 77.50, 3.00) BANK_ALARM PLAY_INSTANT
SOUND hollowpsound2 = (84.50, 66.50, 3.00) BANK_ALARM PLAY_INSTANT
SOUND hollowpsound3 = (80.50, 67.50, 3.00) BANK_ALARM PLAY_INSTANT
SOUND rickchoir = (91.50, 91.00, 1.00) CHURCH_SINGING PLAY_FOREVER
//OBJ_DATA tow_1 = (76.5, 73.5, 4.0) 0 TOWER
DECLARE_POLICELEVEL (2)
DESTRUCTOR surface = (73.0, 76.0, 1.0) (32.0, 32.0)
LIGHT hpl = (83.5, 69.0, 4.0) 2.3 0 (0, 80, 255) 0 0 0
LIGHT hp2 = (83.5, 66.0, 5.0) 2.3 0 (0, 80, 255) 0 0 0
LIGHT hp3 = (80.5, 68.0, 7.0) 2.3 0 (0, 82, 255) 0 0 0

////////////////////////////////////////////////////////////////
//                                                            //
//  BEGIN MAIN SCRIPT! and stuff...                           //
//                                                            //
////////////////////////////////////////////////////////////////

LEVELSTART

//GIVE_DRIVER_AND_BRAKE (liftupcar)
SWITCH_GENERATOR (molotov1, ON)
SWITCH_GENERATOR (egun, ON)
SWITCH_GENERATOR (grenade2, ON)
SWITCH_GENERATOR (flamer, ON)
SWITCH_GENERATOR (grenade1, ON)
SWITCH_GENERATOR (fast, ON)
SWITCH_GENERATOR (health, ON)
rickchoir = CREATE_SOUND (91.50, 91.00, 1.00) CHURCH_SINGING PLAY_FOREVER END

// example command
//MAKE_ALL_CHARS_MUGGERS (on)


WHILE_EXEC ( mainloop = 1 )
 SET hollowpath = 0
 SET hollowpath2 = 0

 IF (IS_CHARACTER_IN_CAR (p1, auto1))
  IF (IS_CHAR_PRESSING_HORN (p1))
     SET bomb_trig1 = 1
  ENDIF
 ENDIF
 IF (IS_CHARACTER_IN_CAR (p2, auto1))
  IF (bomb_trig1 = 1)
   EXPLODE_LARGE (auto1)
  ENDIF
 ENDIF

 SET current_player=1
     WHILE_EXEC(current_player<7)
         IF(current_player=1)
          SET p=(p1+0)
          SET pweapon=(p1weapon+0)
         ENDIF
          IF(current_player=2)
          SET p=(p2+0)
          SET pweapon=(p2weapon+0)
         ENDIF
          IF(current_player=3)
          SET p=(p3+0)
          SET pweapon=(p3weapon+0)
         ENDIF
          IF(current_player=4)
          SET p=(p4+0)
          SET pweapon=(p4weapon+0)
         ENDIF
          IF(current_player=5)
          SET p=(p5+0)
          SET pweapon=(p5weapon+0)
         ENDIF
          IF(current_player=6)
          SET p=(p6+0)
          SET pweapon=(p6weapon+0)
         ENDIF


///WEAPONS/////////////////////////////////////////////////////////////////////////////////
///WEAPONS/////////////////////////////////////////////////////////////////////////////////
///WEAPONS/////////////////////////////////////////////////////////////////////////////////

IF (HAS_CHARACTER_DIED (p))
 SET pweapon = 1
ENDIF

IF (pweapon = 1)
	GIVE_WEAPON ( p, rocket_launcher , 1 )
ENDIF

//StartSpawns//////////////////////////////////////////////////////////
//StartSpawns//////////////////////////////////////////////////////////
//StartSpawns//////////////////////////////////////////////////////////
IF (CHECK_CHARACTER_HEALTH (p, 0))
 IF (LOCATE_CHARACTER_ANY_MEANS(p, 184.50, 227.50, 6.00, 1.00, 1.00))
 WARP_FROM_CAR_TO_POINT (p, 90.50, 91.20, 7.00, 180)
 bss2 = CREATE_SOUND (184.50, 227.50, 3.00) YEEHA_BOMB PLAY_INSTANT END
 ENDIF
 IF (LOCATE_CHARACTER_ANY_MEANS(p, 187.50, 240.50, 6.00, 1.00, 1.00))
 WARP_FROM_CAR_TO_POINT (p, 91.00, 91.20, 7.00, 180)
 bss2 = CREATE_SOUND (187.50, 240.50, 3.00) YEEHA_BOMB PLAY_INSTANT END
 ENDIF
 IF (LOCATE_CHARACTER_ANY_MEANS(p, 200.50, 224.50, 6.00, 1.00, 1.00))
 WARP_FROM_CAR_TO_POINT (p, 91.50, 91.20, 7.00, 180)
 bss2 = CREATE_SOUND (200.50, 224.50, 3.00) YEEHA_BOMB PLAY_INSTANT END
 ENDIF
 IF (LOCATE_CHARACTER_ANY_MEANS(p, 203.50, 242.50, 6.00, 1.00, 1.00))
 WARP_FROM_CAR_TO_POINT (p, 92.00, 91.20, 7.00, 180)
 bws2 = CREATE_SOUND (203.50, 242.50, 3.00) YEEHA_BOMB PLAY_INSTANT END
 ENDIF
 IF (LOCATE_CHARACTER_ANY_MEANS(p, 225.50, 228.50, 6.00, 1.00, 1.00))
 WARP_FROM_CAR_TO_POINT (p, 92.50, 91.20, 7.00, 180)
 bns2 = CREATE_SOUND (225.50, 228.50, 3.00) YEEHA_BOMB PLAY_INSTANT END
 ENDIF
 IF (LOCATE_CHARACTER_ANY_MEANS(p, 225.50, 236.50, 6.00, 1.00, 1.00))
 WARP_FROM_CAR_TO_POINT (p, 92.50, 91.20, 7.00, 180)
 bes2 = CREATE_SOUND (225.50, 236.50, 3.00) YEEHA_BOMB PLAY_INSTANT END
 ENDIF


//Restarts/////////////////////////////////////////////////////////
//Restarts/////////////////////////////////////////////////////////
//Restarts/////////////////////////////////////////////////////////
IF (LOCATE_CHARACTER_ANY_MEANS(p, 95.50, 73.50, 2.00, 1.00, 1.00))
 WARP_FROM_CAR_TO_POINT (p, 76.50, 73.10, 2.00, 180)
ENDIF
IF (LOCATE_CHARACTER_ANY_MEANS(p, 94.50, 73.50, 2.00, 1.00, 1.00))
 WARP_FROM_CAR_TO_POINT (p, 76.50, 73.90, 2.00, 0)
ENDIF
IF (LOCATE_CHARACTER_ANY_MEANS(p, 96.50, 73.50, 2.00, 1.00, 1.00))
 WARP_FROM_CAR_TO_POINT (p, 74.50, 71.10, 2.00, 45)
ENDIF
IF (LOCATE_CHARACTER_ANY_MEANS(p, 95.50, 74.50, 2.00, 1.00, 1.00))
 WARP_FROM_CAR_TO_POINT (p, 74.50, 75.50, 2.00, 135)
ENDIF
IF (LOCATE_CHARACTER_ANY_MEANS(p, 94.50, 74.50, 2.00, 1.00, 1.00))
 WARP_FROM_CAR_TO_POINT (p, 78.50, 71.50, 2.00, 315)
ENDIF
IF (LOCATE_CHARACTER_ANY_MEANS(p, 96.50, 74.50, 2.00, 1.00, 1.00))
 WARP_FROM_CAR_TO_POINT (p, 78.50, 75.10, 2.00, 225)
ENDIF


//north
 IF (LOCATE_CHARACTER_ANY_MEANS(p, 76.50, 69.50, 2.00, 1.00, 1.00))
 WARP_FROM_CAR_TO_POINT (p, 76.50, 69.80, 3.40, 0)
 bns = CREATE_SOUND (76.50, 69.50, 2.00) BOMB_TICK_SHIT PLAY_INSTANT END
 bns2 = CREATE_SOUND (76.50, 69.50, 3.00) YEEHA_BOMB PLAY_INSTANT END
 ENDIF

//east
 IF (LOCATE_CHARACTER_ANY_MEANS(p, 80.50, 73.50, 2.00, 1.00, 1.00))
 WARP_FROM_CAR_TO_POINT (p, 80.10, 73.50, 3.40, 270)
 bes = CREATE_SOUND (80.50, 73.50, 2.00) BOMB_TICK_SHIT PLAY_INSTANT END
 bes2 = CREATE_SOUND (80.50, 73.50, 3.00) YEEHA_BOMB PLAY_INSTANT END
 ENDIF

//south
 IF (LOCATE_CHARACTER_ANY_MEANS(p, 76.50, 77.50, 2.00, 1.00, 1.00))
 WARP_FROM_CAR_TO_POINT (p, 76.50, 77.10, 3.40, 180)
 bss = CREATE_SOUND (76.50, 77.50, 2.00) BOMB_TICK_SHIT PLAY_INSTANT END
 bss2 = CREATE_SOUND (76.50, 77.50, 3.00) YEEHA_BOMB PLAY_INSTANT END
 ENDIF

//west
 IF (LOCATE_CHARACTER_ANY_MEANS(p, 72.50, 73.50, 2.00, 1.00, 1.00))
 WARP_FROM_CAR_TO_POINT (p, 72.80, 73.50, 3.40, 90)
 bws = CREATE_SOUND (72.50, 73.50, 2.00) BOMB_TICK_SHIT PLAY_INSTANT END
 bws2 = CREATE_SOUND (72.50, 73.50, 3.00) YEEHA_BOMB PLAY_INSTANT END
 ENDIF

//BEAMERVATORS/////////////////////////////////////////////////////////
//BEAMERVATORS/////////////////////////////////////////////////////////
//BEAMERVATORS/////////////////////////////////////////////////////////
//n-s
IF (LOCATE_CHARACTER_ANY_MEANS(p, 76.50, 69.10, 3.00, 1.00, 1.00))
WARP_FROM_CAR_TO_POINT (p, 76.50, 77.10, 3.40, 180)
bns = CREATE_SOUND (76.50, 69.50, 3.00) BOMB_TICK_SHIT PLAY_INSTANT END
bns2 = CREATE_SOUND (76.50, 76.50, 3.00) YEEHA_BOMB PLAY_INSTANT END
ENDIF
//n-e
IF (LOCATE_CHARACTER_ANY_MEANS(p, 77.50, 69.10, 3.00, 1.00, 1.00))
WARP_FROM_CAR_TO_POINT (p, 80.10, 73.50, 3.40, 270)
bns = CREATE_SOUND (77.50, 69.50, 3.00) BOMB_TICK_SHIT PLAY_INSTANT END
bns2 = CREATE_SOUND (80.50, 73.50, 3.00) YEEHA_BOMB PLAY_INSTANT END
ENDIF
//n-w
IF (LOCATE_CHARACTER_ANY_MEANS(p, 75.50, 69.10, 3.00, 1.00, 1.00))
WARP_FROM_CAR_TO_POINT (p, 72.80, 73.50, 3.40, 90)
bns = CREATE_SOUND (75.50, 69.50, 3.00) BOMB_TICK_SHIT PLAY_INSTANT END
bns2 = CREATE_SOUND (72.50, 73.50, 3.00) YEEHA_BOMB PLAY_INSTANT END
ENDIF



//e-w
IF (LOCATE_CHARACTER_ANY_MEANS(p, 80.80, 73.50, 3.00, 1.00, 1.00))
WARP_FROM_CAR_TO_POINT (p, 72.80, 73.50, 3.40, 90)
bes = CREATE_SOUND (80.50, 73.50, 3.00) BOMB_TICK_SHIT PLAY_INSTANT END
bes2 = CREATE_SOUND (72.50, 73.50, 3.00) YEEHA_BOMB PLAY_INSTANT END
ENDIF
//e-n
IF (LOCATE_CHARACTER_ANY_MEANS(p, 80.80, 72.50, 3.00, 1.00, 1.00))
WARP_FROM_CAR_TO_POINT (p, 76.50, 69.80, 3.40, 0)
bes = CREATE_SOUND (80.50, 72.50, 3.00) BOMB_TICK_SHIT PLAY_INSTANT END
bes2 = CREATE_SOUND (76.50, 69.50, 3.00) YEEHA_BOMB PLAY_INSTANT END
ENDIF
//e-s
IF (LOCATE_CHARACTER_ANY_MEANS(p, 80.80, 74.50, 3.00, 1.00, 1.00))
WARP_FROM_CAR_TO_POINT (p, 76.50, 77.10, 3.40, 180)
bes = CREATE_SOUND (80.50, 74.50, 3.00) BOMB_TICK_SHIT PLAY_INSTANT END
bes2 = CREATE_SOUND (76.50, 77.50, 3.00) YEEHA_BOMB PLAY_INSTANT END
ENDIF



//s-n
IF (LOCATE_CHARACTER_ANY_MEANS(p, 76.50, 77.80, 3.00, 1.00, 1.00))
WARP_FROM_CAR_TO_POINT (p, 76.50, 69.80, 3.40, 0)
bss = CREATE_SOUND (76.50, 77.50, 3.00) BOMB_TICK_SHIT PLAY_INSTANT END
bss2 = CREATE_SOUND (76.50, 69.50, 3.00) YEEHA_BOMB PLAY_INSTANT END
ENDIF
//s-e
IF (LOCATE_CHARACTER_ANY_MEANS(p, 77.50, 77.80, 3.00, 1.00, 1.00))
WARP_FROM_CAR_TO_POINT (p, 80.10, 73.50, 3.40, 270)
bss = CREATE_SOUND (77.50, 77.50, 3.00) BOMB_TICK_SHIT PLAY_INSTANT END
bss2 = CREATE_SOUND (80.50, 73.50, 3.00) YEEHA_BOMB PLAY_INSTANT END
ENDIF
//s-w
IF (LOCATE_CHARACTER_ANY_MEANS(p, 75.50, 77.80, 3.00, 1.00, 1.00))
WARP_FROM_CAR_TO_POINT (p, 72.80, 73.50, 3.40, 90)
bss = CREATE_SOUND (75.50, 77.50, 3.00) BOMB_TICK_SHIT PLAY_INSTANT END
bss2 = CREATE_SOUND (72.50, 73.50, 3.00) YEEHA_BOMB PLAY_INSTANT END
ENDIF



//w-e
IF (LOCATE_CHARACTER_ANY_MEANS(p, 72.10, 73.50, 3.00, 1.00, 1.00))
WARP_FROM_CAR_TO_POINT (p, 80.10, 73.50, 3.40, 270)
bws = CREATE_SOUND (72.50, 73.50, 3.00) BOMB_TICK_SHIT PLAY_INSTANT END
bws2 = CREATE_SOUND (80.50, 73.50, 3.00) YEEHA_BOMB PLAY_INSTANT END
ENDIF
//w-n
IF (LOCATE_CHARACTER_ANY_MEANS(p, 72.10, 72.50, 3.00, 1.00, 1.00))
WARP_FROM_CAR_TO_POINT (p, 76.50, 69.80, 3.40, 0)
bws = CREATE_SOUND (72.50, 72.50, 3.00) BOMB_TICK_SHIT PLAY_INSTANT END
bws2 = CREATE_SOUND (76.50, 69.50, 3.00) YEEHA_BOMB PLAY_INSTANT END
ENDIF
//w-s
IF (LOCATE_CHARACTER_ANY_MEANS(p, 72.10, 74.50, 3.00, 1.00, 1.00))
WARP_FROM_CAR_TO_POINT (p, 76.50, 77.10, 3.40, 180)
bws = CREATE_SOUND (72.50, 74.50, 3.00) BOMB_TICK_SHIT PLAY_INSTANT END
bws2 = CREATE_SOUND (76.50, 77.50, 3.00) YEEHA_BOMB PLAY_INSTANT END
ENDIF


//Level up and Down / Lift Sound//////////////////////////////////////////////////
//Level up and Down / Lift Sound//////////////////////////////////////////////////
//Level up and Down / Lift Sound//////////////////////////////////////////////////


 IF (LOCATE_CHARACTER_ANY_MEANS(p, 71.90, 78.10, 3.00, 1.00, 1.00))
 WARP_FROM_CAR_TO_POINT (p, 71.90, 78.10, 5.30, 135)
 liftup = CREATE_SOUND (71.50, 78.50, 5.00) ROCKET_LAUNCH_FAIL_CLICK PLAY_INSTANT END
 ENDIF
 IF (LOCATE_CHARACTER_ANY_MEANS(p, 71.10, 78.90, 5.00, 1.00, 1.00))
 WARP_FROM_CAR_TO_POINT (p, 71.35, 78.65, 3.30, 315)
 liftdown = CREATE_SOUND (71.50, 78.50, 5.00) DETECTED_MUMBLE PLAY_INSTANT END
 ENDIF

//SecretPath1///////////////////////////////////////////////////////////
 IF (LOCATE_CHARACTER_ANY_MEANS (p, 80.5, 69.5, 5.0, 1.0, 1.0))
    SET hollowpath = 1
 ENDIF

//SecretPath2///////////////////////////////////////////////////////////
 IF (LOCATE_CHARACTER_ANY_MEANS (p, 87.5, 69.5, 4.0, 1.0, 1.0))
    SET hollowpath2 = 1
 ENDIF
// 	IF (IS_CHAR_FIRING_ONSCREEN (p))
//				SET hollowpath = 1
//				SET hollowpath2 = 1
//	ENDIF
ENDIF
          IF(current_player=1)
          SET p1weapon=(pweapon+0)
          ENDIF
          IF(current_player=2)
          SET p2weapon=(pweapon+0)
          ENDIF
          IF(current_player=3)
          SET p3weapon=(pweapon+0)
          ENDIF
          IF(current_player=4)
          SET p4weapon=(pweapon+0)
          ENDIF
          IF(current_player=5)
          SET p5weapon=(pweapon+0)
          ENDIF
          IF(current_player=6)
          SET p6weapon=(pweapon+0)
          ENDIF
++current_player
ENDWHILE

///CREATE HOLLOWPATH1///////////////////////////////////////////////////////
IF (hollowpath > 0)
hollowpsound = CREATE_SOUND (82.50, 69.50, 4.00) BANK_ALARM PLAY_INSTANT END
    ADD_NEW_BLOCK (82, 69, 4)
				CHANGE_BLOCK TYPE (82, 69, 4) FIELD 6
    CHANGE_BLOCK LID (82, 69, 4) FLAT FLIP 0 90 712
    ADD_NEW_BLOCK (83, 69, 4)
				CHANGE_BLOCK TYPE (83, 69, 4) FIELD 5
    CHANGE_BLOCK LID (83, 69, 4) FLAT FLIP 0 90 712
    CHANGE_INTENSITY (hpl, 255)
ENDIF
IF (hollowpath = 0)
 			REMOVE_BLOCK (82, 69, 4, DONT_DROP)
    REMOVE_BLOCK (83, 69, 4, DONT_DROP)
    CHANGE_INTENSITY (hpl, 0)
ENDIF

//CREATE HOLLOWPATH2///////////////////////////////////////////////////

IF (hollowpath2 > 0)
hollowpsound2 = CREATE_SOUND (84.50, 66.50, 4.00) BANK_ALARM PLAY_INSTANT END
hollowpsound3 = CREATE_SOUND (80.50, 67.50, 5.00) BANK_ALARM PLAY_INSTANT END
    ADD_NEW_BLOCK (81, 66, 5)
				CHANGE_BLOCK TYPE (81, 66, 5) FIELD 6
    CHANGE_BLOCK LID (81, 66, 5) FLAT FLIP 0 90 712
    ADD_NEW_BLOCK (82, 66, 5)
				CHANGE_BLOCK TYPE (82, 66, 5) FIELD 5
    CHANGE_BLOCK LID (82, 66, 5) FLAT FLIP 0 90 712
        ADD_NEW_BLOCK (83, 66, 4)
				CHANGE_BLOCK TYPE (83, 66, 4) FIELD 6
    CHANGE_BLOCK LID (83, 66, 4) FLAT FLIP 0 90 712
    ADD_NEW_BLOCK (84, 66, 4)
				CHANGE_BLOCK TYPE (84, 66, 4) FIELD 5
    CHANGE_BLOCK LID (84, 66, 4) FLAT FLIP 0 90 712
        ADD_NEW_BLOCK (80, 67, 5)
				CHANGE_BLOCK TYPE (80, 67, 5) FIELD 0
    CHANGE_BLOCK LID (80, 67, 5) FLAT FLIP 0 180 712
    ADD_NEW_BLOCK (80, 68, 5)
				CHANGE_BLOCK TYPE (80, 68, 5) FIELD 0
    CHANGE_BLOCK LID (80, 68, 5) FLAT FLIP 0 180 712
    CHANGE_INTENSITY (hp2, 255)
    CHANGE_INTENSITY (hp3, 255)    
ENDIF
IF (hollowpath2 = 0)
 			REMOVE_BLOCK (81, 66, 5, DONT_DROP)
    REMOVE_BLOCK (82, 66, 5, DONT_DROP)
 			REMOVE_BLOCK (83, 66, 4, DONT_DROP)
    REMOVE_BLOCK (84, 66, 4, DONT_DROP)
    REMOVE_BLOCK (80, 67, 5, DONT_DROP)
    REMOVE_BLOCK (80, 68, 5, DONT_DROP)
    CHANGE_INTENSITY (hp2, 0)
    CHANGE_INTENSITY (hp3, 0)
ENDIF

ENDWHILE

LEVELEND
