//XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
//XXXXXXXXXXXXXXXXXXX Tiny Zaibatsu Town by Gustavob (or Pickpocket or Zaibatsu in GH) XXXXXXXXXXX
//XXXXXXXXXXXXXXXXXXX First singleplayer test: 2009.07.30 15:56 (UTC-3) XXXXXXXXXXXXXXXXXXXXXXXXXX
//XXXXXXXXXXXXXXXXXXX First multiplayer test: 2009.08.01 20:34 (UTC-3) XXXXXXXXXXXXXXXXXXXXXXXXXXX
//XXXXXXXXXXXXXXXXXXX Release date: 2009.08.02 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
//XXXXXXXXXXXXXXXXXXX http://www.GTAMP.com/forum XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
//XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

//Tiny Zaibatsu Town Version 1.2.1

//Players - jogadores
PLAYER_PED player1 = ( 62.5, 193.5, 2.0 )  8 180
PLAYER_PED player2 = ( 83.5 , 180.5 , 2.0 ) 8 180
PLAYER_PED player3 = ( 110.5 , 171.5 , 2.0 ) 8 000
PLAYER_PED player4 = ( 88.5, 192.5, 2.0 ) 8 000
PLAYER_PED player5 = ( 51.5 , 177.5 , 2.0) 8 090
PLAYER_PED player6 = ( 76.0, 173.0, 2.0) 8 090

//Weapons & Powerups - Armas & Powerups
GENERATOR rockets1 = ( 114.0 , 195.0 , 2.0 ) 0 COLLECT_02 6000 6000 10  //rocket launcher///////
GENERATOR electro = ( 98.0 , 159.0 , 2.0 ) 0 COLLECT_03 6000 6000 6    //electro gun///////////
GENERATOR pist = ( 92.5 , 176.5 , 2.0 ) 0 COLLECT_00 6000 6000 40      //pistol////////////////
GENERATOR pist2 = ( 61.0 , 195.0 , 2.0 ) 0 COLLECT_00 6000 6000 40     //pistol////////////////
GENERATOR invuln = ( 89.5 , 185.5 , 2.0 ) 0 COLLECT_34 6000 6000 0     //invulnerability///////
GENERATOR machgun = ( 71.5 , 170.4 , 3.0 ) 0 COLLECT_01 6000 6000 15   //machine gun///////////
GENERATOR machgun2 = ( 111.5 , 170.5 , 2.0 ) 0 COLLECT_01 6000 6000 15 //machine gun///////////
GENERATOR armour = ( 100.5 , 172.5 , 2.0 ) 0 COLLECT_31 6000 6000 0    //armour////////////////
GENERATOR health = ( 62.5 , 171.5 , 4.0 ) 0 COLLECT_30 6000 6000 0     //health////////////////
GENERATOR instg = ( 63.0 , 184.0 , 2.0 ) 0 COLLECT_40 6000 6000 0      //instant gang//////////
GENERATOR flame = ( 60.0 , 186.5 , 4.0 ) 0 COLLECT_08 6000 6000 10     //flamethrower//////////
GENERATOR shotg = ( 78.0 , 192.5 , 2.0 ) 0 COLLECT_06 6000 6000 12     //shotgun///////////////
GENERATOR molotovs = ( 68.0 , 194.5 , 4.0 ) 0 COLLECT_04 6000 6000 8   //molotov cocktails/////
GENERATOR vmachin = ( 118.5 , 177.5 , 2.0 ) 0 COLLECT_18 6000 6000 10  //vechicle machine gun//
GENERATOR grenad = ( 98.5 , 188.5 , 2.0 ) 0 COLLECT_05 6000 6000 12    //grenades//////////////
GENERATOR mine = ( 73.5 , 179.5 , 5.0 ) 0 COLLECT_17 6000 6000 4       //vehicle mine//////////
GENERATOR oil = ( 61.5 , 175.5 , 2.0 ) 0 COLLECT_16 6000 6000 6        //oil slick/////////////
GENERATOR molotovs2 = ( 50.5 , 172.5 , 4.0 ) 0 COLLECT_04 6000 6000 8  //molotov cocktails/////
GENERATOR ddamage = ( 85.0 , 173.0 , 2.0 ) 0 COLLECT_36 6000 6000 0    //double damage/////////
GENERATOR ssmg = ( 74.0 , 171.5 , 5.0 ) 0 COLLECT_09 6000 6000 0       //silenced s-uzi////////
GENERATOR invi = ( 87.5 , 189.0 , 2.0 ) 0 COLLECT_39 6000 6000 0       //invisibility//////////
GENERATOR resp = ( 96.5 , 200.5 , 2.0 ) 0 COLLECT_38 6000 6000 0       //respect///////////////
GENERATOR vbomb = ( 65.5 , 159.5 , 2.0 ) 0 COLLECT_15 6000 6000 1      //vehicle bomb//////////
GENERATOR ddamage2 = ( 65.5 , 159.5 , 2.0 ) 0 COLLECT_36 6000 6000 0   //double damage/////////
GENERATOR ivb = ( 110.5 , 198.5 , 1.0 ) 0 COLLECT_23 6000 6000 0       //instant vehicle bomb//
GENERATOR dualp = ( 111.5 , 198.5 , 1.0 ) 0 COLLECT_10 6000 6000 0     //dual pistol///////////

//Counters
COUNTER loop = 1
COUNTER change = 1

PARKED_CAR_DATA gt_a1 = ( 81.6 , 181.5 , 2.0 ) 2 90 GT24640
CAR_DATA ztype1
PARKED_CAR_DATA sprite1 = ( 81.6 , 183.5 , 2.0 ) 2 90 SPRITE
CAR_DATA ztype2
CAR_DATA ztype3
CAR_DATA ztype4
CAR_DATA ztype5
CAR_DATA ztype6
CAR_DATA ztype7
CAR_DATA ztype8
PARKED_CAR_DATA truktrns = ( 61.5 , 201.5 , 2.0 ) 2 180 TRUKTRNS
PARKED_CAR_DATA tank1 = ( 98.5 , 199.0 , 2.0 ) -1 180 TANK
PARKED_CAR_DATA arach = ( 106.5 , 196.5 , 2.0 ) 2 180 SPIDER
PARKED_CAR_DATA mort = ( 103.5 , 193.5 , 2.0 ) 2 0 MORGAN
PARKED_CAR_DATA bus = ( 88.5 , 182.5 , 2.0 ) 2 180 BUS
PARKED_CAR_DATA beam = ( 105.5 , 193.5 , 2.0 ) 2 0 BMW
PARKED_CAR_DATA panto = ( 104.5 , 196.5 , 2.0 ) 2 180 FIAT

//Zaibatsu gang - gangue Zaibatsu 
SET_GANG_INFO ( zaibgang , 8 , pistol , silenced_machine_gun , rocket_launcher , 3 , 89.0 , 180.5 , 2.0 , 1 , VTYPE , 2 )
SET_GANG_INFO ( ungangarea , 0 , NO_WEAPON , NO_WEAPON , NO_WEAPON , 8 , 1.0 , 1.0 , 1.0 , 0 , BUICK , -1 )
SET_GANG_KILL_REACTION ( zaibgang , ungangarea , 1 )
SET_GANG_KILL_REACTION ( ungangarea , zaibgang , 1 )

//Zones - Áreas
MAP_ZONE zgangarea = ( 1000 , 100, 100 , 100 , 1000 , 100 , 100 , 100, 600 , 100 , 700 )

LEVELSTART

WHILE (change=1)
CHANGE_BLOCK SIDE (66,159,2) RIGHT NOT_WALL NOT_BULLET NOT_FLAT FLIP 0 507
CHANGE_BLOCK SIDE (66,160,2) RIGHT NOT_WALL NOT_BULLET NOT_FLAT NOT_FLIP 0 507
SET change=0
ENDWHILE

//Environment
DECLARE_POLICELEVEL (5)
SET_DIR_OF_TV_VANS ( 85.0 , 182.5 )
SET_AMBIENT_LEVEL ( 0.3 , 3 )
SET_SHADING_LEVEL ( 20 )

ztype1 = CREATE_GANG_CAR ( 81.5 , 182.5 , 2.0 ) 2 90 VTYPE END
ztype2 = CREATE_GANG_CAR ( 61.0 , 197.5 , 2.0 ) 2 180 VTYPE END
ztype3 = CREATE_GANG_CAR ( 114.5 , 170.0 , 2.0 ) 2 270 VTYPE END
ztype4 = CREATE_GANG_CAR ( 92.5 , 191.5 , 2.0 ) 2 270 VTYPE END
ztype5 = CREATE_GANG_CAR ( 51.5 , 174.5 , 2.0 ) 2 90 VTYPE END
ztype6 = CREATE_GANG_CAR ( 76.5 , 175.5 , 2.0 ) 2 0 VTYPE END
ztype7 = CREATE_GANG_CAR ( 75.5 , 200.5 , 1.0 ) 2 180 VTYPE END
ztype8 = CREATE_GANG_CAR ( 76.5 , 201.5 , 1.0 ) 2 180 VTYPE END

GIVE_WEAPON (ztype7 , CAR_MINE , 20 )
GIVE_WEAPON (ztype7 , CAR_OIL , 50 )
GIVE_WEAPON (ztype7 , CAR_MACHINE_GUN , 50 )
GIVE_WEAPON (ztype7 , CAR_BOMB , 1 )
GIVE_WEAPON (ztype7 , CAR_BOMB_INSTANT , 1 )
GIVE_WEAPON (ztype8 , CAR_MINE , 20 )
GIVE_WEAPON (ztype8 , CAR_OIL , 50 )
GIVE_WEAPON (ztype8 , CAR_MACHINE_GUN , 50 )
GIVE_WEAPON (ztype8 , CAR_BOMB , 1 )
GIVE_WEAPON (ztype8 , CAR_BOMB_INSTANT , 1 )
GIVE_WEAPON (tank1 , CAR_MINE , 30 )
GIVE_WEAPON (tank1 , CAR_OIL , 60 )
GIVE_WEAPON (tank1 , CAR_MACHINE_GUN , 60 )
GIVE_WEAPON (tank1 , CAR_BOMB , 1 )
GIVE_WEAPON (tank1 , CAR_BOMB_INSTANT , 1 )
SET_CAR_ROCKETPROOF (ztype8 , ON)
SET_CAR_FLAMEPROOF (ztype8 , ON)
SET_CAR_BULLETPROOF (ztype8 , ON)
SET_CAR_NO_COLLIDE (ztype8)

//Generators ON/OFF - Geradores LIGADOS/DESLIGADOS
SWITCH_GENERATOR ( rockets1 , ON )
SWITCH_GENERATOR ( electro , ON )
SWITCH_GENERATOR ( pist , ON )
SWITCH_GENERATOR ( pist2 , ON )
SWITCH_GENERATOR ( invuln , ON )
SWITCH_GENERATOR ( machgun , ON )
SWITCH_GENERATOR ( machgun2 , ON )
SWITCH_GENERATOR ( armour , ON )
SWITCH_GENERATOR ( health , ON )
SWITCH_GENERATOR ( instg , ON )
SWITCH_GENERATOR ( flame , ON )
SWITCH_GENERATOR ( shotg , ON )
SWITCH_GENERATOR ( molotovs , ON )
SWITCH_GENERATOR ( vmachin , ON )
SWITCH_GENERATOR ( grenad , ON )
SWITCH_GENERATOR ( mine , ON )
SWITCH_GENERATOR ( oil , ON )
SWITCH_GENERATOR ( molotovs2 , ON )
SWITCH_GENERATOR ( ddamage , ON )
SWITCH_GENERATOR ( ssmg , ON )
SWITCH_GENERATOR ( invi , ON )
SWITCH_GENERATOR ( resp , ON )
SWITCH_GENERATOR ( vbomb , ON )
SWITCH_GENERATOR ( ivb , ON )
SWITCH_GENERATOR ( ddamage2 , ON )
SWITCH_GENERATOR ( dualp , ON )

WHILE_EXEC (loop=1)
// Respawning cars
IF (IS_CAR_WRECKED(ztype1))
IF (NOT (DELAY (100)))
  IF (NOT (IS_POINT_ONSCREEN(81.5 , 182.5 , 2.0)))
   IF (IS_CAR_IN_BLOCK(ztype1, 81.5,182.5,2.0, 1.0,1.0))
    // Wreck is blocking spawnpoint:
    PUT_CAR_ON_TRAILER (ztype1, truktrns)
   ENDIF
   
   // Spawnpoint is clear:
   DELETE_ITEM (ztype1) //Delete the wreck
   ztype1 = CREATE_GANG_CAR (81.5,182.5,2.0) 2 90 VTYPE END
  ENDIF
ENDIF
ENDIF

IF (IS_CAR_WRECKED(ztype2))
IF (NOT (DELAY (100)))
  IF (NOT (IS_POINT_ONSCREEN(61.0 , 197.5 , 2.0)))
   IF (IS_CAR_IN_BLOCK(ztype2, 61.0,197.5,2.0, 1.0,1.0))
    // Wreck is blocking spawnpoint:
    PUT_CAR_ON_TRAILER (ztype2, truktrns)
   ENDIF
   
   // Spawnpoint is clear:
   DELETE_ITEM (ztype2)
   ztype2 = CREATE_GANG_CAR (61.0,197.5,2.0) 2 180 VTYPE END
  ENDIF
ENDIF
ENDIF

IF (IS_CAR_WRECKED(ztype3))
IF (NOT (DELAY (100)))
  IF (NOT (IS_POINT_ONSCREEN(114.5 , 170.0 , 2.0)))
   IF (IS_CAR_IN_BLOCK(ztype3, 114.5,170.0,2.0))
    // Wreck is blocking spawnpoint:
    PUT_CAR_ON_TRAILER (ztype3, truktrns)
   ENDIF
   
   // Spawnpoint is clear:
   DELETE_ITEM (ztype3)
   ztype3 = CREATE_GANG_CAR (114.5,170.0,2.0) 2 270 VTYPE END
  ENDIF
ENDIF
ENDIF

IF (IS_CAR_WRECKED(ztype4))
IF (NOT (DELAY (100))) 
  IF (NOT (IS_POINT_ONSCREEN(92.5 , 191.5 , 2.0)))
   IF (IS_CAR_IN_BLOCK(ztype4, 92.5 , 191.5 , 2.0, 1.0,1.0))
    // Wreck is blocking spawnpoint:
    PUT_CAR_ON_TRAILER (ztype4, truktrns)
   ENDIF
   
   // Spawnpoint is clear:
   DELETE_ITEM (ztype4)
   ztype4 = CREATE_GANG_CAR (92.5,191.5,2.0) 2 270 VTYPE END
  ENDIF
ENDIF
ENDIF

IF (IS_CAR_WRECKED(ztype5))
IF (NOT (DELAY (100)))
  IF (NOT (IS_POINT_ONSCREEN(51.5 , 174.5 , 2.0)))
   IF (IS_CAR_IN_BLOCK(ztype5, 51.5 , 174.5 , 2.0 , 1.0 , 1.0))
    // Wreck is blocking spawnpoint:
    PUT_CAR_ON_TRAILER (ztype5, truktrns)
   ENDIF
   
   // Spawnpoint is clear:
   DELETE_ITEM (ztype5)
   ztype5 = CREATE_GANG_CAR (51.5 , 174.5 , 2.0) 2 90 VTYPE END
  ENDIF
ENDIF
ENDIF

IF (IS_CAR_WRECKED(ztype6)) 
IF (NOT (DELAY (100)))
  IF (NOT (IS_POINT_ONSCREEN(76.5 , 175.5 , 2.0)))
   IF (IS_CAR_IN_BLOCK(ztype6, 76.5 , 175.5 , 2.0, 1.0,1.0))
    // Wreck is blocking spawnpoint:
    PUT_CAR_ON_TRAILER (ztype6, truktrns)
   ENDIF
   
   // Spawnpoint is clear:
   DELETE_ITEM (ztype6)
   ztype6 = CREATE_GANG_CAR (76.5 , 175.5 , 2.0) 2 00 VTYPE END
  ENDIF
ENDIF
ENDIF

IF (IS_CAR_WRECKED(ztype7))
IF (NOT (DELAY (100)))
  IF (NOT (IS_POINT_ONSCREEN(75.5 , 200.5 , 1.0)))
   IF (IS_CAR_IN_BLOCK(ztype7, 75.5 , 200.5 , 1.0))
    // Wreck is blocking spawnpoint:
    PUT_CAR_ON_TRAILER (ztype7, truktrns)
   ENDIF
   
   // Spawnpoint is clear:
   DELETE_ITEM (ztype7)
   ztype7 = CREATE_GANG_CAR (75.5 , 200.5 , 1.0) 2 180 VTYPE END
   GIVE_WEAPON (ztype7 , CAR_MINE , 20 )
   GIVE_WEAPON (ztype7 , CAR_OIL , 50 )
   GIVE_WEAPON (ztype7 , CAR_MACHINE_GUN , 50 )
   GIVE_WEAPON (ztype7 , CAR_BOMB , 1 )
   GIVE_WEAPON (ztype7 , CAR_BOMB_INSTANT , 1 )
  ENDIF
ENDIF
ENDIF

IF (IS_CAR_WRECKED(ztype8))
IF (NOT (DELAY (100)))
  IF (NOT (IS_POINT_ONSCREEN(76.5 , 201.5 , 1.0)))
   IF (IS_CAR_IN_BLOCK(ztype8, 76.5 , 201.5 , 1.0, 1.0,1.0))
    // Wreck is blocking spawnpoint:
    PUT_CAR_ON_TRAILER (ztype8 , truktrns)
   ENDIF
   
   // Spawnpoint is clear:
   DELETE_ITEM (ztype8)
   ztype8 = CREATE_GANG_CAR (76.5 , 201.5 , 1.0) 2 180 VTYPE END
   GIVE_WEAPON (ztype8 , CAR_MINE , 20 )
   GIVE_WEAPON (ztype8 , CAR_OIL , 50 )
   GIVE_WEAPON (ztype8 , CAR_MACHINE_GUN , 50 )
   GIVE_WEAPON (ztype8 , CAR_BOMB , 1 )
   GIVE_WEAPON (ztype8 , CAR_BOMB_INSTANT , 1 )
   SET_CAR_ROCKETPROOF (ztype8 , ON)
   SET_CAR_FLAMEPROOF (ztype8 , ON)
   SET_CAR_BULLETPROOF (ztype8 , ON)
   SET_CAR_NO_COLLIDE (ztype8)
  ENDIF
ENDIF
ENDIF

IF (IS_CAR_WRECKED(tank1))
IF (NOT (DELAY (100)))
  IF (NOT (IS_POINT_ONSCREEN (98.5 , 200.0 , 1.0)))
   IF (IS_CAR_IN_BLOCK(tank1 , 98.5 , 200.0 , 1.0 , 1.0 , 1.0))
    // Wreck is blocking spawnpoint:
    PUT_CAR_ON_TRAILER (tank1 , truktrns)
   ENDIF
   
   //Spawnpoint is clear:
   DELETE_ITEM (tank1)
   tank1 = CREATE_CAR (98.5 , 199.5 , 2.0) -1 180 TANK END
   GIVE_WEAPON (tank1 , CAR_MINE , 30 )
   GIVE_WEAPON (tank1 , CAR_OIL , 60 )
   GIVE_WEAPON (tank1 , CAR_MACHINE_GUN , 60 )
   GIVE_WEAPON (tank1 , CAR_BOMB , 1 )
   GIVE_WEAPON (tank1 , CAR_BOMB_INSTANT , 1 )
   ENDIF
ENDIF
ENDIF
ENDWHILE

LEVELEND
