// player's normal start position
PLAYER_PED p1 = (105.5,106.5,255.0) 10 90 
PLAYER_PED p2 = (106.5,118.5,255.0) 7 90
PLAYER_PED p3 = (125.5,130.5,255.0) 11 90
PLAYER_PED p4 = (86.5,116.5,255.0) 13 90
PLAYER_PED p5 = (90.0,131.5,255.0) 8 90
PLAYER_PED p6 = (123.5,110.5,255.0) 12 90

// Player Cars:
PARKED_CAR_DATA p1car = (111.0,125.0) 28 0 STINGRAY
PARKED_CAR_DATA p2car = (112.0,125.0) 35 0 STINGRAY
PARKED_CAR_DATA p3car = (113.0,125.0) 20 0 STINGRAY
PARKED_CAR_DATA p4car = (114.0,125.0) 31 0 STINGRAY
PARKED_CAR_DATA p5car = (115.0,125.0) 02 0 STINGRAY
PARKED_CAR_DATA p6car = (116.0,125.0) 33 0 STINGRAY


// two basic boolean values
SAVED_COUNTER true = 1 
SAVED_COUNTER false = 0 

//parked cars

CAR_DATA truck = (106.5,125.5) 28 0 TOWTRUCK  
CAR_DATA car = (99.0,106.0) 28 0 ZCX5 
CAR_DATA car2 = (100.0,106.0) 35 0 ZCX5 
CAR_DATA car3 = (101.0,106.0) 33 0 VESPA  
CAR_DATA car4 = (102.0,106.0) 20 0 ZCX5 
CAR_DATA car5 = (103.0, 106.0) 28 0 ZCX5 
CAR_DATA bombshop = (117.0, 148.0) 33 0 ZCX5 
CAR_DATA roof = (69.0, 153.0) 33 0 ICECREAM  
CAR_DATA bus = ( 102.5,125.5) 30 0 BUS
CAR_DATA stratos = (123.5,113.5) -1 000 STRATOS

//stunt cars right
CAR_DATA stratos2 = (119.0,118.5) -1 0 STRATOS
CAR_DATA stratos3 = (120.0,118.5) -1 0 STRATOS
CAR_DATA stratos4 = (121.0,118.5) -1 0 STRATOS
CAR_DATA stratos5 = (122.0,118.5) -1 0 STRATOS
CAR_DATA stratos6 = (123.0,118.5) -1 0 STRATOS

//stunt cars left
CAR_DATA stratos7 = (119.0,122.5) -1 180 STRATOS
CAR_DATA stratos8 = (120.0,122.5) -1 180 STRATOS
CAR_DATA stratos9 = (121.0,122.5) -1 180 STRATOS
CAR_DATA race1 = (122.0,122.5) -1 180 STRATOS
CAR_DATA race2 = (123.0,122.5) -1 180 STRATOS

//stunt cars street
CAR_DATA race3 = (124.0,123.0) -1 90 STRATOS
CAR_DATA race4 = (124.0,119.0) -1 90 STRATOS
CAR_DATA race5 = (124.0,118.0) -1 90 STRATOS


//respawn code
CAR_DATA fbicar = (84.5,127.5) -1 000 BUS

PARKED_CAR_DATA trailer = (1.0,1.0) 19 90 TRUKTRNS

//CAR WEAPONS SHOPS
OBJ_DATA machinegunshopa = ( 125.0 , 147.0 , 2.0 ) 0 CAR_SHOP MACHINEGUN_SHOP
OBJ_DATA minesshopa = ( 123.0 , 147.0 , 2.0 ) 0 CAR_SHOP MINES_SHOP
OBJ_DATA sprayshopa = ( 127.0 , 147.0 , 2.0 ) 0 CAR_SHOP 2
OBJ_DATA oilslickshopa = ( 129.0 , 147.0 , 2.0 ) 0 CAR_SHOP OILSLICK_SHOP
OBJ_DATA bombshopa = ( 121.0 , 147.0 , 2.0 ) 0 CAR_SHOP BOMB_SHOP 

// Code Looping:
COUNTER loopage = 1


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

LEVELSTART 

// example command
//MAKE_ALL_CHARS_MUGGERS (on)

GENERATOR powerup_2FC1CEE = (115.5,106.5) 0 COLLECT_06 100 200 80
GENERATOR powerup_4A36D34 = (116.5 , 107.5) 0 COLLECT_09 100 200 30
GENERATOR powerup_1 = (118.5 , 117.5) 0 COLLECT_04 100 200 30
GENERATOR powerup_2 = (126.5 , 107.5) 0 COLLECT_07 100 200 30
GENERATOR powerup_3 = (90.5 , 129.5) 0 COLLECT_10 100 200 30
GENERATOR powerup_4 = (83.5 , 125.5) 0 COLLECT_02 100 200 30
GENERATOR powerup_5 = (68.0 , 156.0) 0 COLLECT_08 100 200 30
GENERATOR powerup_6 = (69.5 , 155.0) 0 COLLECT_05 100 200 30
GENERATOR powerup_7 = (82.0 , 172.0) 0 COLLECT_18 100 200 30

SWITCH_GENERATOR ( powerup_2FC1CEE , ON )
SWITCH_GENERATOR ( powerup_4A36D34 , ON )
SWITCH_GENERATOR ( powerup_1 , ON )
SWITCH_GENERATOR ( powerup_2 , ON )
SWITCH_GENERATOR ( powerup_3 , ON )
SWITCH_GENERATOR ( powerup_4 , ON )
SWITCH_GENERATOR ( powerup_5 , ON )
SWITCH_GENERATOR ( powerup_6 , ON )
SWITCH_GENERATOR ( powerup_7 , ON )


// Special cars:
GIVE_WEAPON (fbicar, CAR_MACHINE_GUN, 99)
GIVE_WEAPON (roof, WATER_CANNON , 99)

// the loop
WHILE_EXEC (loopage = 1)

// Respawning FBI Car:
IF (IS_CAR_WRECKED(fbicar))
 IF (NOT (DELAY (100))) // let explosion happen
  IF (NOT (IS_POINT_ONSCREEN(84.5,127.5,2.0)))
   IF (IS_CAR_IN_BLOCK(fbicar, 84.5,127.5,2.0, 1.0,1.0))
    // Wreck is blocking spawnpoint:
    PUT_CAR_ON_TRAILER (fbicar, trailer)
   ENDIF
   
   // Spawnpoint is clear:
   DELETE_ITEM (fbicar)
   fbicar = CREATE_CAR (84.5,127.5) -1 000 BUS END
   GIVE_WEAPON (fbicar, CAR_MACHINE_GUN, 99)
  ENDIF
 ENDIF
ENDIF

ENDWHILE

LEVELEND
