

//{ //Header
//Block Fort MEME
//Based on Block Fort Nyan by Sektor GTAMP.com
//Based on Block Fort Wipe Out by Sektor GTAMP.com
//Based on Block Fort Tag by Wario5
//thanks to gustavob for helping to fix the gang bug

//	        N=180
//W=270--------|---------E=90
//            S=0

//formated and enhanced by Elypter
//bff-meme.mis Compiled by Elypter on Monday, March 26, 2012 with codesmith
//}

//{ //Declares

//{ //PlayerDefines
PLAYER_PED p1 = (108.0, 124.0, 1.0) 0 90
PLAYER_PED p2 = (108.0, 124.5, 1.0) 0 90
PLAYER_PED p3 = (108.0, 125.0, 1.0) 0 90
PLAYER_PED p4 = (108.0, 125.5, 1.0) 0 90
PLAYER_PED p5 = (108.0, 126.0, 1.0) 0 90
PLAYER_PED p6 = (108.0, 126.5, 1.0) 0 90
//}

//{ //Player Declares 

//{ //Player1
	//#region player_declare
	//#endregion
	COUNTER p1stopped = 0
	COUNTER p1_trg_ic = 1
	COUNTER p1_incar = 0
	COUNTER p1_trg_ph = 1
	COUNTER p1_phorn = 0
	CAR_DATA p1_v
	CAR_DATA p1_turret
	CHAR_DATA p1_gunman
	CHAR_DATA p1_gunhelper
	CHAR_DATA p1_gangbot1
	CHAR_DATA p1_gangbot2
	CHAR_DATA p1_gangbot3
	CHAR_DATA p1_gangbot4
	COUNTER p1_exit_c = 0
//}



//{ //Player2
	//#region player_declare
	//#endregion
	COUNTER p2stopped = 0
	COUNTER p2_trg_ic = 1
	COUNTER p2_incar = 0
	COUNTER p2_trg_ph = 1
	COUNTER p2_phorn = 0
	CAR_DATA p2_v
	CAR_DATA p2_turret
	CHAR_DATA p2_gunman
	CHAR_DATA p2_gunhelper
	CHAR_DATA p2_gangbot1
	CHAR_DATA p2_gangbot2
	CHAR_DATA p2_gangbot3
	CHAR_DATA p2_gangbot4
	COUNTER p2_exit_c = 0
//}



//{ //Player3
	//#region player_declare
	//#endregion
	COUNTER p3stopped = 0
	COUNTER p3_trg_ic = 1
	COUNTER p3_incar = 0
	COUNTER p3_trg_ph = 1
	COUNTER p3_phorn = 0
	CAR_DATA p3_v
	CAR_DATA p3_turret
	CHAR_DATA p3_gunman
	CHAR_DATA p3_gunhelper
	CHAR_DATA p3_gangbot1
	CHAR_DATA p3_gangbot2
	CHAR_DATA p3_gangbot3
	CHAR_DATA p3_gangbot4
	COUNTER p3_exit_c = 0
//}



//{ //Player4
	//#region player_declare
	//#endregion
	COUNTER p4stopped = 0
	COUNTER p4_trg_ic = 1
	COUNTER p4_incar = 0
	COUNTER p4_trg_ph = 1
	COUNTER p4_phorn = 0
	CAR_DATA p4_v
	CAR_DATA p4_turret
	CHAR_DATA p4_gunman
	CHAR_DATA p4_gunhelper
	CHAR_DATA p4_gangbot1
	CHAR_DATA p4_gangbot2
	CHAR_DATA p4_gangbot3
	CHAR_DATA p4_gangbot4
	COUNTER p4_exit_c = 0
//}



//{ //Player5
	//#region player_declare
	//#endregion
	COUNTER p5stopped = 0
	COUNTER p5_trg_ic = 1
	COUNTER p5_incar = 0
	COUNTER p5_trg_ph = 1
	COUNTER p5_phorn = 0
	CAR_DATA p5_v
	CAR_DATA p5_turret
	CHAR_DATA p5_gunman
	CHAR_DATA p5_gunhelper
	CHAR_DATA p5_gangbot1
	CHAR_DATA p5_gangbot2
	CHAR_DATA p5_gangbot3
	CHAR_DATA p5_gangbot4
	COUNTER p5_exit_c = 0
//}



//{ //Player6
	//#region player_declare
	//#endregion
	COUNTER p6stopped = 0
	COUNTER p6_trg_ic = 1
	COUNTER p6_incar = 0
	COUNTER p6_trg_ph = 1
	COUNTER p6_phorn = 0
	CAR_DATA p6_v
	CAR_DATA p6_turret
	CHAR_DATA p6_gunman
	CHAR_DATA p6_gunhelper
	CHAR_DATA p6_gangbot1
	CHAR_DATA p6_gangbot2
	CHAR_DATA p6_gangbot3
	CHAR_DATA p6_gangbot4
	COUNTER p6_exit_c = 0
//}

 //}

//{ //gangs and zones

//thanks to gustavob here for helping to fix the gang bug

//XXXXgang must exist in GMP file or crash and it has to have a name like in that form or gangs wont show up):
//redngang must have that name for 2 hair color peds to work
//SET_GANG_INFO (nullgang, 12, PISTOL, PISTOL, PISTOL, 0, 128.5, 128.5, 2.0, 5, ICECREAM, -1) //causes respectometer graphic bug
SET_GANG_INFO (einsgang, 52, PISTOL, PISTOL, PISTOL, 1, 128.5, 128.5, 2.0, 5, ISETTA, 26) //Loonies, Pinky Pie
SET_GANG_INFO (zweigang, 13, PISTOL, PISTOL, PISTOL, 2, 128.5, 128.5, 2.0, 5, MIURA, 14) //Yakuza, Luna
SET_GANG_INFO (dreigang, 12, PISTOL, SILENCED_MACHINE_GUN, ROCKET_LAUNCHER, 3, 128.5, 129.5, 2.0, 5, VTYPE, 34) //Zaibatsu, Rarity
SET_GANG_INFO (redngang, 9, PISTOL, MACHINE_GUN, MOLOTOV, 4, 129.5, 128.5, 2.0, 5, PICKUP, 10) //Rednecks, Apple Jack
SET_GANG_INFO (funfgang, 19, PISTOL, MACHINE_GUN, FLAME_THROWER, 5, 128.5, 130.5, 2.0, 5, STRATOS, 3) //SRS Scientists, Rainbow Dash
SET_GANG_INFO (sechgang, 45, PISTOL, MOLOTOV, FLAME_THROWER, 6, 130.5, 128.5, 2.0, 5, KRSNABUS, -1) //Hare Krishna, Fluttershy
SET_GANG_INFO (siebgang, 18, PISTOL, SHOTGUN, MACHINE_GUN, 7, 128.5, 131.5, 2.0, 5, BUICK, 27) //Russian Mafia, Twilight Sparkle

MAP_ZONE cityinfo = ( 800 , 550, 0, 0 , 1000 , 0 , 0 , 300, 700 , 0, 450 )
//}

//{ //Conveyor,Crusher,Destructor,Cranes,Trains,Gangs,Shops
CONVEYOR con1 = (135.0, 160.0) (5.0, 25.0) 0 -7

// SHOPS
OBJ_DATA srpayshop01 = (122.0, 115.0, 2.0) 0 CAR_SHOP 2 // black bottom right
OBJ_DATA sprayshop02 = (103.0, 115.0, 2.0) 0 CAR_SHOP 5 // green bottom left
OBJ_DATA sprayshop03 = (103.0, 97.0, 2.0) 0 CAR_SHOP 10 // yellow top left
OBJ_DATA sprayshop04 = (122.0, 97.0, 2.0) 0 CAR_SHOP 33 // white top right
//}

//{ //Collectibles
// HEALTH
GENERATOR HEALTH01 = (83.5, 106.5) 0 COLLECT_30 0 0 20 // left
GENERATOR HEALTH02 = (141.5, 106.5) 0 COLLECT_30 0 0 20 // right
GENERATOR HEALTH03 = (112.5, 67.5) 0 COLLECT_30 0 0 20 // top
GENERATOR HEALTH04 = (112.5, 144.5) 0 COLLECT_30 0 0 20 // bottom
GENERATOR HEALTH05 = (112.5, 106.5) 0 COLLECT_30 0 0 20 // center

// INSTANT GANGS
GENERATOR GANG01 = (87.5, 71.5) 0 COLLECT_40 0 0 20
GENERATOR GANG02 = (137.5, 71.5) 0 COLLECT_40 0 0 20
GENERATOR GANG03 = (137.5, 140.5) 0 COLLECT_40 0 0 20
GENERATOR GANG04 = (87.5, 140.5) 0 COLLECT_40 0 0 20

// EXPLOSIVES
GENERATOR MOLI01 = (122.5, 92.5) 0 COLLECT_04 2500 2500 10
GENERATOR MOLI02 = (122.5, 120.5) 0 COLLECT_04 2500 2500 10
GENERATOR MOLI03 = (102.5, 120.5) 0 COLLECT_04 2500 2500 10
GENERATOR MOLI04 = (102.5, 92.5) 0 COLLECT_04 2500 2500 10
GENERATOR MOLI05 = (112.5, 84.5) 0 COLLECT_04 2500 2500 10
GENERATOR MOLI06 = (125.0, 101.0) 0 COLLECT_04 2500 2500 10
GENERATOR MOLI07 = (112.5, 97.0) 0 COLLECT_04 2500 2500 10
GENERATOR MOLI08 = (112.5, 115.0) 0 COLLECT_04 2500 2500 10
GENERATOR MOLI09 = (112.5, 131.0) 0 COLLECT_04 2500 2500 10
GENERATOR MOLI10 = (112.5, 81.0) 0 COLLECT_04 2500 2500 10
GENERATOR MOLI11 = (84.5, 125.5) 0 COLLECT_04 2500 2500 10
GENERATOR MOLI12 = (137.5, 106.5) 0 COLLECT_04 2500 2500 10
GENERATOR MOLI13 = (108.5, 103.5) 0 COLLECT_04 2500 2500 10
GENERATOR MOLI14 = (98.0, 73.0) 0 COLLECT_04 2500 2500 10
GENERATOR MOLI15 = (122.5, 144.5) 0 COLLECT_04 2500 2500 10
GENERATOR MOLI16 = (137.5, 91.5) 0 COLLECT_04 2500 2500 10
GENERATOR MOLI17 = (122.0, 106.5) 0 COLLECT_04 2500 2500 10
GENERATOR MOLI18 = (103.0, 106.5) 0 COLLECT_04 2500 2500 10
GENERATOR MOLI19 = (87.5, 106.5) 0 COLLECT_04 2500 2500 10
GENERATOR MOLI20 = (122.5, 139.5) 0 COLLECT_04 2500 2500 10
GENERATOR MOLI21 = (95.0, 106.5) 0 COLLECT_04 2500 2500 10
GENERATOR MOLI22 = (130.0, 106.5) 0 COLLECT_04 2500 2500 10
GENERATOR MOLI23 = (125.0, 111.0) 0 COLLECT_04 2500 2500 10
GENERATOR MOLI24 = (127.0, 73.0) 0 COLLECT_04 2500 2500 10

GENERATOR GREN01 = (133.5, 134.5) 0 COLLECT_05 2500 2500 15
GENERATOR GREN02 = (91.5, 134.5) 0 COLLECT_05 2500 2500 15
GENERATOR GREN03 = (91.5, 77.5) 0 COLLECT_05 2500 2500 15
GENERATOR GREN04 = (133.5, 77.5) 0 COLLECT_05 2500 2500 15

GENERATOR ELECTRO = (112.5, 72.5) 0 COLLECT_03 0 0 99

GENERATOR ZAP01 = (83.0, 56.0, 2.0) 0 COLLECT_03 0 0 99
GENERATOR ZAP02 = (86.0, 56.0, 2.0) 0 COLLECT_03 0 0 99
GENERATOR INSTANTBOMB = (134.5, 169.5, 2.0) 0 COLLECT_23 0 0 99

GENERATOR INVULV = (112.5, 139.5) 0 COLLECT_34 100 100 99
GENERATOR DOUBLEDAMAGE_SE1 = (127.5, 115.5) 0 COLLECT_35 100 300 99
GENERATOR DOUBLEDAMAGE_SE2 = (130.5, 131.5) 0 COLLECT_35 300 300 99
GENERATOR DOUBLEDAMAGE_SE3 = (126.5, 127.5) 0 COLLECT_35 300 300 99

GENERATOR DOUBLEDAMAGE_NE1 = (97.5, 115.5) 0 COLLECT_35 300 300 99
GENERATOR DOUBLEDAMAGE_NE2 = (94.5, 131.5) 0 COLLECT_35 300 300 99
GENERATOR DOUBLEDAMAGE_NE3 = (98.5, 127.5) 0 COLLECT_35 300 300 99

GENERATOR DOUBLEDAMAGE_NW1 = (97.5, 96.5) 0 COLLECT_35 300 300 99
GENERATOR DOUBLEDAMAGE_NW2 = (98.5, 84.5) 0 COLLECT_35 300 300 99
GENERATOR DOUBLEDAMAGE_NW3 = (94.5, 80.5) 0 COLLECT_35 300 300 99

GENERATOR DOUBLEDAMAGE_SW1 = (127.5, 96.5) 0 COLLECT_35 300 300 99
GENERATOR DOUBLEDAMAGE_SW2 = (126.5, 84.5) 0 COLLECT_35 300 300 99
GENERATOR DOUBLEDAMAGE_SW3 = (130.5, 80.5) 0 COLLECT_35 300 300 99

GENERATOR ARMOR1 = (105.0, 113.0) 0 COLLECT_31 0 0 99
GENERATOR ARMOR2 = (105.0, 99.0) 0 COLLECT_31 0 0 99
GENERATOR ARMOR3 = (119.9, 113.1) 0 COLLECT_31 0 0 99
GENERATOR ARMOR4 = (120.0, 99.0) 0 COLLECT_31 0 0 99
//}

//{ //Scripting


//car01 = CREATE_CAR (94.5, 80.5) 2 45 ISETTA END
//car02 = CREATE_CAR (98.5, 84.5) 2 225 ISETTA END
//car03 = CREATE_CAR (130.5, 80.5) 2 315 PICKUP END
//car04 = CREATE_CAR (126.5, 84.5) 2 135 PICKUP END
//car05 = CREATE_CAR (127.5, 96.5) 2 270 KRSNABUS END
//car06 = CREATE_CAR (127.5, 115.5) 2 270 KRSNABUS END
//car07 = CREATE_CAR (130.5, 131.5) 2 225 VTYPE END
//car08 = CREATE_CAR (126.5, 127.5) 2 45 VTYPE END
//car09 = CREATE_CAR (94.5, 131.5) 2 135 MIURA END
//car10 = CREATE_CAR (98.5, 127.5) 2 315 MIURA END
//car11 = CREATE_CAR (97.5, 115.5) 2 90 STRATOS END
//car12 = CREATE_CAR (97.5, 96.5) 2 90 STRATOS END

//car13 = CREATE_CAR (112.5, 68.5) 2 0 EDSEL END



//car01 = CREATE_CAR ( 94.50, 80.50 , 255.00 ) 26 45 ISETTA END
CAR_DATA car01
//car02 = CREATE_CAR ( 98.50, 84.50 , 255.00 ) 26 225 ISETTA END
CAR_DATA car02
//car03 = CREATE_CAR ( 130.50, 80.50 , 255.00 ) 10 315 PICKUP END
CAR_DATA car03
//car04 = CREATE_CAR ( 126.50, 84.50 , 255.00 ) 10 135 PICKUP END
CAR_DATA car04
//car05 = CREATE_CAR ( 127.50, 96.50 , 255.00 ) -1 270 KRSNABUS END
CAR_DATA car05
//car06 = CREATE_CAR ( 127.50, 115.50 , 255.00 ) -1 270 KRSNABUS END
CAR_DATA car06
//car07 = CREATE_CAR ( 130.50, 131.50 , 255.00 ) 34 225 VTYPE END
CAR_DATA car07
//car08 = CREATE_CAR ( 126.50, 127.50 , 255.00 ) 34 45 VTYPE END
CAR_DATA car08
//car09 = CREATE_CAR ( 94.50, 131.50 , 255.00 ) 14 135 MIURA END
CAR_DATA car09
//car10 = CREATE_CAR ( 98.50, 127.50 , 255.00 ) 14 315 MIURA END
CAR_DATA car10
//car11 = CREATE_CAR ( 97.50, 115.50 , 255.00 ) 3 90 STRATOS END
CAR_DATA car11
//car12 = CREATE_CAR ( 97.50, 96.50 , 255.00 ) 3 90 STRATOS END
CAR_DATA car12
//car13 = CREATE_CAR ( 112.50, 145.30 , 255.00 ) -1 270 ICECREAM END
CAR_DATA car13


// gang cars:
CAR_DATA gang_car0
CAR_DATA gang_car1
CAR_DATA gang_car2
CAR_DATA gang_car3
CAR_DATA gang_car4
CAR_DATA gang_car5
CAR_DATA gang_car6
CAR_DATA gang_car7

// car respawning
PARKED_CAR_DATA trailer = (1.0, 1.0) 19 90 TRUKTRNS
CAR_DATA mount
CAR_DATA decal

OBJ_DATA itarget = (112.5, 106.5) 0 INVISIBLE_TARGET

OBJ_DATA del_mine
OBJ_DATA del_oil
COUNTER mineoil_tmr =0
COUNTER mineoil_max = 10

COUNTER ambient=1
COUNTER wait = 0
COUNTER mainloop = 1
COUNTER firstrun=1
//}

//{ //Staic Cars

//PARKED CARS
PARKED_CAR_DATA parked01 = (141.0, 144.5) 2 270 EDSEL
PARKED_CAR_DATA parked02 = (93.0, 115.5) 2 270 EDSEL
PARKED_CAR_DATA parked03 = (93.0, 96.5) 2 270 EDSEL
PARKED_CAR_DATA parked04 = (123.5, 98.1) 2 0 EDSEL
PARKED_CAR_DATA parked05 = (129.5, 79.0) 2 270 EDSEL
PARKED_CAR_DATA parked06 = (97.0, 91.5) 2 270 EDSEL
PARKED_CAR_DATA parked07 = (126.5, 129.5) 2 270 EDSEL
PARKED_CAR_DATA parked08 = (95.5, 133.0) 2 90 EDSEL
PARKED_CAR_DATA parked09 = (132.0, 96.5) 2 90 EDSEL
PARKED_CAR_DATA parked10 = (96.5, 139.5) 2 90 EDSEL
PARKED_CAR_DATA parked11 = (90.5, 145.5) 2 90 EDSEL
PARKED_CAR_DATA parked12 = (129.5, 133.0) 2 270 EDSEL
PARKED_CAR_DATA parked13 = (127.0, 145.0) 2 90 EDSEL
PARKED_CAR_DATA parked14 = (141.5, 122.0) 2 180 EDSEL
PARKED_CAR_DATA parked15 = (141.5, 84.5) 2 180 EDSEL
PARKED_CAR_DATA parked16 = (129.5, 68.0) 2 0 EDSEL
PARKED_CAR_DATA parked17 = (122.5, 68.0) 2 0 EDSEL
PARKED_CAR_DATA parked18 = (85.0, 67.0) 2 0 EDSEL
PARKED_CAR_DATA parked19 = (98.1, 67.0) 2 0 EDSEL
PARKED_CAR_DATA parked20 = (93.0, 81.5) 2 0 EDSEL
PARKED_CAR_DATA parked21 = (84.1, 128.0) 2 0 EDSEL
PARKED_CAR_DATA parked22 = (96.5, 127.5) 2 180 EDSEL
PARKED_CAR_DATA parked23 = (98.5, 82.5) 2 90 EDSEL
PARKED_CAR_DATA parked24 = (126.5, 82.5) 2 270 EDSEL
PARKED_CAR_DATA parked25 = (111.0, 80.0) 2 100 BUS
PARKED_CAR_DATA parked26 = (113.5, 80.0) 2 90 BUS
PARKED_CAR_DATA parked27 = (116.0, 80.0) 2 260 BUS
PARKED_CAR_DATA parked28 = (111.0, 81.9) 2 80 BUS
PARKED_CAR_DATA parked29 = (113.5, 81.9) 2 90 BUS
PARKED_CAR_DATA parked30 = (116.0, 81.9) 2 280 BUS
PARKED_CAR_DATA parked31 = (111.0, 96.0) 2 100 BUS
PARKED_CAR_DATA parked32 = (113.5, 96.0) 2 90 BUS
PARKED_CAR_DATA parked33 = (116.0, 96.0) 2 260 BUS
PARKED_CAR_DATA parked34 = (111.0, 97.9) 2 80 BUS
PARKED_CAR_DATA parked35 = (113.5, 97.9) 2 90 BUS
PARKED_CAR_DATA parked36 = (116.0, 97.9) 2 280 BUS
PARKED_CAR_DATA parked37 = (111.0, 114.0) 2 95 BUS
PARKED_CAR_DATA parked38 = (113.5, 114.0) 2 90 BUS
PARKED_CAR_DATA parked39 = (116.0, 114.0) 2 260 BUS
PARKED_CAR_DATA parked40 = (111.0, 115.9) 2 85 BUS
PARKED_CAR_DATA parked41 = (113.5, 115.9) 2 90 BUS
PARKED_CAR_DATA parked42 = (116.0, 115.9) 2 280 BUS
PARKED_CAR_DATA parked43 = (111.0, 130.0) 2 100 BUS
PARKED_CAR_DATA parked44 = (113.5, 130.0) 2 90 BUS
PARKED_CAR_DATA parked45 = (116.0, 130.0) 2 80 BUS
PARKED_CAR_DATA parked46 = (111.0, 132.0, 6.0) 2 80 BUS
PARKED_CAR_DATA parked47 = (113.5, 131.9) 2 90 BUS
PARKED_CAR_DATA parked48 = (116.0, 131.9) 2 100 BUS
PARKED_CAR_DATA parked49 = (131.0, 106.5, 6.0) 2 0 BUS
PARKED_CAR_DATA parked50 = (94.0, 106.5) 2 0 BUS
PARKED_CAR_DATA parked51 = (129.3, 81.7) 2 225 EDSEL
PARKED_CAR_DATA parked52 = (97.3, 83.3) 2 135 EDSEL
PARKED_CAR_DATA parked53 = (98.5, 129.5) 2 90 EDSEL
PARKED_CAR_DATA parked54 = (124.9, 77.0) 2 270 EDSEL
PARKED_CAR_DATA parked55 = (99.8, 77.0) 2 120 EDSEL
PARKED_CAR_DATA parked56 = (102.0, 135.0) 2 45 EDSEL
PARKED_CAR_DATA parked57 = (132.0, 115.5) 2 90 EDSEL
PARKED_CAR_DATA parked58 = (132.1, 125.0) 2 270 EDSEL
PARKED_CAR_DATA parked59 = (128.3, 123.0) 2 270 EDSEL
PARKED_CAR_DATA parked60 = (127.7, 128.7) 2 315 EDSEL
PARKED_CAR_DATA parked61 = (97.1, 120.0) 2 270 EDSEL
PARKED_CAR_DATA parked62 = (101.9, 127.0) 2 300 EDSEL
PARKED_CAR_DATA parked63 = (127.7, 83.3) 2 45 EDSEL
PARKED_CAR_DATA parked64 = (93.0, 130.5) 2 180 EDSEL
PARKED_CAR_DATA parked65 = (132.0, 130.5) 2 180 EDSEL
PARKED_CAR_DATA parked66 = (132.0, 81.5) 2 0 EDSEL
PARKED_CAR_DATA parked67 = (96.5, 84.5) 2 0 EDSEL
PARKED_CAR_DATA parked68 = (97.2, 128.8) 2 225 EDSEL
PARKED_CAR_DATA parked69 = (128.5, 127.5) 2 180 EDSEL
PARKED_CAR_DATA parked70 = (128.2, 134.9) 2 0 EDSEL
PARKED_CAR_DATA parked71 = (123.0, 84.2) 2 180 EDSEL
PARKED_CAR_DATA parked72 = (95.5, 79.0) 2 90 EDSEL
PARKED_CAR_DATA parked73 = (134.2, 88.2) 2 0 EDSEL
PARKED_CAR_DATA parked74 = (90.6, 88.0) 2 335 EDSEL
PARKED_CAR_DATA parked75 = (91.3, 115.4) 2 180 EDSEL
PARKED_CAR_DATA parked76 = (90.4, 126.9) 2 0 EDSEL
PARKED_CAR_DATA parked77 = (85.5, 144.0) 2 90 EDSEL
PARKED_CAR_DATA parked78 = (97.5, 113.0) 2 270 EDSEL
PARKED_CAR_DATA parked79 = (131.9, 113.2) 2 270 EDSEL
PARKED_CAR_DATA parked80 = (136.0, 106.5) 2 270 EDSEL
PARKED_CAR_DATA parked81 = (133.8, 124.0) 2 180 EDSEL
PARKED_CAR_DATA parked82 = (133.8, 127.3) 2 5 EDSEL
PARKED_CAR_DATA parked83 = (96.5, 98.7) 2 270 EDSEL
PARKED_CAR_DATA parked84 = (88.5, 106.5) 2 90 EDSEL
PARKED_CAR_DATA parked85 = (91.1, 96.5) 2 0 EDSEL
PARKED_CAR_DATA parked86 = (101.7, 96.8) 2 0 EDSEL
PARKED_CAR_DATA parked87 = (133.6, 115.3) 2 0 EDSEL
PARKED_CAR_DATA parked88 = (133.8, 97.3) 2 5 EDSEL
//PARKED_CAR_DATA parked89 = (112.5, 145.3) 2 270 EDSEL
PARKED_CAR_DATA parked90 = (127.4, 120.3) 2 90 EDSEL
PARKED_CAR_DATA parked91 = (101.7, 84.2) 2 0 EDSEL
PARKED_CAR_DATA parked92 = (128.0, 94.5) 2 270 EDSEL
PARKED_CAR_DATA parked93 = (128.1, 98.6) 2 270 EDSEL
PARKED_CAR_DATA parked94 = (122.9, 133.1) 2 270 EDSEL
PARKED_CAR_DATA parked95 = (123.0, 128.3) 2 0 EDSEL
PARKED_CAR_DATA parked96 = (128.5, 84.5) 2 0 EDSEL
PARKED_CAR_DATA parked97 = (95.7, 81.7) 2 315 EDSEL
PARKED_CAR_DATA parked98 = (96.9, 135.1) 2 0 EDSEL
PARKED_CAR_DATA parked99 = (123.4, 114.9) 2 180 EDSEL
PARKED_CAR_DATA parked100 = (95.8, 130.2) 2 45 EDSEL
PARKED_CAR_DATA parked101 = (129.3, 130.3) 2 135 EDSEL
PARKED_CAR_DATA parked102 = (101.5, 115.0) 2 0 EDSEL
PARKED_CAR_DATA parked103 = (84.5, 164.0) 2 180 TANK
PARKED_CAR_DATA parked105 = (134.5, 169.5) 2 180 GT24640
PARKED_CAR_DATA parked106 = (131.0, 103.0, 6.0) 2 0 BUS
PARKED_CAR_DATA parked107 = (131.0, 110.0, 6.0) 2 0 BUS
PARKED_CAR_DATA parked108 = (94.0, 103.0) 2 0 BUS
PARKED_CAR_DATA parked109 = (94.0, 110.0) 2 0 BUS

PARKED_CAR_DATA parkedbus00 = (129.0, 106.5) 2 180 BUS
PARKED_CAR_DATA parkedbus01 = (129.0, 103.0) 2 180 BUS
PARKED_CAR_DATA parkedbus02 = (121.0, 105.5) 2 270 BUS
PARKED_CAR_DATA parkedbus03 = (121.0, 104.5) 2 270 BUS
PARKED_CAR_DATA parkedbus04 = (123.0, 108.5, 4.0) 2 90 BUS
PARKED_CAR_DATA parkedbus05 = (123.0, 107.5, 4.0) 2 90 BUS
PARKED_CAR_DATA parkedbus06 = (102.0, 105.5) 2 270 BUS
PARKED_CAR_DATA parkedbus07 = (102.0, 104.5) 2 270 BUS
PARKED_CAR_DATA parkedbus08 = (104.0, 108.5, 4.0) 2 90 BUS
PARKED_CAR_DATA parkedbus09 = (104.0, 107.5, 4.0) 2 90 BUS
PARKED_CAR_DATA parkedbus10 = (96.0, 103.0, 6.0) 2 180 BUS
PARKED_CAR_DATA parkedbus11 = (96.0, 110.0, 6.0) 2 180 BUS
PARKED_CAR_DATA parkedbus12 = (96.0, 106.5, 6.0) 2 180 BUS
PARKED_CAR_DATA parkedbus13 = (129.0, 110.0) 2 180 BUS

//}

//{ //Static Objects
// BARRICADES
OBJ_DATA BOLLARD1 = (131.5, 134.5, 4.0) 90 MINE
OBJ_DATA BOLLARD2 = (131.5, 135.5, 4.0) 90 MINE
OBJ_DATA BOLLARD3 = (133.5, 132.5, 4.0) 0 MINE
OBJ_DATA BOLLARD4 = (134.5, 132.5, 4.0) 0 MINE

OBJ_DATA BOLLARD5 = (90.5, 132.5, 4.0) 0 MINE
OBJ_DATA BOLLARD6 = (91.5, 132.5, 4.0) 0 MINE
OBJ_DATA BOLLARD7 = (93.5, 134.5, 4.0) 90 MINE
OBJ_DATA BOLLARD8 = (93.5, 135.5, 4.0) 90 MINE

OBJ_DATA BOLLARD9 = (90.5, 79.5, 4.0) 0 MINE
OBJ_DATA BOLLARD10 = (91.5, 79.5, 4.0) 0 MINE
OBJ_DATA BOLLARD11 = (93.5, 76.5, 4.0) 90 MINE
OBJ_DATA BOLLARD12 = (93.5, 77.5, 4.0) 90 MINE

OBJ_DATA BOLLARD13 = (131.5, 76.5, 4.0) 90 MINE
OBJ_DATA BOLLARD14 = (131.5, 77.5, 4.0) 90 MINE
OBJ_DATA BOLLARD15 = (133.5, 79.5, 4.0) 0 MINE
OBJ_DATA BOLLARD16 = (134.5, 79.5, 4.0) 0 MINE
OBJ_DATA BOLLARD17 = (84.5, 155.9, 1.0) 0 BOLLARD
OBJ_DATA BOLLARD18 = (84.5, 57.1, 1.0) 0 BOLLARD
//}

//}

LEVELSTART

SOUND teleportsnd

WHILE_EXEC ( mainloop = 1 )

//{ // respawning cars
IF ((firstrun=1) OR (IS_CAR_WRECKED(car01))) //IS_CAR_WRECKED(car01)
 IF ((NOT (DELAY (100))) OR (firstrun=1)) // let explosion happen
  IF (NOT (IS_POINT_ONSCREEN( 94.50, 80.50 , 255.00 )))
   IF (( firstrun=0 ) AND (IS_CAR_IN_BLOCK(car01,  94.50, 80.50 , 255.00 , 1.0, 1.0))) //firstrun=0
    // Wreck is blocking spawnpoint:
	PUT_CAR_ON_TRAILER (car01, trailer)
	DELETE_ITEM (car01)
   ENDIF
   // Spawnpoint is clear:
   car01 = CREATE_GANG_CAR ( 94.50, 80.50 , 255.00 ) 26 45 ISETTA END
   //not working because decals disappear after putting cars on a trailer
   //mount = CREATE_CAR (1.0, 1.0) 0 0 ISETTA MINI_CAR END
   //decal = CREATE_GANG_CAR (1.0, 1.0) 26 0 ISETTA END
   //PUT_CAR_ON_TRAILER (mount, car01)
   //PUT_CAR_ON_TRAILER (decal, mount)
  ENDIF
 ENDIF
ENDIF

IF ((firstrun=1) OR (IS_CAR_WRECKED(car02))) //IS_CAR_WRECKED(car02)
 IF ((NOT (DELAY (100))) OR (firstrun=1)) // let explosion happen
  IF (NOT (IS_POINT_ONSCREEN( 98.50, 84.50 , 255.00 )))
   IF (( firstrun=0 ) AND (IS_CAR_IN_BLOCK(car02,  98.50, 84.50 , 255.00 , 1.0, 1.0))) //firstrun=0
    // Wreck is blocking spawnpoint:
	PUT_CAR_ON_TRAILER (car02, trailer)
	DELETE_ITEM (car02)
   ENDIF
   // Spawnpoint is clear:
   car02 = CREATE_GANG_CAR ( 98.50, 84.50 , 255.00 ) 26 225 ISETTA END
   //not working because decals disappear after putting cars on a trailer
   //mount = CREATE_CAR (1.0, 1.0) 0 0 ISETTA MINI_CAR END
   //decal = CREATE_GANG_CAR (1.0, 1.0) 26 0 ISETTA END
   //PUT_CAR_ON_TRAILER (mount, car02)
   //PUT_CAR_ON_TRAILER (decal, mount)
  ENDIF
 ENDIF
ENDIF

IF ((firstrun=1) OR (IS_CAR_WRECKED(car03))) //IS_CAR_WRECKED(car03)
 IF ((NOT (DELAY (100))) OR (firstrun=1)) // let explosion happen
  IF (NOT (IS_POINT_ONSCREEN( 130.50, 80.50 , 255.00 )))
   IF (( firstrun=0 ) AND (IS_CAR_IN_BLOCK(car03,  130.50, 80.50 , 255.00 , 1.0, 1.0))) //firstrun=0
    // Wreck is blocking spawnpoint:
	PUT_CAR_ON_TRAILER (car03, trailer)
	DELETE_ITEM (car03)
   ENDIF
   // Spawnpoint is clear:
   car03 = CREATE_GANG_CAR ( 130.50, 80.50 , 255.00 ) 10 315 PICKUP END
   //not working because decals disappear after putting cars on a trailer
   //mount = CREATE_CAR (1.0, 1.0) 0 0 ISETTA MINI_CAR END
   //decal = CREATE_GANG_CAR (1.0, 1.0) 10 0 PICKUP END
   //PUT_CAR_ON_TRAILER (mount, car03)
   //PUT_CAR_ON_TRAILER (decal, mount)
  ENDIF
 ENDIF
ENDIF

IF ((firstrun=1) OR (IS_CAR_WRECKED(car04))) //IS_CAR_WRECKED(car04)
 IF ((NOT (DELAY (100))) OR (firstrun=1)) // let explosion happen
  IF (NOT (IS_POINT_ONSCREEN( 126.50, 84.50 , 255.00 )))
   IF (( firstrun=0 ) AND (IS_CAR_IN_BLOCK(car04,  126.50, 84.50 , 255.00 , 1.0, 1.0))) //firstrun=0
    // Wreck is blocking spawnpoint:
	PUT_CAR_ON_TRAILER (car04, trailer)
	DELETE_ITEM (car04)
   ENDIF
   // Spawnpoint is clear:
   car04 = CREATE_GANG_CAR ( 126.50, 84.50 , 255.00 ) 10 135 PICKUP END
   //not working because decals disappear after putting cars on a trailer
   //mount = CREATE_CAR (1.0, 1.0) 0 0 ISETTA MINI_CAR END
   //decal = CREATE_GANG_CAR (1.0, 1.0) 10 0 PICKUP END
   //PUT_CAR_ON_TRAILER (mount, car04)
   //PUT_CAR_ON_TRAILER (decal, mount)
  ENDIF
 ENDIF
ENDIF

IF ((firstrun=1) OR (IS_CAR_WRECKED(car05))) //IS_CAR_WRECKED(car05)
 IF ((NOT (DELAY (100))) OR (firstrun=1)) // let explosion happen
  IF (NOT (IS_POINT_ONSCREEN( 127.50, 96.50 , 255.00 )))
   IF (( firstrun=0 ) AND (IS_CAR_IN_BLOCK(car05,  127.50, 96.50 , 255.00 , 1.0, 1.0))) //firstrun=0
    // Wreck is blocking spawnpoint:
	PUT_CAR_ON_TRAILER (car05, trailer)
	DELETE_ITEM (car05)
   ENDIF
   // Spawnpoint is clear:
   car05 = CREATE_GANG_CAR ( 127.50, 96.50 , 255.00 ) -1 270 KRSNABUS END
   //not working because decals disappear after putting cars on a trailer
   //mount = CREATE_CAR (1.0, 1.0) 0 0 ISETTA MINI_CAR END
   //decal = CREATE_GANG_CAR (1.0, 1.0) -1 0 KRSNABUS END
   //PUT_CAR_ON_TRAILER (mount, car05)
   //PUT_CAR_ON_TRAILER (decal, mount)
  ENDIF
 ENDIF
ENDIF

IF ((firstrun=1) OR (IS_CAR_WRECKED(car06))) //IS_CAR_WRECKED(car06)
 IF ((NOT (DELAY (100))) OR (firstrun=1)) // let explosion happen
  IF (NOT (IS_POINT_ONSCREEN( 127.50, 115.50 , 255.00 )))
   IF (( firstrun=0 ) AND (IS_CAR_IN_BLOCK(car06,  127.50, 115.50 , 255.00 , 1.0, 1.0))) //firstrun=0
    // Wreck is blocking spawnpoint:
	PUT_CAR_ON_TRAILER (car06, trailer)
	DELETE_ITEM (car06)
   ENDIF
   // Spawnpoint is clear:
   car06 = CREATE_GANG_CAR ( 127.50, 115.50 , 255.00 ) -1 270 KRSNABUS END
   //not working because decals disappear after putting cars on a trailer
   //mount = CREATE_CAR (1.0, 1.0) 0 0 ISETTA MINI_CAR END
   //decal = CREATE_GANG_CAR (1.0, 1.0) -1 0 KRSNABUS END
   //PUT_CAR_ON_TRAILER (mount, car06)
   //PUT_CAR_ON_TRAILER (decal, mount)
  ENDIF
 ENDIF
ENDIF

IF ((firstrun=1) OR (IS_CAR_WRECKED(car07))) //IS_CAR_WRECKED(car07)
 IF ((NOT (DELAY (100))) OR (firstrun=1)) // let explosion happen
  IF (NOT (IS_POINT_ONSCREEN( 130.50, 131.50 , 255.00 )))
   IF (( firstrun=0 ) AND (IS_CAR_IN_BLOCK(car07,  130.50, 131.50 , 255.00 , 1.0, 1.0))) //firstrun=0
    // Wreck is blocking spawnpoint:
	PUT_CAR_ON_TRAILER (car07, trailer)
	DELETE_ITEM (car07)
   ENDIF
   // Spawnpoint is clear:
   car07 = CREATE_GANG_CAR ( 130.50, 131.50 , 255.00 ) 34 225 VTYPE END
   //not working because decals disappear after putting cars on a trailer
   //mount = CREATE_CAR (1.0, 1.0) 0 0 ISETTA MINI_CAR END
   //decal = CREATE_GANG_CAR (1.0, 1.0) 34 0 VTYPE END
   //PUT_CAR_ON_TRAILER (mount, car07)
   //PUT_CAR_ON_TRAILER (decal, mount)
  ENDIF
 ENDIF
ENDIF

IF ((firstrun=1) OR (IS_CAR_WRECKED(car08))) //IS_CAR_WRECKED(car08)
 IF ((NOT (DELAY (100))) OR (firstrun=1)) // let explosion happen
  IF (NOT (IS_POINT_ONSCREEN( 126.50, 127.50 , 255.00 )))
   IF (( firstrun=0 ) AND (IS_CAR_IN_BLOCK(car08,  126.50, 127.50 , 255.00 , 1.0, 1.0))) //firstrun=0
    // Wreck is blocking spawnpoint:
	PUT_CAR_ON_TRAILER (car08, trailer)
	DELETE_ITEM (car08)
   ENDIF
   // Spawnpoint is clear:
   car08 = CREATE_GANG_CAR ( 126.50, 127.50 , 255.00 ) 34 45 VTYPE END
   //not working because decals disappear after putting cars on a trailer
   //mount = CREATE_CAR (1.0, 1.0) 0 0 ISETTA MINI_CAR END
   //decal = CREATE_GANG_CAR (1.0, 1.0) 34 0 VTYPE END
   //PUT_CAR_ON_TRAILER (mount, car08)
   //PUT_CAR_ON_TRAILER (decal, mount)
  ENDIF
 ENDIF
ENDIF

IF ((firstrun=1) OR (IS_CAR_WRECKED(car09))) //IS_CAR_WRECKED(car09)
 IF ((NOT (DELAY (100))) OR (firstrun=1)) // let explosion happen
  IF (NOT (IS_POINT_ONSCREEN( 94.50, 131.50 , 255.00 )))
   IF (( firstrun=0 ) AND (IS_CAR_IN_BLOCK(car09,  94.50, 131.50 , 255.00 , 1.0, 1.0))) //firstrun=0
    // Wreck is blocking spawnpoint:
	PUT_CAR_ON_TRAILER (car09, trailer)
	DELETE_ITEM (car09)
   ENDIF
   // Spawnpoint is clear:
   car09 = CREATE_GANG_CAR ( 94.50, 131.50 , 255.00 ) 14 135 MIURA END
   //not working because decals disappear after putting cars on a trailer
   //mount = CREATE_CAR (1.0, 1.0) 0 0 ISETTA MINI_CAR END
   //decal = CREATE_GANG_CAR (1.0, 1.0) 14 0 MIURA END
   //PUT_CAR_ON_TRAILER (mount, car09)
   //PUT_CAR_ON_TRAILER (decal, mount)
  ENDIF
 ENDIF
ENDIF

IF ((firstrun=1) OR (IS_CAR_WRECKED(car10))) //IS_CAR_WRECKED(car10)
 IF ((NOT (DELAY (100))) OR (firstrun=1)) // let explosion happen
  IF (NOT (IS_POINT_ONSCREEN( 98.50, 127.50 , 255.00 )))
   IF (( firstrun=0 ) AND (IS_CAR_IN_BLOCK(car10,  98.50, 127.50 , 255.00 , 1.0, 1.0))) //firstrun=0
    // Wreck is blocking spawnpoint:
	PUT_CAR_ON_TRAILER (car10, trailer)
	DELETE_ITEM (car10)
   ENDIF
   // Spawnpoint is clear:
   car10 = CREATE_GANG_CAR ( 98.50, 127.50 , 255.00 ) 14 315 MIURA END
   //not working because decals disappear after putting cars on a trailer
   //mount = CREATE_CAR (1.0, 1.0) 0 0 ISETTA MINI_CAR END
   //decal = CREATE_GANG_CAR (1.0, 1.0) 14 0 MIURA END
   //PUT_CAR_ON_TRAILER (mount, car10)
   //PUT_CAR_ON_TRAILER (decal, mount)
  ENDIF
 ENDIF
ENDIF

IF ((firstrun=1) OR (IS_CAR_WRECKED(car11))) //IS_CAR_WRECKED(car11)
 IF ((NOT (DELAY (100))) OR (firstrun=1)) // let explosion happen
  IF (NOT (IS_POINT_ONSCREEN( 97.50, 115.50 , 255.00 )))
   IF (( firstrun=0 ) AND (IS_CAR_IN_BLOCK(car11,  97.50, 115.50 , 255.00 , 1.0, 1.0))) //firstrun=0
    // Wreck is blocking spawnpoint:
	PUT_CAR_ON_TRAILER (car11, trailer)
	DELETE_ITEM (car11)
   ENDIF
   // Spawnpoint is clear:
   car11 = CREATE_GANG_CAR ( 97.50, 115.50 , 255.00 ) 3 90 STRATOS END
   //not working because decals disappear after putting cars on a trailer
   //mount = CREATE_CAR (1.0, 1.0) 0 0 ISETTA MINI_CAR END
   //decal = CREATE_GANG_CAR (1.0, 1.0) 3 0 STRATOS END
   //PUT_CAR_ON_TRAILER (mount, car11)
   //PUT_CAR_ON_TRAILER (decal, mount)
  ENDIF
 ENDIF
ENDIF

IF ((firstrun=1) OR (IS_CAR_WRECKED(car12))) //IS_CAR_WRECKED(car12)
 IF ((NOT (DELAY (100))) OR (firstrun=1)) // let explosion happen
  IF (NOT (IS_POINT_ONSCREEN( 97.50, 96.50 , 255.00 )))
   IF (( firstrun=0 ) AND (IS_CAR_IN_BLOCK(car12,  97.50, 96.50 , 255.00 , 1.0, 1.0))) //firstrun=0
    // Wreck is blocking spawnpoint:
	PUT_CAR_ON_TRAILER (car12, trailer)
	DELETE_ITEM (car12)
   ENDIF
   // Spawnpoint is clear:
   car12 = CREATE_GANG_CAR ( 97.50, 96.50 , 255.00 ) 3 90 STRATOS END
   //not working because decals disappear after putting cars on a trailer
   //mount = CREATE_CAR (1.0, 1.0) 0 0 ISETTA MINI_CAR END
   //decal = CREATE_GANG_CAR (1.0, 1.0) 3 0 STRATOS END
   //PUT_CAR_ON_TRAILER (mount, car12)
   //PUT_CAR_ON_TRAILER (decal, mount)
  ENDIF
 ENDIF
ENDIF

IF ((firstrun=1) OR (IS_CAR_WRECKED(car13))) //IS_CAR_WRECKED(car13)
 IF ((NOT (DELAY (100))) OR (firstrun=1)) // let explosion happen
  IF (NOT (IS_POINT_ONSCREEN( 112.50, 145.30 , 255.00 )))
   IF (( firstrun=0 ) AND (IS_CAR_IN_BLOCK(car13,  112.50, 145.30 , 255.00 , 1.0, 1.0))) //firstrun=0
    // Wreck is blocking spawnpoint:
	PUT_CAR_ON_TRAILER (car13, trailer)
	DELETE_ITEM (car13)
   ENDIF
   // Spawnpoint is clear:
   car13 = CREATE_GANG_CAR ( 112.50, 145.30 , 255.00 ) -1 270 ICECREAM END
   //not working because decals disappear after putting cars on a trailer
   //mount = CREATE_CAR (1.0, 1.0) 0 0 ISETTA MINI_CAR END
   //decal = CREATE_GANG_CAR (1.0, 1.0) -1 0 ICECREAM END
   //PUT_CAR_ON_TRAILER (mount, car13)
   //PUT_CAR_ON_TRAILER (decal, mount)
  ENDIF
 ENDIF
ENDIF

//}

IF (firstrun=1)

// gang cars:

//gang_car0 = CREATE_GANG_CAR (127.9, 93.6) -1 0 ICECREAM END
//gang_car1 = CREATE_GANG_CAR (122.3, 93.8) 26 0 ISETTA END
//gang_car2 = CREATE_GANG_CAR (123.0, 93.7) 14 0 MIURA END
//gang_car3 = CREATE_GANG_CAR (123.8, 93.7) 34 0 VTYPE END
//gang_car4 = CREATE_GANG_CAR (124.6, 93.7) 10 0 PICKUP END
//gang_car5 = CREATE_GANG_CAR (125.4, 93.7) 3 0 STRATOS END
//gang_car6 = CREATE_GANG_CAR (126.2, 93.5) -1 0 KRSNABUS END
//gang_car7 = CREATE_GANG_CAR (127.0, 93.7) 27 0 BUICK END

// Maximum brightness:
SET_AMBIENT_LEVEL  (1.0, 0)

// POLICE
DECLARE_POLICELEVEL (6)

//{ // Gangs
SET_GANG_KILL_REACTION (einsgang, einsgang, 1)
SET_GANG_KILL_REACTION (zweigang, zweigang, 1)
SET_GANG_KILL_REACTION (dreigang, dreigang, 1)
SET_GANG_KILL_REACTION (redngang, redngang, 1)
SET_GANG_KILL_REACTION (funfgang, funfgang, 1)
SET_GANG_KILL_REACTION (sechgang, sechgang, 1)
SET_GANG_KILL_REACTION (siebgang, siebgang, 1)
//}

GIVE_WEAPON ( parked105, CAR_BOMB_INSTANT )

DISPLAY_BRIEF_NOW (1001)

//{ //Cars

//}

//{ //Score
ADD_SCORE ( p1, 1000000 )
ADD_SCORE ( p2, 1000000 )
ADD_SCORE ( p3, 1000000 )
ADD_SCORE ( p4, 1000000 )
ADD_SCORE ( p5, 1000000 )
ADD_SCORE ( p6, 1000000 )
//}

//{ //Generators
SWITCH_GENERATOR ( HEALTH01 , ON )
SWITCH_GENERATOR ( HEALTH02 , ON )
SWITCH_GENERATOR ( HEALTH03 , ON )
SWITCH_GENERATOR ( HEALTH04 , ON )
SWITCH_GENERATOR ( HEALTH05 , ON )

SWITCH_GENERATOR ( GANG01 , ON )
SWITCH_GENERATOR ( GANG02 , ON )
SWITCH_GENERATOR ( GANG03 , ON )
SWITCH_GENERATOR ( GANG04 , ON )

SWITCH_GENERATOR ( MOLI01 , ON )
SWITCH_GENERATOR ( MOLI02 , ON )
SWITCH_GENERATOR ( MOLI03 , ON )
SWITCH_GENERATOR ( MOLI04 , ON )
SWITCH_GENERATOR ( MOLI05 , ON )
SWITCH_GENERATOR ( MOLI06 , ON )
SWITCH_GENERATOR ( MOLI07 , ON )
SWITCH_GENERATOR ( MOLI08 , ON )
SWITCH_GENERATOR ( MOLI09 , ON )
SWITCH_GENERATOR ( MOLI10 , ON )
SWITCH_GENERATOR ( MOLI11 , ON )
SWITCH_GENERATOR ( MOLI12 , ON )
SWITCH_GENERATOR ( MOLI13 , ON )
SWITCH_GENERATOR ( MOLI14 , ON )
SWITCH_GENERATOR ( MOLI15 , ON )
SWITCH_GENERATOR ( MOLI16 , ON )
SWITCH_GENERATOR ( MOLI17 , ON )
SWITCH_GENERATOR ( MOLI18 , ON )
SWITCH_GENERATOR ( MOLI19 , ON )
SWITCH_GENERATOR ( MOLI20 , ON )
SWITCH_GENERATOR ( MOLI21 , ON )
SWITCH_GENERATOR ( MOLI22 , ON )
SWITCH_GENERATOR ( MOLI23 , ON )
SWITCH_GENERATOR ( MOLI24 , ON )
SWITCH_GENERATOR ( GREN01 , ON )
SWITCH_GENERATOR ( GREN02 , ON )
SWITCH_GENERATOR ( GREN03 , ON )
SWITCH_GENERATOR ( GREN04 , ON )

SWITCH_GENERATOR ( ELECTRO , ON )

SWITCH_GENERATOR ( ZAP01 , ON )
SWITCH_GENERATOR ( ZAP02 , ON )

SWITCH_GENERATOR ( INSTANTBOMB , ON )

SWITCH_GENERATOR ( INVULV , ON )

SWITCH_GENERATOR ( DOUBLEDAMAGE_SE1 , ON )
SWITCH_GENERATOR ( DOUBLEDAMAGE_SE2 , ON )
SWITCH_GENERATOR ( DOUBLEDAMAGE_SE3 , ON )

SWITCH_GENERATOR ( DOUBLEDAMAGE_NE1 , ON )
SWITCH_GENERATOR ( DOUBLEDAMAGE_NE2 , ON )
SWITCH_GENERATOR ( DOUBLEDAMAGE_NE3 , ON )

SWITCH_GENERATOR ( DOUBLEDAMAGE_NW1 , ON )
SWITCH_GENERATOR ( DOUBLEDAMAGE_NW2 , ON )
SWITCH_GENERATOR ( DOUBLEDAMAGE_NW3 , ON )

SWITCH_GENERATOR ( DOUBLEDAMAGE_SW1 , ON )
SWITCH_GENERATOR ( DOUBLEDAMAGE_SW2 , ON )
SWITCH_GENERATOR ( DOUBLEDAMAGE_SW3 , ON )

SWITCH_GENERATOR ( ARMOR1 , ON )
SWITCH_GENERATOR ( ARMOR2 , ON )
SWITCH_GENERATOR ( ARMOR3 , ON )
SWITCH_GENERATOR ( ARMOR4 , ON )
//}

//{ //Playerchecks 
IF (CHECK_CHARACTER_HEALTH (p1,0))
	CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (einsgang, p1, 5)
	CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (zweigang, p1, 5)
	CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (dreigang, p1, 5)
	CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (redngang, p1, 5)
	CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (funfgang, p1, 5)
	CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (sechgang, p1, 5)
	CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (siebgang, p1, 5)
	
	p1_v =  CREATE_GANG_CAR (2.0, 2.0) -1 0 ICECREAM END //dummy car to prevent crash at start
ENDIF


IF (CHECK_CHARACTER_HEALTH (p2,0))
	CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (einsgang, p2, 5)
	CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (zweigang, p2, 5)
	CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (dreigang, p2, 5)
	CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (redngang, p2, 5)
	CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (funfgang, p2, 5)
	CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (sechgang, p2, 5)
	CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (siebgang, p2, 5)
	
	p2_v =  CREATE_GANG_CAR (2.0, 2.0) -1 0 ICECREAM END //dummy car to prevent crash at start
ENDIF


IF (CHECK_CHARACTER_HEALTH (p3,0))
	CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (einsgang, p3, 5)
	CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (zweigang, p3, 5)
	CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (dreigang, p3, 5)
	CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (redngang, p3, 5)
	CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (funfgang, p3, 5)
	CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (sechgang, p3, 5)
	CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (siebgang, p3, 5)
	
	p3_v =  CREATE_GANG_CAR (2.0, 2.0) -1 0 ICECREAM END //dummy car to prevent crash at start
ENDIF


IF (CHECK_CHARACTER_HEALTH (p4,0))
	CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (einsgang, p4, 5)
	CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (zweigang, p4, 5)
	CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (dreigang, p4, 5)
	CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (redngang, p4, 5)
	CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (funfgang, p4, 5)
	CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (sechgang, p4, 5)
	CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (siebgang, p4, 5)
	
	p4_v =  CREATE_GANG_CAR (2.0, 2.0) -1 0 ICECREAM END //dummy car to prevent crash at start
ENDIF


IF (CHECK_CHARACTER_HEALTH (p5,0))
	CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (einsgang, p5, 5)
	CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (zweigang, p5, 5)
	CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (dreigang, p5, 5)
	CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (redngang, p5, 5)
	CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (funfgang, p5, 5)
	CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (sechgang, p5, 5)
	CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (siebgang, p5, 5)
	
	p5_v =  CREATE_GANG_CAR (2.0, 2.0) -1 0 ICECREAM END //dummy car to prevent crash at start
ENDIF


IF (CHECK_CHARACTER_HEALTH (p6,0))
	CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (einsgang, p6, 5)
	CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (zweigang, p6, 5)
	CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (dreigang, p6, 5)
	CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (redngang, p6, 5)
	CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (funfgang, p6, 5)
	CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (sechgang, p6, 5)
	CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (siebgang, p6, 5)
	
	p6_v =  CREATE_GANG_CAR (2.0, 2.0) -1 0 ICECREAM END //dummy car to prevent crash at start
ENDIF

 //}

SET firstrun=0
ENDIF

//{ // Player Checks 
IF (CHECK_SCORE_GREATER (p1,0))
	//#region player_loop
	//#endregion

	GIVE_WEAPON ( p1, rocket_launcher , 99 )
	GIVE_WEAPON ( p1, flame_thrower , 99 )

	
	IF ( LOCATE_CHARACTER_BY_CAR ( p1, 127.5, 127.5, 1.0, 255.0, 255.0) ) //IF (HAS_CAR_JUST_SUNK (p1_v))//NOT (IS_ITEM_ONSCREEN (p1_v))
		IF (CHECK_CHARACTER_HEALTH (p1_gunhelper,0))
			KILL_CHAR (p1_gunhelper) //seems to be executed all the time but works to stop crashes
		ENDIF
	ENDIF
	//IF ( LOCATE_CHARACTER_ANY_MEANS ( p1, 84.5, 56.2, 1.0, 1.0, 0.1) )
	
	//{ // CARMODEL CHECK
	IF (IS_CHARACTER_IN_ANY_CAR  ( p1  ) )
		IF (p1_trg_ic=1)
			SET p1_trg_ic=0
			SET p1_exit_c=0
			IF (NOT(IS_CHARACTER_IN_CAR  (  p1  ,  p1_v  )))
				STORE_CAR_CHARACTER_IS_IN ( p1  ,  p1_v  )
				//#region entering_new_vehicle
				//#endregion

				IF (CHECK_CAR_MODEL ( p1_v  ,  ISETTA ))
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (einsgang, p1, 5)
					SET_CAR_FLAMEPROOF ( p1_v, ON )
				ENDIF

				IF (CHECK_CAR_MODEL ( p1_v  ,  MIURA ))
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (zweigang, p1, 5)
					SET_CAR_ROCKETPROOF ( p1_v, ON )
					//SET_CAR_BULLETPROOF ( p1_v, ON ) //too strong
				ENDIF

				IF (CHECK_CAR_MODEL ( p1_v  ,  VTYPE ))
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (dreigang, p1, 5)
					p1_turret = CREATE_CAR (1.0, 1.0, 1.0) 0 180 TANK MINI_CAR END
					PUT_CAR_ON_TRAILER  ( p1_turret  ,  p1_v )
					//not possible. game crashes if car wrecks and if you then get in a new car
					p1_gunhelper = CREATE_CHAR_INSIDE_CAR ( p1_turret ) 8 dummy END 
					ORDER_CHAR_TO_BACKDOOR (p1_gunhelper, p1_turret)
					p1_gunman = CREATE_CHAR_INSIDE_CAR ( p1_turret ) 8 tank_driver END
					//SET_CHAR_OBJECTIVE ( p1_gunman , FIRE_AT_OBJECT_FROM_VEHICLE , itarget )
				ENDIF

				IF (CHECK_CAR_MODEL ( p1_v  ,  PICKUP ))
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (redngang, p1, 5)
					SET_CAR_BULLETPROOF ( p1_v, ON )
				ENDIF
				
				IF (CHECK_CAR_MODEL ( p1_v  ,  STRATOS ))
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (funfgang, p1, 5)
				ENDIF
				
				IF (CHECK_CAR_MODEL ( p1_v  ,  KRSNABUS ))
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (einsgang, p1, 5)
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (zweigang, p1, 5)
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (dreigang, p1, 5)
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (redngang, p1, 5)
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (funfgang, p1, 5)
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (sechgang, p1, 5)
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (siebgang, p1, 5)
				ENDIF
				
				IF (CHECK_CAR_MODEL ( p1_v  ,  BUICK ))
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (siebgang, p1, 5)
				ENDIF
				
			ENDIF

			STORE_CAR_CHARACTER_IS_IN ( p1  ,  p1_v  )
			//#region entering_vehicle
			//#endregion

			IF (CHECK_CAR_MODEL (  p1_v  ,  PICKUP ) )
				//DELAY_HERE(20)

				KILL_ALL_PASSENGERS  (  p1_v  )
				DELETE_ITEM(p1_gangbot1)
				DELETE_ITEM(p1_gangbot2)
				DELETE_ITEM(p1_gangbot3)
				DELETE_ITEM(p1_gangbot4)
			ENDIF

		ENDIF
		DO_NOWT
	ELSE
		IF (p1_trg_ic=0)
			//#region exiting_vehicle
			//#endregion

			IF (CHECK_CAR_MODEL (  p1_v  ,  PICKUP ))
				p1_gangbot1 = CREATE_CHAR_INSIDE_CAR ( p1_v ) 5  PSYCHO END
				//SET_CHAR_THREAT_SEARCH ( p1_gangbot1 , AREA_PLAYER_ONLY )
				ADD_GROUP_TO_CHARACTER ( p1_gangbot1 , 0 )
				MAKE_NEW_LEADER_OF_GROUP ( p1_gangbot1 , p1 )
				SET p1_exit_c=1
			ENDIF

			IF (CHECK_CHARACTER_HEALTH (p1_gunhelper,0))
				KILL_CHAR (p1_gunhelper)
			ENDIF
			
			DO_NOWT

		ENDIF
		SET p1_trg_ic=1
		SET p1_incar = 0
	ENDIF

	IF ( p1_exit_c = 2)
		p1_gangbot2 = CREATE_CHAR_INSIDE_CAR ( p1_v ) 6  PSYCHO END
		ADD_EXISTING_CHAR_TO_GROUP(p1, p1_gangbot2)
	ENDIF
	IF ( p1_exit_c = 3)
		p1_gangbot3 = CREATE_CHAR_INSIDE_CAR ( p1_v ) 5  PSYCHO END
		ADD_EXISTING_CHAR_TO_GROUP(p1, p1_gangbot3)
	ENDIF
	IF ( p1_exit_c = 4)
		p1_gangbot4 = CREATE_CHAR_INSIDE_CAR ( p1_v ) 6  PSYCHO END
		ADD_EXISTING_CHAR_TO_GROUP(p1, p1_gangbot4)
		GIVE_WEAPON (p1_gangbot1, MACHINE_GUN )
		GIVE_WEAPON (p1_gangbot2, SHOTGUN )
		GIVE_WEAPON (p1_gangbot3, DUAL_PISTOL )
		GIVE_WEAPON (p1_gangbot4, MOLOTOV ) //no weapon instead //have to because invincible puncher is too hardcore

		SET_CHAR_INVINCIBLE (p1_gangbot1, ON)
		SET_CHAR_INVINCIBLE (p1_gangbot2, ON)
		SET_CHAR_INVINCIBLE (p1_gangbot3, ON)
		SET_CHAR_INVINCIBLE (p1_gangbot4, ON)
		SET_CHAR_MAX_RUNSPEED  (  p1_gangbot1  ,  0.04   )
		SET_CHAR_MAX_RUNSPEED  (  p1_gangbot2  ,  0.04   )
		SET_CHAR_MAX_RUNSPEED  (  p1_gangbot3  ,  0.04   )
		SET_CHAR_MAX_RUNSPEED  (  p1_gangbot4  ,  0.04   )

	ENDIF
	IF ( p1_exit_c > 0)
		++p1_exit_c
	ENDIF

	IF (p1_trg_ic=0)
		//#region while_in_vehicle
		//#endregion
		
		IF (NOT(CHECK_CAR_MODEL ( p1_v  ,  ICECREAM )))
			GIVE_WEAPON ( p1_v, car_machine_gun, 99 )
		ENDIF
		
		IF (CHECK_CAR_MODEL ( p1_v  ,  KRSNABUS ))
			GIVE_WEAPON ( p1_v, CAR_MINE , 99 )
			GIVE_WEAPON ( p1_v, CAR_BOMB_INSTANT , 99 )
		ENDIF

		IF (CHECK_CAR_MODEL ( p1_v  ,  BUICK ))
			GIVE_WEAPON ( p1_v, CAR_BOMB , 99 )
		ENDIF

		IF (CHECK_CAR_MODEL ( p1_v  ,  PICKUP ))
			GIVE_WEAPON ( p1_v, CAR_OIL , 99 )
		ENDIF
		
		IF (CHECK_CAR_MODEL ( p1_v  ,  VTYPE ))
			ALTER_WANTED_LEVEL(p1, 0)
			//{ // Other Players 
			IF (CHECK_CHARACTER_HEALTH (p2,0))
				ALTER_WANTED_LEVEL_NO_DROP (p2, 4)
			ENDIF
			
			IF (CHECK_CHARACTER_HEALTH (p3,0))
				ALTER_WANTED_LEVEL_NO_DROP (p3, 4)
			ENDIF
			
			IF (CHECK_CHARACTER_HEALTH (p4,0))
				ALTER_WANTED_LEVEL_NO_DROP (p4, 4)
			ENDIF
			
			IF (CHECK_CHARACTER_HEALTH (p5,0))
				ALTER_WANTED_LEVEL_NO_DROP (p5, 4)
			ENDIF
			
			IF (CHECK_CHARACTER_HEALTH (p6,0))
				ALTER_WANTED_LEVEL_NO_DROP (p6, 4)
			ENDIF
			 //}
		ENDIF
		
	ENDIF
	//}

	IF (IS_CHAR_PRESSING_HORN  ( p1 ) )
		IF (p1_trg_ph=1)
			SET p1_trg_ph=0
			//#region start_pressing_horn
			//#endregion

			IF (CHECK_CAR_MODEL ( p1_v  ,  BUICK ))
				WARP_FROM_CAR_TO_POINT (p1, 112.5, 106.5, 2.1, 0)
			ENDIF

			IF (CHECK_CAR_MODEL ( p1_v  ,  VTYPE ))
				SET_CHAR_OBJECTIVE ( p1_gunman , FIRE_AT_OBJECT_FROM_VEHICLE , itarget )
			ENDIF
			
			IF (CHECK_CAR_MODEL ( p1_v  ,  MIURA ))
				IF (ambient=1)
					SET_AMBIENT_LEVEL  (0.1, 2)
					set ambient=0
				ELSE
					SET_AMBIENT_LEVEL  (1.0, 2)
					set ambient=1
				ENDIF
			ENDIF

		ENDIF
		DO_NOWT
	ELSE
		IF (p1_trg_ph=0)
			//#region stop_pressing_horn
			//#endregion

			IF (CHECK_CAR_MODEL ( p1_v  ,  VTYPE ))
				MAKE_CHAR_DO_NOTHING ( p1_gunman )
				MAKE_CHAR_DO_NOTHING ( p1_gunhelper )
			ENDIF

		ENDIF
		SET p1_trg_ph=1
		SET p1_phorn = 0
	ENDIF

	IF (p1_trg_ph=0)
		//#region while_pressing_horn
		//#endregion

		DO_NOWT
	ENDIF

	
	//IF (CHECK_CHARACTER_HEALTH ( p1_gunman , 0 ))
	//	IF (IS_CHAR_FIRING_ONSCREEN ( p1_gunman ))
	//		MAKE_CHAR_DO_NOTHING ( p1_gunman )
	//	ENDIF
	//ENDIF
	
    //Top left teleport tunnel
    IF ( LOCATE_CHARACTER_ANY_MEANS ( p1, 84.5, 56.2, 1.0, 1.0, 0.1) )
		teleportsnd = CREATE_SOUND (84.5, 56.2, 1.0) SCREAM PLAY_INSTANT END
		WARP_FROM_CAR_TO_POINT (p1, 84.5, 156.1, 2.1, 180)
    ENDIF

    //Bottom left teleport tunnel
    IF ( LOCATE_CHARACTER_ANY_MEANS ( p1, 84.5, 156.8, 1.0, 1.0, 0.1) )
		teleportsnd = CREATE_SOUND (84.5, 156.8, 1.0) SCREAM PLAY_INSTANT END
		WARP_FROM_CAR_TO_POINT (p1, 84.5, 56.8, 2.1, 0)
    ENDIF

    IF ( IS_CHAR_ON_FIRE ( p1 ) )
		IF ( LOCATE_CHARACTER_ANY_MEANS ( p1, 112.5, 144.5, 2.0, 1.0, 1.0 ))
			SET_CHAR_INVINCIBLE ( p1 ,  ON   )
		ENDIF
		IF ((( LOCATE_CHARACTER_ANY_MEANS ( p1, 83.5 , 106.5, 2.0, 1.0, 1.0 )) OR ( LOCATE_CHARACTER_ANY_MEANS ( p1, 141.5 , 106.5, 2.0, 1.0, 1.0 )))
		OR (( LOCATE_CHARACTER_ANY_MEANS ( p1, 112.5 , 67.5, 2.0, 1.0, 1.0 )) OR ( LOCATE_CHARACTER_ANY_MEANS ( p1, 112.5 , 106.5, 2.0, 1.0, 1.0 ))))
			SET_CHAR_INVINCIBLE ( p1 ,  ON   )
		ENDIF
    ELSE
		SET_CHAR_INVINCIBLE ( p1 ,OFF )
    ENDIF
ENDIF


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

	GIVE_WEAPON ( p2, rocket_launcher , 99 )
	GIVE_WEAPON ( p2, flame_thrower , 99 )

	
	IF ( LOCATE_CHARACTER_BY_CAR ( p2, 127.5, 127.5, 1.0, 255.0, 255.0) ) //IF (HAS_CAR_JUST_SUNK (p2_v))//NOT (IS_ITEM_ONSCREEN (p2_v))
		IF (CHECK_CHARACTER_HEALTH (p2_gunhelper,0))
			KILL_CHAR (p2_gunhelper) //seems to be executed all the time but works to stop crashes
		ENDIF
	ENDIF
	//IF ( LOCATE_CHARACTER_ANY_MEANS ( p2, 84.5, 56.2, 1.0, 1.0, 0.1) )
	
	//{ // CARMODEL CHECK
	IF (IS_CHARACTER_IN_ANY_CAR  ( p2  ) )
		IF (p2_trg_ic=1)
			SET p2_trg_ic=0
			SET p2_exit_c=0
			IF (NOT(IS_CHARACTER_IN_CAR  (  p2  ,  p2_v  )))
				STORE_CAR_CHARACTER_IS_IN ( p2  ,  p2_v  )
				//#region entering_new_vehicle
				//#endregion

				IF (CHECK_CAR_MODEL ( p2_v  ,  ISETTA ))
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (einsgang, p2, 5)
					SET_CAR_FLAMEPROOF ( p2_v, ON )
				ENDIF

				IF (CHECK_CAR_MODEL ( p2_v  ,  MIURA ))
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (zweigang, p2, 5)
					SET_CAR_ROCKETPROOF ( p2_v, ON )
					//SET_CAR_BULLETPROOF ( p2_v, ON ) //too strong
				ENDIF

				IF (CHECK_CAR_MODEL ( p2_v  ,  VTYPE ))
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (dreigang, p2, 5)
					p2_turret = CREATE_CAR (1.0, 1.0, 1.0) 0 180 TANK MINI_CAR END
					PUT_CAR_ON_TRAILER  ( p2_turret  ,  p2_v )
					//not possible. game crashes if car wrecks and if you then get in a new car
					p2_gunhelper = CREATE_CHAR_INSIDE_CAR ( p2_turret ) 8 dummy END 
					ORDER_CHAR_TO_BACKDOOR (p2_gunhelper, p2_turret)
					p2_gunman = CREATE_CHAR_INSIDE_CAR ( p2_turret ) 8 tank_driver END
					//SET_CHAR_OBJECTIVE ( p2_gunman , FIRE_AT_OBJECT_FROM_VEHICLE , itarget )
				ENDIF

				IF (CHECK_CAR_MODEL ( p2_v  ,  PICKUP ))
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (redngang, p2, 5)
					SET_CAR_BULLETPROOF ( p2_v, ON )
				ENDIF
				
				IF (CHECK_CAR_MODEL ( p2_v  ,  STRATOS ))
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (funfgang, p2, 5)
				ENDIF
				
				IF (CHECK_CAR_MODEL ( p2_v  ,  KRSNABUS ))
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (einsgang, p2, 5)
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (zweigang, p2, 5)
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (dreigang, p2, 5)
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (redngang, p2, 5)
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (funfgang, p2, 5)
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (sechgang, p2, 5)
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (siebgang, p2, 5)
				ENDIF
				
				IF (CHECK_CAR_MODEL ( p2_v  ,  BUICK ))
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (siebgang, p2, 5)
				ENDIF
				
			ENDIF

			STORE_CAR_CHARACTER_IS_IN ( p2  ,  p2_v  )
			//#region entering_vehicle
			//#endregion

			IF (CHECK_CAR_MODEL (  p2_v  ,  PICKUP ) )
				//DELAY_HERE(20)

				KILL_ALL_PASSENGERS  (  p2_v  )
				DELETE_ITEM(p2_gangbot1)
				DELETE_ITEM(p2_gangbot2)
				DELETE_ITEM(p2_gangbot3)
				DELETE_ITEM(p2_gangbot4)
			ENDIF

		ENDIF
		DO_NOWT
	ELSE
		IF (p2_trg_ic=0)
			//#region exiting_vehicle
			//#endregion

			IF (CHECK_CAR_MODEL (  p2_v  ,  PICKUP ))
				p2_gangbot1 = CREATE_CHAR_INSIDE_CAR ( p2_v ) 5  PSYCHO END
				//SET_CHAR_THREAT_SEARCH ( p2_gangbot1 , AREA_PLAYER_ONLY )
				ADD_GROUP_TO_CHARACTER ( p2_gangbot1 , 0 )
				MAKE_NEW_LEADER_OF_GROUP ( p2_gangbot1 , p2 )
				SET p2_exit_c=1
			ENDIF

			IF (CHECK_CHARACTER_HEALTH (p2_gunhelper,0))
				KILL_CHAR (p2_gunhelper)
			ENDIF
			
			DO_NOWT

		ENDIF
		SET p2_trg_ic=1
		SET p2_incar = 0
	ENDIF

	IF ( p2_exit_c = 2)
		p2_gangbot2 = CREATE_CHAR_INSIDE_CAR ( p2_v ) 6  PSYCHO END
		ADD_EXISTING_CHAR_TO_GROUP(p2, p2_gangbot2)
	ENDIF
	IF ( p2_exit_c = 3)
		p2_gangbot3 = CREATE_CHAR_INSIDE_CAR ( p2_v ) 5  PSYCHO END
		ADD_EXISTING_CHAR_TO_GROUP(p2, p2_gangbot3)
	ENDIF
	IF ( p2_exit_c = 4)
		p2_gangbot4 = CREATE_CHAR_INSIDE_CAR ( p2_v ) 6  PSYCHO END
		ADD_EXISTING_CHAR_TO_GROUP(p2, p2_gangbot4)
		GIVE_WEAPON (p2_gangbot1, MACHINE_GUN )
		GIVE_WEAPON (p2_gangbot2, SHOTGUN )
		GIVE_WEAPON (p2_gangbot3, DUAL_PISTOL )
		GIVE_WEAPON (p2_gangbot4, MOLOTOV ) //no weapon instead //have to because invincible puncher is too hardcore

		SET_CHAR_INVINCIBLE (p2_gangbot1, ON)
		SET_CHAR_INVINCIBLE (p2_gangbot2, ON)
		SET_CHAR_INVINCIBLE (p2_gangbot3, ON)
		SET_CHAR_INVINCIBLE (p2_gangbot4, ON)
		SET_CHAR_MAX_RUNSPEED  (  p2_gangbot1  ,  0.04   )
		SET_CHAR_MAX_RUNSPEED  (  p2_gangbot2  ,  0.04   )
		SET_CHAR_MAX_RUNSPEED  (  p2_gangbot3  ,  0.04   )
		SET_CHAR_MAX_RUNSPEED  (  p2_gangbot4  ,  0.04   )

	ENDIF
	IF ( p2_exit_c > 0)
		++p2_exit_c
	ENDIF

	IF (p2_trg_ic=0)
		//#region while_in_vehicle
		//#endregion
		
		IF (NOT(CHECK_CAR_MODEL ( p2_v  ,  ICECREAM )))
			GIVE_WEAPON ( p2_v, car_machine_gun, 99 )
		ENDIF
		
		IF (CHECK_CAR_MODEL ( p2_v  ,  KRSNABUS ))
			GIVE_WEAPON ( p2_v, CAR_MINE , 99 )
			GIVE_WEAPON ( p2_v, CAR_BOMB_INSTANT , 99 )
		ENDIF

		IF (CHECK_CAR_MODEL ( p2_v  ,  BUICK ))
			GIVE_WEAPON ( p2_v, CAR_BOMB , 99 )
		ENDIF

		IF (CHECK_CAR_MODEL ( p2_v  ,  PICKUP ))
			GIVE_WEAPON ( p2_v, CAR_OIL , 99 )
		ENDIF
		
		IF (CHECK_CAR_MODEL ( p2_v  ,  VTYPE ))
			ALTER_WANTED_LEVEL(p2, 0)
			//{ // Other Players 
			IF (CHECK_CHARACTER_HEALTH (p1,0))
				ALTER_WANTED_LEVEL_NO_DROP (p1, 4)
			ENDIF
			
			IF (CHECK_CHARACTER_HEALTH (p3,0))
				ALTER_WANTED_LEVEL_NO_DROP (p3, 4)
			ENDIF
			
			IF (CHECK_CHARACTER_HEALTH (p4,0))
				ALTER_WANTED_LEVEL_NO_DROP (p4, 4)
			ENDIF
			
			IF (CHECK_CHARACTER_HEALTH (p5,0))
				ALTER_WANTED_LEVEL_NO_DROP (p5, 4)
			ENDIF
			
			IF (CHECK_CHARACTER_HEALTH (p6,0))
				ALTER_WANTED_LEVEL_NO_DROP (p6, 4)
			ENDIF
			 //}
		ENDIF
		
	ENDIF
	//}

	IF (IS_CHAR_PRESSING_HORN  ( p2 ) )
		IF (p2_trg_ph=1)
			SET p2_trg_ph=0
			//#region start_pressing_horn
			//#endregion

			IF (CHECK_CAR_MODEL ( p2_v  ,  BUICK ))
				WARP_FROM_CAR_TO_POINT (p2, 112.5, 106.5, 2.1, 0)
			ENDIF

			IF (CHECK_CAR_MODEL ( p2_v  ,  VTYPE ))
				SET_CHAR_OBJECTIVE ( p2_gunman , FIRE_AT_OBJECT_FROM_VEHICLE , itarget )
			ENDIF
			
			IF (CHECK_CAR_MODEL ( p2_v  ,  MIURA ))
				IF (ambient=1)
					SET_AMBIENT_LEVEL  (0.1, 2)
					set ambient=0
				ELSE
					SET_AMBIENT_LEVEL  (1.0, 2)
					set ambient=1
				ENDIF
			ENDIF

		ENDIF
		DO_NOWT
	ELSE
		IF (p2_trg_ph=0)
			//#region stop_pressing_horn
			//#endregion

			IF (CHECK_CAR_MODEL ( p2_v  ,  VTYPE ))
				MAKE_CHAR_DO_NOTHING ( p2_gunman )
				MAKE_CHAR_DO_NOTHING ( p2_gunhelper )
			ENDIF

		ENDIF
		SET p2_trg_ph=1
		SET p2_phorn = 0
	ENDIF

	IF (p2_trg_ph=0)
		//#region while_pressing_horn
		//#endregion

		DO_NOWT
	ENDIF

	
	//IF (CHECK_CHARACTER_HEALTH ( p2_gunman , 0 ))
	//	IF (IS_CHAR_FIRING_ONSCREEN ( p2_gunman ))
	//		MAKE_CHAR_DO_NOTHING ( p2_gunman )
	//	ENDIF
	//ENDIF
	
    //Top left teleport tunnel
    IF ( LOCATE_CHARACTER_ANY_MEANS ( p2, 84.5, 56.2, 1.0, 1.0, 0.1) )
		teleportsnd = CREATE_SOUND (84.5, 56.2, 1.0) SCREAM PLAY_INSTANT END
		WARP_FROM_CAR_TO_POINT (p2, 84.5, 156.1, 2.1, 180)
    ENDIF

    //Bottom left teleport tunnel
    IF ( LOCATE_CHARACTER_ANY_MEANS ( p2, 84.5, 156.8, 1.0, 1.0, 0.1) )
		teleportsnd = CREATE_SOUND (84.5, 156.8, 1.0) SCREAM PLAY_INSTANT END
		WARP_FROM_CAR_TO_POINT (p2, 84.5, 56.8, 2.1, 0)
    ENDIF

    IF ( IS_CHAR_ON_FIRE ( p2 ) )
		IF ( LOCATE_CHARACTER_ANY_MEANS ( p2, 112.5, 144.5, 2.0, 1.0, 1.0 ))
			SET_CHAR_INVINCIBLE ( p2 ,  ON   )
		ENDIF
		IF ((( LOCATE_CHARACTER_ANY_MEANS ( p2, 83.5 , 106.5, 2.0, 1.0, 1.0 )) OR ( LOCATE_CHARACTER_ANY_MEANS ( p2, 141.5 , 106.5, 2.0, 1.0, 1.0 )))
		OR (( LOCATE_CHARACTER_ANY_MEANS ( p2, 112.5 , 67.5, 2.0, 1.0, 1.0 )) OR ( LOCATE_CHARACTER_ANY_MEANS ( p2, 112.5 , 106.5, 2.0, 1.0, 1.0 ))))
			SET_CHAR_INVINCIBLE ( p2 ,  ON   )
		ENDIF
    ELSE
		SET_CHAR_INVINCIBLE ( p2 ,OFF )
    ENDIF
ENDIF


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

	GIVE_WEAPON ( p3, rocket_launcher , 99 )
	GIVE_WEAPON ( p3, flame_thrower , 99 )

	
	IF ( LOCATE_CHARACTER_BY_CAR ( p3, 127.5, 127.5, 1.0, 255.0, 255.0) ) //IF (HAS_CAR_JUST_SUNK (p3_v))//NOT (IS_ITEM_ONSCREEN (p3_v))
		IF (CHECK_CHARACTER_HEALTH (p3_gunhelper,0))
			KILL_CHAR (p3_gunhelper) //seems to be executed all the time but works to stop crashes
		ENDIF
	ENDIF
	//IF ( LOCATE_CHARACTER_ANY_MEANS ( p3, 84.5, 56.2, 1.0, 1.0, 0.1) )
	
	//{ // CARMODEL CHECK
	IF (IS_CHARACTER_IN_ANY_CAR  ( p3  ) )
		IF (p3_trg_ic=1)
			SET p3_trg_ic=0
			SET p3_exit_c=0
			IF (NOT(IS_CHARACTER_IN_CAR  (  p3  ,  p3_v  )))
				STORE_CAR_CHARACTER_IS_IN ( p3  ,  p3_v  )
				//#region entering_new_vehicle
				//#endregion

				IF (CHECK_CAR_MODEL ( p3_v  ,  ISETTA ))
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (einsgang, p3, 5)
					SET_CAR_FLAMEPROOF ( p3_v, ON )
				ENDIF

				IF (CHECK_CAR_MODEL ( p3_v  ,  MIURA ))
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (zweigang, p3, 5)
					SET_CAR_ROCKETPROOF ( p3_v, ON )
					//SET_CAR_BULLETPROOF ( p3_v, ON ) //too strong
				ENDIF

				IF (CHECK_CAR_MODEL ( p3_v  ,  VTYPE ))
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (dreigang, p3, 5)
					p3_turret = CREATE_CAR (1.0, 1.0, 1.0) 0 180 TANK MINI_CAR END
					PUT_CAR_ON_TRAILER  ( p3_turret  ,  p3_v )
					//not possible. game crashes if car wrecks and if you then get in a new car
					p3_gunhelper = CREATE_CHAR_INSIDE_CAR ( p3_turret ) 8 dummy END 
					ORDER_CHAR_TO_BACKDOOR (p3_gunhelper, p3_turret)
					p3_gunman = CREATE_CHAR_INSIDE_CAR ( p3_turret ) 8 tank_driver END
					//SET_CHAR_OBJECTIVE ( p3_gunman , FIRE_AT_OBJECT_FROM_VEHICLE , itarget )
				ENDIF

				IF (CHECK_CAR_MODEL ( p3_v  ,  PICKUP ))
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (redngang, p3, 5)
					SET_CAR_BULLETPROOF ( p3_v, ON )
				ENDIF
				
				IF (CHECK_CAR_MODEL ( p3_v  ,  STRATOS ))
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (funfgang, p3, 5)
				ENDIF
				
				IF (CHECK_CAR_MODEL ( p3_v  ,  KRSNABUS ))
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (einsgang, p3, 5)
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (zweigang, p3, 5)
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (dreigang, p3, 5)
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (redngang, p3, 5)
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (funfgang, p3, 5)
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (sechgang, p3, 5)
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (siebgang, p3, 5)
				ENDIF
				
				IF (CHECK_CAR_MODEL ( p3_v  ,  BUICK ))
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (siebgang, p3, 5)
				ENDIF
				
			ENDIF

			STORE_CAR_CHARACTER_IS_IN ( p3  ,  p3_v  )
			//#region entering_vehicle
			//#endregion

			IF (CHECK_CAR_MODEL (  p3_v  ,  PICKUP ) )
				//DELAY_HERE(20)

				KILL_ALL_PASSENGERS  (  p3_v  )
				DELETE_ITEM(p3_gangbot1)
				DELETE_ITEM(p3_gangbot2)
				DELETE_ITEM(p3_gangbot3)
				DELETE_ITEM(p3_gangbot4)
			ENDIF

		ENDIF
		DO_NOWT
	ELSE
		IF (p3_trg_ic=0)
			//#region exiting_vehicle
			//#endregion

			IF (CHECK_CAR_MODEL (  p3_v  ,  PICKUP ))
				p3_gangbot1 = CREATE_CHAR_INSIDE_CAR ( p3_v ) 5  PSYCHO END
				//SET_CHAR_THREAT_SEARCH ( p3_gangbot1 , AREA_PLAYER_ONLY )
				ADD_GROUP_TO_CHARACTER ( p3_gangbot1 , 0 )
				MAKE_NEW_LEADER_OF_GROUP ( p3_gangbot1 , p3 )
				SET p3_exit_c=1
			ENDIF

			IF (CHECK_CHARACTER_HEALTH (p3_gunhelper,0))
				KILL_CHAR (p3_gunhelper)
			ENDIF
			
			DO_NOWT

		ENDIF
		SET p3_trg_ic=1
		SET p3_incar = 0
	ENDIF

	IF ( p3_exit_c = 2)
		p3_gangbot2 = CREATE_CHAR_INSIDE_CAR ( p3_v ) 6  PSYCHO END
		ADD_EXISTING_CHAR_TO_GROUP(p3, p3_gangbot2)
	ENDIF
	IF ( p3_exit_c = 3)
		p3_gangbot3 = CREATE_CHAR_INSIDE_CAR ( p3_v ) 5  PSYCHO END
		ADD_EXISTING_CHAR_TO_GROUP(p3, p3_gangbot3)
	ENDIF
	IF ( p3_exit_c = 4)
		p3_gangbot4 = CREATE_CHAR_INSIDE_CAR ( p3_v ) 6  PSYCHO END
		ADD_EXISTING_CHAR_TO_GROUP(p3, p3_gangbot4)
		GIVE_WEAPON (p3_gangbot1, MACHINE_GUN )
		GIVE_WEAPON (p3_gangbot2, SHOTGUN )
		GIVE_WEAPON (p3_gangbot3, DUAL_PISTOL )
		GIVE_WEAPON (p3_gangbot4, MOLOTOV ) //no weapon instead //have to because invincible puncher is too hardcore

		SET_CHAR_INVINCIBLE (p3_gangbot1, ON)
		SET_CHAR_INVINCIBLE (p3_gangbot2, ON)
		SET_CHAR_INVINCIBLE (p3_gangbot3, ON)
		SET_CHAR_INVINCIBLE (p3_gangbot4, ON)
		SET_CHAR_MAX_RUNSPEED  (  p3_gangbot1  ,  0.04   )
		SET_CHAR_MAX_RUNSPEED  (  p3_gangbot2  ,  0.04   )
		SET_CHAR_MAX_RUNSPEED  (  p3_gangbot3  ,  0.04   )
		SET_CHAR_MAX_RUNSPEED  (  p3_gangbot4  ,  0.04   )

	ENDIF
	IF ( p3_exit_c > 0)
		++p3_exit_c
	ENDIF

	IF (p3_trg_ic=0)
		//#region while_in_vehicle
		//#endregion
		
		IF (NOT(CHECK_CAR_MODEL ( p3_v  ,  ICECREAM )))
			GIVE_WEAPON ( p3_v, car_machine_gun, 99 )
		ENDIF
		
		IF (CHECK_CAR_MODEL ( p3_v  ,  KRSNABUS ))
			GIVE_WEAPON ( p3_v, CAR_MINE , 99 )
			GIVE_WEAPON ( p3_v, CAR_BOMB_INSTANT , 99 )
		ENDIF

		IF (CHECK_CAR_MODEL ( p3_v  ,  BUICK ))
			GIVE_WEAPON ( p3_v, CAR_BOMB , 99 )
		ENDIF

		IF (CHECK_CAR_MODEL ( p3_v  ,  PICKUP ))
			GIVE_WEAPON ( p3_v, CAR_OIL , 99 )
		ENDIF
		
		IF (CHECK_CAR_MODEL ( p3_v  ,  VTYPE ))
			ALTER_WANTED_LEVEL(p3, 0)
			//{ // Other Players 
			IF (CHECK_CHARACTER_HEALTH (p1,0))
				ALTER_WANTED_LEVEL_NO_DROP (p1, 4)
			ENDIF
			
			IF (CHECK_CHARACTER_HEALTH (p2,0))
				ALTER_WANTED_LEVEL_NO_DROP (p2, 4)
			ENDIF
			
			IF (CHECK_CHARACTER_HEALTH (p4,0))
				ALTER_WANTED_LEVEL_NO_DROP (p4, 4)
			ENDIF
			
			IF (CHECK_CHARACTER_HEALTH (p5,0))
				ALTER_WANTED_LEVEL_NO_DROP (p5, 4)
			ENDIF
			
			IF (CHECK_CHARACTER_HEALTH (p6,0))
				ALTER_WANTED_LEVEL_NO_DROP (p6, 4)
			ENDIF
			 //}
		ENDIF
		
	ENDIF
	//}

	IF (IS_CHAR_PRESSING_HORN  ( p3 ) )
		IF (p3_trg_ph=1)
			SET p3_trg_ph=0
			//#region start_pressing_horn
			//#endregion

			IF (CHECK_CAR_MODEL ( p3_v  ,  BUICK ))
				WARP_FROM_CAR_TO_POINT (p3, 112.5, 106.5, 2.1, 0)
			ENDIF

			IF (CHECK_CAR_MODEL ( p3_v  ,  VTYPE ))
				SET_CHAR_OBJECTIVE ( p3_gunman , FIRE_AT_OBJECT_FROM_VEHICLE , itarget )
			ENDIF
			
			IF (CHECK_CAR_MODEL ( p3_v  ,  MIURA ))
				IF (ambient=1)
					SET_AMBIENT_LEVEL  (0.1, 2)
					set ambient=0
				ELSE
					SET_AMBIENT_LEVEL  (1.0, 2)
					set ambient=1
				ENDIF
			ENDIF

		ENDIF
		DO_NOWT
	ELSE
		IF (p3_trg_ph=0)
			//#region stop_pressing_horn
			//#endregion

			IF (CHECK_CAR_MODEL ( p3_v  ,  VTYPE ))
				MAKE_CHAR_DO_NOTHING ( p3_gunman )
				MAKE_CHAR_DO_NOTHING ( p3_gunhelper )
			ENDIF

		ENDIF
		SET p3_trg_ph=1
		SET p3_phorn = 0
	ENDIF

	IF (p3_trg_ph=0)
		//#region while_pressing_horn
		//#endregion

		DO_NOWT
	ENDIF

	
	//IF (CHECK_CHARACTER_HEALTH ( p3_gunman , 0 ))
	//	IF (IS_CHAR_FIRING_ONSCREEN ( p3_gunman ))
	//		MAKE_CHAR_DO_NOTHING ( p3_gunman )
	//	ENDIF
	//ENDIF
	
    //Top left teleport tunnel
    IF ( LOCATE_CHARACTER_ANY_MEANS ( p3, 84.5, 56.2, 1.0, 1.0, 0.1) )
		teleportsnd = CREATE_SOUND (84.5, 56.2, 1.0) SCREAM PLAY_INSTANT END
		WARP_FROM_CAR_TO_POINT (p3, 84.5, 156.1, 2.1, 180)
    ENDIF

    //Bottom left teleport tunnel
    IF ( LOCATE_CHARACTER_ANY_MEANS ( p3, 84.5, 156.8, 1.0, 1.0, 0.1) )
		teleportsnd = CREATE_SOUND (84.5, 156.8, 1.0) SCREAM PLAY_INSTANT END
		WARP_FROM_CAR_TO_POINT (p3, 84.5, 56.8, 2.1, 0)
    ENDIF

    IF ( IS_CHAR_ON_FIRE ( p3 ) )
		IF ( LOCATE_CHARACTER_ANY_MEANS ( p3, 112.5, 144.5, 2.0, 1.0, 1.0 ))
			SET_CHAR_INVINCIBLE ( p3 ,  ON   )
		ENDIF
		IF ((( LOCATE_CHARACTER_ANY_MEANS ( p3, 83.5 , 106.5, 2.0, 1.0, 1.0 )) OR ( LOCATE_CHARACTER_ANY_MEANS ( p3, 141.5 , 106.5, 2.0, 1.0, 1.0 )))
		OR (( LOCATE_CHARACTER_ANY_MEANS ( p3, 112.5 , 67.5, 2.0, 1.0, 1.0 )) OR ( LOCATE_CHARACTER_ANY_MEANS ( p3, 112.5 , 106.5, 2.0, 1.0, 1.0 ))))
			SET_CHAR_INVINCIBLE ( p3 ,  ON   )
		ENDIF
    ELSE
		SET_CHAR_INVINCIBLE ( p3 ,OFF )
    ENDIF
ENDIF


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

	GIVE_WEAPON ( p4, rocket_launcher , 99 )
	GIVE_WEAPON ( p4, flame_thrower , 99 )

	
	IF ( LOCATE_CHARACTER_BY_CAR ( p4, 127.5, 127.5, 1.0, 255.0, 255.0) ) //IF (HAS_CAR_JUST_SUNK (p4_v))//NOT (IS_ITEM_ONSCREEN (p4_v))
		IF (CHECK_CHARACTER_HEALTH (p4_gunhelper,0))
			KILL_CHAR (p4_gunhelper) //seems to be executed all the time but works to stop crashes
		ENDIF
	ENDIF
	//IF ( LOCATE_CHARACTER_ANY_MEANS ( p4, 84.5, 56.2, 1.0, 1.0, 0.1) )
	
	//{ // CARMODEL CHECK
	IF (IS_CHARACTER_IN_ANY_CAR  ( p4  ) )
		IF (p4_trg_ic=1)
			SET p4_trg_ic=0
			SET p4_exit_c=0
			IF (NOT(IS_CHARACTER_IN_CAR  (  p4  ,  p4_v  )))
				STORE_CAR_CHARACTER_IS_IN ( p4  ,  p4_v  )
				//#region entering_new_vehicle
				//#endregion

				IF (CHECK_CAR_MODEL ( p4_v  ,  ISETTA ))
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (einsgang, p4, 5)
					SET_CAR_FLAMEPROOF ( p4_v, ON )
				ENDIF

				IF (CHECK_CAR_MODEL ( p4_v  ,  MIURA ))
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (zweigang, p4, 5)
					SET_CAR_ROCKETPROOF ( p4_v, ON )
					//SET_CAR_BULLETPROOF ( p4_v, ON ) //too strong
				ENDIF

				IF (CHECK_CAR_MODEL ( p4_v  ,  VTYPE ))
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (dreigang, p4, 5)
					p4_turret = CREATE_CAR (1.0, 1.0, 1.0) 0 180 TANK MINI_CAR END
					PUT_CAR_ON_TRAILER  ( p4_turret  ,  p4_v )
					//not possible. game crashes if car wrecks and if you then get in a new car
					p4_gunhelper = CREATE_CHAR_INSIDE_CAR ( p4_turret ) 8 dummy END 
					ORDER_CHAR_TO_BACKDOOR (p4_gunhelper, p4_turret)
					p4_gunman = CREATE_CHAR_INSIDE_CAR ( p4_turret ) 8 tank_driver END
					//SET_CHAR_OBJECTIVE ( p4_gunman , FIRE_AT_OBJECT_FROM_VEHICLE , itarget )
				ENDIF

				IF (CHECK_CAR_MODEL ( p4_v  ,  PICKUP ))
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (redngang, p4, 5)
					SET_CAR_BULLETPROOF ( p4_v, ON )
				ENDIF
				
				IF (CHECK_CAR_MODEL ( p4_v  ,  STRATOS ))
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (funfgang, p4, 5)
				ENDIF
				
				IF (CHECK_CAR_MODEL ( p4_v  ,  KRSNABUS ))
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (einsgang, p4, 5)
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (zweigang, p4, 5)
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (dreigang, p4, 5)
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (redngang, p4, 5)
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (funfgang, p4, 5)
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (sechgang, p4, 5)
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (siebgang, p4, 5)
				ENDIF
				
				IF (CHECK_CAR_MODEL ( p4_v  ,  BUICK ))
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (siebgang, p4, 5)
				ENDIF
				
			ENDIF

			STORE_CAR_CHARACTER_IS_IN ( p4  ,  p4_v  )
			//#region entering_vehicle
			//#endregion

			IF (CHECK_CAR_MODEL (  p4_v  ,  PICKUP ) )
				//DELAY_HERE(20)

				KILL_ALL_PASSENGERS  (  p4_v  )
				DELETE_ITEM(p4_gangbot1)
				DELETE_ITEM(p4_gangbot2)
				DELETE_ITEM(p4_gangbot3)
				DELETE_ITEM(p4_gangbot4)
			ENDIF

		ENDIF
		DO_NOWT
	ELSE
		IF (p4_trg_ic=0)
			//#region exiting_vehicle
			//#endregion

			IF (CHECK_CAR_MODEL (  p4_v  ,  PICKUP ))
				p4_gangbot1 = CREATE_CHAR_INSIDE_CAR ( p4_v ) 5  PSYCHO END
				//SET_CHAR_THREAT_SEARCH ( p4_gangbot1 , AREA_PLAYER_ONLY )
				ADD_GROUP_TO_CHARACTER ( p4_gangbot1 , 0 )
				MAKE_NEW_LEADER_OF_GROUP ( p4_gangbot1 , p4 )
				SET p4_exit_c=1
			ENDIF

			IF (CHECK_CHARACTER_HEALTH (p4_gunhelper,0))
				KILL_CHAR (p4_gunhelper)
			ENDIF
			
			DO_NOWT

		ENDIF
		SET p4_trg_ic=1
		SET p4_incar = 0
	ENDIF

	IF ( p4_exit_c = 2)
		p4_gangbot2 = CREATE_CHAR_INSIDE_CAR ( p4_v ) 6  PSYCHO END
		ADD_EXISTING_CHAR_TO_GROUP(p4, p4_gangbot2)
	ENDIF
	IF ( p4_exit_c = 3)
		p4_gangbot3 = CREATE_CHAR_INSIDE_CAR ( p4_v ) 5  PSYCHO END
		ADD_EXISTING_CHAR_TO_GROUP(p4, p4_gangbot3)
	ENDIF
	IF ( p4_exit_c = 4)
		p4_gangbot4 = CREATE_CHAR_INSIDE_CAR ( p4_v ) 6  PSYCHO END
		ADD_EXISTING_CHAR_TO_GROUP(p4, p4_gangbot4)
		GIVE_WEAPON (p4_gangbot1, MACHINE_GUN )
		GIVE_WEAPON (p4_gangbot2, SHOTGUN )
		GIVE_WEAPON (p4_gangbot3, DUAL_PISTOL )
		GIVE_WEAPON (p4_gangbot4, MOLOTOV ) //no weapon instead //have to because invincible puncher is too hardcore

		SET_CHAR_INVINCIBLE (p4_gangbot1, ON)
		SET_CHAR_INVINCIBLE (p4_gangbot2, ON)
		SET_CHAR_INVINCIBLE (p4_gangbot3, ON)
		SET_CHAR_INVINCIBLE (p4_gangbot4, ON)
		SET_CHAR_MAX_RUNSPEED  (  p4_gangbot1  ,  0.04   )
		SET_CHAR_MAX_RUNSPEED  (  p4_gangbot2  ,  0.04   )
		SET_CHAR_MAX_RUNSPEED  (  p4_gangbot3  ,  0.04   )
		SET_CHAR_MAX_RUNSPEED  (  p4_gangbot4  ,  0.04   )

	ENDIF
	IF ( p4_exit_c > 0)
		++p4_exit_c
	ENDIF

	IF (p4_trg_ic=0)
		//#region while_in_vehicle
		//#endregion
		
		IF (NOT(CHECK_CAR_MODEL ( p4_v  ,  ICECREAM )))
			GIVE_WEAPON ( p4_v, car_machine_gun, 99 )
		ENDIF
		
		IF (CHECK_CAR_MODEL ( p4_v  ,  KRSNABUS ))
			GIVE_WEAPON ( p4_v, CAR_MINE , 99 )
			GIVE_WEAPON ( p4_v, CAR_BOMB_INSTANT , 99 )
		ENDIF

		IF (CHECK_CAR_MODEL ( p4_v  ,  BUICK ))
			GIVE_WEAPON ( p4_v, CAR_BOMB , 99 )
		ENDIF

		IF (CHECK_CAR_MODEL ( p4_v  ,  PICKUP ))
			GIVE_WEAPON ( p4_v, CAR_OIL , 99 )
		ENDIF
		
		IF (CHECK_CAR_MODEL ( p4_v  ,  VTYPE ))
			ALTER_WANTED_LEVEL(p4, 0)
			//{ // Other Players 
			IF (CHECK_CHARACTER_HEALTH (p1,0))
				ALTER_WANTED_LEVEL_NO_DROP (p1, 4)
			ENDIF
			
			IF (CHECK_CHARACTER_HEALTH (p2,0))
				ALTER_WANTED_LEVEL_NO_DROP (p2, 4)
			ENDIF
			
			IF (CHECK_CHARACTER_HEALTH (p3,0))
				ALTER_WANTED_LEVEL_NO_DROP (p3, 4)
			ENDIF
			
			IF (CHECK_CHARACTER_HEALTH (p5,0))
				ALTER_WANTED_LEVEL_NO_DROP (p5, 4)
			ENDIF
			
			IF (CHECK_CHARACTER_HEALTH (p6,0))
				ALTER_WANTED_LEVEL_NO_DROP (p6, 4)
			ENDIF
			 //}
		ENDIF
		
	ENDIF
	//}

	IF (IS_CHAR_PRESSING_HORN  ( p4 ) )
		IF (p4_trg_ph=1)
			SET p4_trg_ph=0
			//#region start_pressing_horn
			//#endregion

			IF (CHECK_CAR_MODEL ( p4_v  ,  BUICK ))
				WARP_FROM_CAR_TO_POINT (p4, 112.5, 106.5, 2.1, 0)
			ENDIF

			IF (CHECK_CAR_MODEL ( p4_v  ,  VTYPE ))
				SET_CHAR_OBJECTIVE ( p4_gunman , FIRE_AT_OBJECT_FROM_VEHICLE , itarget )
			ENDIF
			
			IF (CHECK_CAR_MODEL ( p4_v  ,  MIURA ))
				IF (ambient=1)
					SET_AMBIENT_LEVEL  (0.1, 2)
					set ambient=0
				ELSE
					SET_AMBIENT_LEVEL  (1.0, 2)
					set ambient=1
				ENDIF
			ENDIF

		ENDIF
		DO_NOWT
	ELSE
		IF (p4_trg_ph=0)
			//#region stop_pressing_horn
			//#endregion

			IF (CHECK_CAR_MODEL ( p4_v  ,  VTYPE ))
				MAKE_CHAR_DO_NOTHING ( p4_gunman )
				MAKE_CHAR_DO_NOTHING ( p4_gunhelper )
			ENDIF

		ENDIF
		SET p4_trg_ph=1
		SET p4_phorn = 0
	ENDIF

	IF (p4_trg_ph=0)
		//#region while_pressing_horn
		//#endregion

		DO_NOWT
	ENDIF

	
	//IF (CHECK_CHARACTER_HEALTH ( p4_gunman , 0 ))
	//	IF (IS_CHAR_FIRING_ONSCREEN ( p4_gunman ))
	//		MAKE_CHAR_DO_NOTHING ( p4_gunman )
	//	ENDIF
	//ENDIF
	
    //Top left teleport tunnel
    IF ( LOCATE_CHARACTER_ANY_MEANS ( p4, 84.5, 56.2, 1.0, 1.0, 0.1) )
		teleportsnd = CREATE_SOUND (84.5, 56.2, 1.0) SCREAM PLAY_INSTANT END
		WARP_FROM_CAR_TO_POINT (p4, 84.5, 156.1, 2.1, 180)
    ENDIF

    //Bottom left teleport tunnel
    IF ( LOCATE_CHARACTER_ANY_MEANS ( p4, 84.5, 156.8, 1.0, 1.0, 0.1) )
		teleportsnd = CREATE_SOUND (84.5, 156.8, 1.0) SCREAM PLAY_INSTANT END
		WARP_FROM_CAR_TO_POINT (p4, 84.5, 56.8, 2.1, 0)
    ENDIF

    IF ( IS_CHAR_ON_FIRE ( p4 ) )
		IF ( LOCATE_CHARACTER_ANY_MEANS ( p4, 112.5, 144.5, 2.0, 1.0, 1.0 ))
			SET_CHAR_INVINCIBLE ( p4 ,  ON   )
		ENDIF
		IF ((( LOCATE_CHARACTER_ANY_MEANS ( p4, 83.5 , 106.5, 2.0, 1.0, 1.0 )) OR ( LOCATE_CHARACTER_ANY_MEANS ( p4, 141.5 , 106.5, 2.0, 1.0, 1.0 )))
		OR (( LOCATE_CHARACTER_ANY_MEANS ( p4, 112.5 , 67.5, 2.0, 1.0, 1.0 )) OR ( LOCATE_CHARACTER_ANY_MEANS ( p4, 112.5 , 106.5, 2.0, 1.0, 1.0 ))))
			SET_CHAR_INVINCIBLE ( p4 ,  ON   )
		ENDIF
    ELSE
		SET_CHAR_INVINCIBLE ( p4 ,OFF )
    ENDIF
ENDIF


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

	GIVE_WEAPON ( p5, rocket_launcher , 99 )
	GIVE_WEAPON ( p5, flame_thrower , 99 )

	
	IF ( LOCATE_CHARACTER_BY_CAR ( p5, 127.5, 127.5, 1.0, 255.0, 255.0) ) //IF (HAS_CAR_JUST_SUNK (p5_v))//NOT (IS_ITEM_ONSCREEN (p5_v))
		IF (CHECK_CHARACTER_HEALTH (p5_gunhelper,0))
			KILL_CHAR (p5_gunhelper) //seems to be executed all the time but works to stop crashes
		ENDIF
	ENDIF
	//IF ( LOCATE_CHARACTER_ANY_MEANS ( p5, 84.5, 56.2, 1.0, 1.0, 0.1) )
	
	//{ // CARMODEL CHECK
	IF (IS_CHARACTER_IN_ANY_CAR  ( p5  ) )
		IF (p5_trg_ic=1)
			SET p5_trg_ic=0
			SET p5_exit_c=0
			IF (NOT(IS_CHARACTER_IN_CAR  (  p5  ,  p5_v  )))
				STORE_CAR_CHARACTER_IS_IN ( p5  ,  p5_v  )
				//#region entering_new_vehicle
				//#endregion

				IF (CHECK_CAR_MODEL ( p5_v  ,  ISETTA ))
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (einsgang, p5, 5)
					SET_CAR_FLAMEPROOF ( p5_v, ON )
				ENDIF

				IF (CHECK_CAR_MODEL ( p5_v  ,  MIURA ))
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (zweigang, p5, 5)
					SET_CAR_ROCKETPROOF ( p5_v, ON )
					//SET_CAR_BULLETPROOF ( p5_v, ON ) //too strong
				ENDIF

				IF (CHECK_CAR_MODEL ( p5_v  ,  VTYPE ))
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (dreigang, p5, 5)
					p5_turret = CREATE_CAR (1.0, 1.0, 1.0) 0 180 TANK MINI_CAR END
					PUT_CAR_ON_TRAILER  ( p5_turret  ,  p5_v )
					//not possible. game crashes if car wrecks and if you then get in a new car
					p5_gunhelper = CREATE_CHAR_INSIDE_CAR ( p5_turret ) 8 dummy END 
					ORDER_CHAR_TO_BACKDOOR (p5_gunhelper, p5_turret)
					p5_gunman = CREATE_CHAR_INSIDE_CAR ( p5_turret ) 8 tank_driver END
					//SET_CHAR_OBJECTIVE ( p5_gunman , FIRE_AT_OBJECT_FROM_VEHICLE , itarget )
				ENDIF

				IF (CHECK_CAR_MODEL ( p5_v  ,  PICKUP ))
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (redngang, p5, 5)
					SET_CAR_BULLETPROOF ( p5_v, ON )
				ENDIF
				
				IF (CHECK_CAR_MODEL ( p5_v  ,  STRATOS ))
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (funfgang, p5, 5)
				ENDIF
				
				IF (CHECK_CAR_MODEL ( p5_v  ,  KRSNABUS ))
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (einsgang, p5, 5)
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (zweigang, p5, 5)
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (dreigang, p5, 5)
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (redngang, p5, 5)
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (funfgang, p5, 5)
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (sechgang, p5, 5)
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (siebgang, p5, 5)
				ENDIF
				
				IF (CHECK_CAR_MODEL ( p5_v  ,  BUICK ))
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (siebgang, p5, 5)
				ENDIF
				
			ENDIF

			STORE_CAR_CHARACTER_IS_IN ( p5  ,  p5_v  )
			//#region entering_vehicle
			//#endregion

			IF (CHECK_CAR_MODEL (  p5_v  ,  PICKUP ) )
				//DELAY_HERE(20)

				KILL_ALL_PASSENGERS  (  p5_v  )
				DELETE_ITEM(p5_gangbot1)
				DELETE_ITEM(p5_gangbot2)
				DELETE_ITEM(p5_gangbot3)
				DELETE_ITEM(p5_gangbot4)
			ENDIF

		ENDIF
		DO_NOWT
	ELSE
		IF (p5_trg_ic=0)
			//#region exiting_vehicle
			//#endregion

			IF (CHECK_CAR_MODEL (  p5_v  ,  PICKUP ))
				p5_gangbot1 = CREATE_CHAR_INSIDE_CAR ( p5_v ) 5  PSYCHO END
				//SET_CHAR_THREAT_SEARCH ( p5_gangbot1 , AREA_PLAYER_ONLY )
				ADD_GROUP_TO_CHARACTER ( p5_gangbot1 , 0 )
				MAKE_NEW_LEADER_OF_GROUP ( p5_gangbot1 , p5 )
				SET p5_exit_c=1
			ENDIF

			IF (CHECK_CHARACTER_HEALTH (p5_gunhelper,0))
				KILL_CHAR (p5_gunhelper)
			ENDIF
			
			DO_NOWT

		ENDIF
		SET p5_trg_ic=1
		SET p5_incar = 0
	ENDIF

	IF ( p5_exit_c = 2)
		p5_gangbot2 = CREATE_CHAR_INSIDE_CAR ( p5_v ) 6  PSYCHO END
		ADD_EXISTING_CHAR_TO_GROUP(p5, p5_gangbot2)
	ENDIF
	IF ( p5_exit_c = 3)
		p5_gangbot3 = CREATE_CHAR_INSIDE_CAR ( p5_v ) 5  PSYCHO END
		ADD_EXISTING_CHAR_TO_GROUP(p5, p5_gangbot3)
	ENDIF
	IF ( p5_exit_c = 4)
		p5_gangbot4 = CREATE_CHAR_INSIDE_CAR ( p5_v ) 6  PSYCHO END
		ADD_EXISTING_CHAR_TO_GROUP(p5, p5_gangbot4)
		GIVE_WEAPON (p5_gangbot1, MACHINE_GUN )
		GIVE_WEAPON (p5_gangbot2, SHOTGUN )
		GIVE_WEAPON (p5_gangbot3, DUAL_PISTOL )
		GIVE_WEAPON (p5_gangbot4, MOLOTOV ) //no weapon instead //have to because invincible puncher is too hardcore

		SET_CHAR_INVINCIBLE (p5_gangbot1, ON)
		SET_CHAR_INVINCIBLE (p5_gangbot2, ON)
		SET_CHAR_INVINCIBLE (p5_gangbot3, ON)
		SET_CHAR_INVINCIBLE (p5_gangbot4, ON)
		SET_CHAR_MAX_RUNSPEED  (  p5_gangbot1  ,  0.04   )
		SET_CHAR_MAX_RUNSPEED  (  p5_gangbot2  ,  0.04   )
		SET_CHAR_MAX_RUNSPEED  (  p5_gangbot3  ,  0.04   )
		SET_CHAR_MAX_RUNSPEED  (  p5_gangbot4  ,  0.04   )

	ENDIF
	IF ( p5_exit_c > 0)
		++p5_exit_c
	ENDIF

	IF (p5_trg_ic=0)
		//#region while_in_vehicle
		//#endregion
		
		IF (NOT(CHECK_CAR_MODEL ( p5_v  ,  ICECREAM )))
			GIVE_WEAPON ( p5_v, car_machine_gun, 99 )
		ENDIF
		
		IF (CHECK_CAR_MODEL ( p5_v  ,  KRSNABUS ))
			GIVE_WEAPON ( p5_v, CAR_MINE , 99 )
			GIVE_WEAPON ( p5_v, CAR_BOMB_INSTANT , 99 )
		ENDIF

		IF (CHECK_CAR_MODEL ( p5_v  ,  BUICK ))
			GIVE_WEAPON ( p5_v, CAR_BOMB , 99 )
		ENDIF

		IF (CHECK_CAR_MODEL ( p5_v  ,  PICKUP ))
			GIVE_WEAPON ( p5_v, CAR_OIL , 99 )
		ENDIF
		
		IF (CHECK_CAR_MODEL ( p5_v  ,  VTYPE ))
			ALTER_WANTED_LEVEL(p5, 0)
			//{ // Other Players 
			IF (CHECK_CHARACTER_HEALTH (p1,0))
				ALTER_WANTED_LEVEL_NO_DROP (p1, 4)
			ENDIF
			
			IF (CHECK_CHARACTER_HEALTH (p2,0))
				ALTER_WANTED_LEVEL_NO_DROP (p2, 4)
			ENDIF
			
			IF (CHECK_CHARACTER_HEALTH (p3,0))
				ALTER_WANTED_LEVEL_NO_DROP (p3, 4)
			ENDIF
			
			IF (CHECK_CHARACTER_HEALTH (p4,0))
				ALTER_WANTED_LEVEL_NO_DROP (p4, 4)
			ENDIF
			
			IF (CHECK_CHARACTER_HEALTH (p6,0))
				ALTER_WANTED_LEVEL_NO_DROP (p6, 4)
			ENDIF
			 //}
		ENDIF
		
	ENDIF
	//}

	IF (IS_CHAR_PRESSING_HORN  ( p5 ) )
		IF (p5_trg_ph=1)
			SET p5_trg_ph=0
			//#region start_pressing_horn
			//#endregion

			IF (CHECK_CAR_MODEL ( p5_v  ,  BUICK ))
				WARP_FROM_CAR_TO_POINT (p5, 112.5, 106.5, 2.1, 0)
			ENDIF

			IF (CHECK_CAR_MODEL ( p5_v  ,  VTYPE ))
				SET_CHAR_OBJECTIVE ( p5_gunman , FIRE_AT_OBJECT_FROM_VEHICLE , itarget )
			ENDIF
			
			IF (CHECK_CAR_MODEL ( p5_v  ,  MIURA ))
				IF (ambient=1)
					SET_AMBIENT_LEVEL  (0.1, 2)
					set ambient=0
				ELSE
					SET_AMBIENT_LEVEL  (1.0, 2)
					set ambient=1
				ENDIF
			ENDIF

		ENDIF
		DO_NOWT
	ELSE
		IF (p5_trg_ph=0)
			//#region stop_pressing_horn
			//#endregion

			IF (CHECK_CAR_MODEL ( p5_v  ,  VTYPE ))
				MAKE_CHAR_DO_NOTHING ( p5_gunman )
				MAKE_CHAR_DO_NOTHING ( p5_gunhelper )
			ENDIF

		ENDIF
		SET p5_trg_ph=1
		SET p5_phorn = 0
	ENDIF

	IF (p5_trg_ph=0)
		//#region while_pressing_horn
		//#endregion

		DO_NOWT
	ENDIF

	
	//IF (CHECK_CHARACTER_HEALTH ( p5_gunman , 0 ))
	//	IF (IS_CHAR_FIRING_ONSCREEN ( p5_gunman ))
	//		MAKE_CHAR_DO_NOTHING ( p5_gunman )
	//	ENDIF
	//ENDIF
	
    //Top left teleport tunnel
    IF ( LOCATE_CHARACTER_ANY_MEANS ( p5, 84.5, 56.2, 1.0, 1.0, 0.1) )
		teleportsnd = CREATE_SOUND (84.5, 56.2, 1.0) SCREAM PLAY_INSTANT END
		WARP_FROM_CAR_TO_POINT (p5, 84.5, 156.1, 2.1, 180)
    ENDIF

    //Bottom left teleport tunnel
    IF ( LOCATE_CHARACTER_ANY_MEANS ( p5, 84.5, 156.8, 1.0, 1.0, 0.1) )
		teleportsnd = CREATE_SOUND (84.5, 156.8, 1.0) SCREAM PLAY_INSTANT END
		WARP_FROM_CAR_TO_POINT (p5, 84.5, 56.8, 2.1, 0)
    ENDIF

    IF ( IS_CHAR_ON_FIRE ( p5 ) )
		IF ( LOCATE_CHARACTER_ANY_MEANS ( p5, 112.5, 144.5, 2.0, 1.0, 1.0 ))
			SET_CHAR_INVINCIBLE ( p5 ,  ON   )
		ENDIF
		IF ((( LOCATE_CHARACTER_ANY_MEANS ( p5, 83.5 , 106.5, 2.0, 1.0, 1.0 )) OR ( LOCATE_CHARACTER_ANY_MEANS ( p5, 141.5 , 106.5, 2.0, 1.0, 1.0 )))
		OR (( LOCATE_CHARACTER_ANY_MEANS ( p5, 112.5 , 67.5, 2.0, 1.0, 1.0 )) OR ( LOCATE_CHARACTER_ANY_MEANS ( p5, 112.5 , 106.5, 2.0, 1.0, 1.0 ))))
			SET_CHAR_INVINCIBLE ( p5 ,  ON   )
		ENDIF
    ELSE
		SET_CHAR_INVINCIBLE ( p5 ,OFF )
    ENDIF
ENDIF


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

	GIVE_WEAPON ( p6, rocket_launcher , 99 )
	GIVE_WEAPON ( p6, flame_thrower , 99 )

	
	IF ( LOCATE_CHARACTER_BY_CAR ( p6, 127.5, 127.5, 1.0, 255.0, 255.0) ) //IF (HAS_CAR_JUST_SUNK (p6_v))//NOT (IS_ITEM_ONSCREEN (p6_v))
		IF (CHECK_CHARACTER_HEALTH (p6_gunhelper,0))
			KILL_CHAR (p6_gunhelper) //seems to be executed all the time but works to stop crashes
		ENDIF
	ENDIF
	//IF ( LOCATE_CHARACTER_ANY_MEANS ( p6, 84.5, 56.2, 1.0, 1.0, 0.1) )
	
	//{ // CARMODEL CHECK
	IF (IS_CHARACTER_IN_ANY_CAR  ( p6  ) )
		IF (p6_trg_ic=1)
			SET p6_trg_ic=0
			SET p6_exit_c=0
			IF (NOT(IS_CHARACTER_IN_CAR  (  p6  ,  p6_v  )))
				STORE_CAR_CHARACTER_IS_IN ( p6  ,  p6_v  )
				//#region entering_new_vehicle
				//#endregion

				IF (CHECK_CAR_MODEL ( p6_v  ,  ISETTA ))
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (einsgang, p6, 5)
					SET_CAR_FLAMEPROOF ( p6_v, ON )
				ENDIF

				IF (CHECK_CAR_MODEL ( p6_v  ,  MIURA ))
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (zweigang, p6, 5)
					SET_CAR_ROCKETPROOF ( p6_v, ON )
					//SET_CAR_BULLETPROOF ( p6_v, ON ) //too strong
				ENDIF

				IF (CHECK_CAR_MODEL ( p6_v  ,  VTYPE ))
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (dreigang, p6, 5)
					p6_turret = CREATE_CAR (1.0, 1.0, 1.0) 0 180 TANK MINI_CAR END
					PUT_CAR_ON_TRAILER  ( p6_turret  ,  p6_v )
					//not possible. game crashes if car wrecks and if you then get in a new car
					p6_gunhelper = CREATE_CHAR_INSIDE_CAR ( p6_turret ) 8 dummy END 
					ORDER_CHAR_TO_BACKDOOR (p6_gunhelper, p6_turret)
					p6_gunman = CREATE_CHAR_INSIDE_CAR ( p6_turret ) 8 tank_driver END
					//SET_CHAR_OBJECTIVE ( p6_gunman , FIRE_AT_OBJECT_FROM_VEHICLE , itarget )
				ENDIF

				IF (CHECK_CAR_MODEL ( p6_v  ,  PICKUP ))
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (redngang, p6, 5)
					SET_CAR_BULLETPROOF ( p6_v, ON )
				ENDIF
				
				IF (CHECK_CAR_MODEL ( p6_v  ,  STRATOS ))
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (funfgang, p6, 5)
				ENDIF
				
				IF (CHECK_CAR_MODEL ( p6_v  ,  KRSNABUS ))
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (einsgang, p6, 5)
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (zweigang, p6, 5)
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (dreigang, p6, 5)
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (redngang, p6, 5)
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (funfgang, p6, 5)
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (sechgang, p6, 5)
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (siebgang, p6, 5)
				ENDIF
				
				IF (CHECK_CAR_MODEL ( p6_v  ,  BUICK ))
					CHANGE_GANG_CHAR_RESPECT_AND_UPDATE  (siebgang, p6, 5)
				ENDIF
				
			ENDIF

			STORE_CAR_CHARACTER_IS_IN ( p6  ,  p6_v  )
			//#region entering_vehicle
			//#endregion

			IF (CHECK_CAR_MODEL (  p6_v  ,  PICKUP ) )
				//DELAY_HERE(20)

				KILL_ALL_PASSENGERS  (  p6_v  )
				DELETE_ITEM(p6_gangbot1)
				DELETE_ITEM(p6_gangbot2)
				DELETE_ITEM(p6_gangbot3)
				DELETE_ITEM(p6_gangbot4)
			ENDIF

		ENDIF
		DO_NOWT
	ELSE
		IF (p6_trg_ic=0)
			//#region exiting_vehicle
			//#endregion

			IF (CHECK_CAR_MODEL (  p6_v  ,  PICKUP ))
				p6_gangbot1 = CREATE_CHAR_INSIDE_CAR ( p6_v ) 5  PSYCHO END
				//SET_CHAR_THREAT_SEARCH ( p6_gangbot1 , AREA_PLAYER_ONLY )
				ADD_GROUP_TO_CHARACTER ( p6_gangbot1 , 0 )
				MAKE_NEW_LEADER_OF_GROUP ( p6_gangbot1 , p6 )
				SET p6_exit_c=1
			ENDIF

			IF (CHECK_CHARACTER_HEALTH (p6_gunhelper,0))
				KILL_CHAR (p6_gunhelper)
			ENDIF
			
			DO_NOWT

		ENDIF
		SET p6_trg_ic=1
		SET p6_incar = 0
	ENDIF

	IF ( p6_exit_c = 2)
		p6_gangbot2 = CREATE_CHAR_INSIDE_CAR ( p6_v ) 6  PSYCHO END
		ADD_EXISTING_CHAR_TO_GROUP(p6, p6_gangbot2)
	ENDIF
	IF ( p6_exit_c = 3)
		p6_gangbot3 = CREATE_CHAR_INSIDE_CAR ( p6_v ) 5  PSYCHO END
		ADD_EXISTING_CHAR_TO_GROUP(p6, p6_gangbot3)
	ENDIF
	IF ( p6_exit_c = 4)
		p6_gangbot4 = CREATE_CHAR_INSIDE_CAR ( p6_v ) 6  PSYCHO END
		ADD_EXISTING_CHAR_TO_GROUP(p6, p6_gangbot4)
		GIVE_WEAPON (p6_gangbot1, MACHINE_GUN )
		GIVE_WEAPON (p6_gangbot2, SHOTGUN )
		GIVE_WEAPON (p6_gangbot3, DUAL_PISTOL )
		GIVE_WEAPON (p6_gangbot4, MOLOTOV ) //no weapon instead //have to because invincible puncher is too hardcore

		SET_CHAR_INVINCIBLE (p6_gangbot1, ON)
		SET_CHAR_INVINCIBLE (p6_gangbot2, ON)
		SET_CHAR_INVINCIBLE (p6_gangbot3, ON)
		SET_CHAR_INVINCIBLE (p6_gangbot4, ON)
		SET_CHAR_MAX_RUNSPEED  (  p6_gangbot1  ,  0.04   )
		SET_CHAR_MAX_RUNSPEED  (  p6_gangbot2  ,  0.04   )
		SET_CHAR_MAX_RUNSPEED  (  p6_gangbot3  ,  0.04   )
		SET_CHAR_MAX_RUNSPEED  (  p6_gangbot4  ,  0.04   )

	ENDIF
	IF ( p6_exit_c > 0)
		++p6_exit_c
	ENDIF

	IF (p6_trg_ic=0)
		//#region while_in_vehicle
		//#endregion
		
		IF (NOT(CHECK_CAR_MODEL ( p6_v  ,  ICECREAM )))
			GIVE_WEAPON ( p6_v, car_machine_gun, 99 )
		ENDIF
		
		IF (CHECK_CAR_MODEL ( p6_v  ,  KRSNABUS ))
			GIVE_WEAPON ( p6_v, CAR_MINE , 99 )
			GIVE_WEAPON ( p6_v, CAR_BOMB_INSTANT , 99 )
		ENDIF

		IF (CHECK_CAR_MODEL ( p6_v  ,  BUICK ))
			GIVE_WEAPON ( p6_v, CAR_BOMB , 99 )
		ENDIF

		IF (CHECK_CAR_MODEL ( p6_v  ,  PICKUP ))
			GIVE_WEAPON ( p6_v, CAR_OIL , 99 )
		ENDIF
		
		IF (CHECK_CAR_MODEL ( p6_v  ,  VTYPE ))
			ALTER_WANTED_LEVEL(p6, 0)
			//{ // Other Players 
			IF (CHECK_CHARACTER_HEALTH (p1,0))
				ALTER_WANTED_LEVEL_NO_DROP (p1, 4)
			ENDIF
			
			IF (CHECK_CHARACTER_HEALTH (p2,0))
				ALTER_WANTED_LEVEL_NO_DROP (p2, 4)
			ENDIF
			
			IF (CHECK_CHARACTER_HEALTH (p3,0))
				ALTER_WANTED_LEVEL_NO_DROP (p3, 4)
			ENDIF
			
			IF (CHECK_CHARACTER_HEALTH (p4,0))
				ALTER_WANTED_LEVEL_NO_DROP (p4, 4)
			ENDIF
			
			IF (CHECK_CHARACTER_HEALTH (p5,0))
				ALTER_WANTED_LEVEL_NO_DROP (p5, 4)
			ENDIF
			 //}
		ENDIF
		
	ENDIF
	//}

	IF (IS_CHAR_PRESSING_HORN  ( p6 ) )
		IF (p6_trg_ph=1)
			SET p6_trg_ph=0
			//#region start_pressing_horn
			//#endregion

			IF (CHECK_CAR_MODEL ( p6_v  ,  BUICK ))
				WARP_FROM_CAR_TO_POINT (p6, 112.5, 106.5, 2.1, 0)
			ENDIF

			IF (CHECK_CAR_MODEL ( p6_v  ,  VTYPE ))
				SET_CHAR_OBJECTIVE ( p6_gunman , FIRE_AT_OBJECT_FROM_VEHICLE , itarget )
			ENDIF
			
			IF (CHECK_CAR_MODEL ( p6_v  ,  MIURA ))
				IF (ambient=1)
					SET_AMBIENT_LEVEL  (0.1, 2)
					set ambient=0
				ELSE
					SET_AMBIENT_LEVEL  (1.0, 2)
					set ambient=1
				ENDIF
			ENDIF

		ENDIF
		DO_NOWT
	ELSE
		IF (p6_trg_ph=0)
			//#region stop_pressing_horn
			//#endregion

			IF (CHECK_CAR_MODEL ( p6_v  ,  VTYPE ))
				MAKE_CHAR_DO_NOTHING ( p6_gunman )
				MAKE_CHAR_DO_NOTHING ( p6_gunhelper )
			ENDIF

		ENDIF
		SET p6_trg_ph=1
		SET p6_phorn = 0
	ENDIF

	IF (p6_trg_ph=0)
		//#region while_pressing_horn
		//#endregion

		DO_NOWT
	ENDIF

	
	//IF (CHECK_CHARACTER_HEALTH ( p6_gunman , 0 ))
	//	IF (IS_CHAR_FIRING_ONSCREEN ( p6_gunman ))
	//		MAKE_CHAR_DO_NOTHING ( p6_gunman )
	//	ENDIF
	//ENDIF
	
    //Top left teleport tunnel
    IF ( LOCATE_CHARACTER_ANY_MEANS ( p6, 84.5, 56.2, 1.0, 1.0, 0.1) )
		teleportsnd = CREATE_SOUND (84.5, 56.2, 1.0) SCREAM PLAY_INSTANT END
		WARP_FROM_CAR_TO_POINT (p6, 84.5, 156.1, 2.1, 180)
    ENDIF

    //Bottom left teleport tunnel
    IF ( LOCATE_CHARACTER_ANY_MEANS ( p6, 84.5, 156.8, 1.0, 1.0, 0.1) )
		teleportsnd = CREATE_SOUND (84.5, 156.8, 1.0) SCREAM PLAY_INSTANT END
		WARP_FROM_CAR_TO_POINT (p6, 84.5, 56.8, 2.1, 0)
    ENDIF

    IF ( IS_CHAR_ON_FIRE ( p6 ) )
		IF ( LOCATE_CHARACTER_ANY_MEANS ( p6, 112.5, 144.5, 2.0, 1.0, 1.0 ))
			SET_CHAR_INVINCIBLE ( p6 ,  ON   )
		ENDIF
		IF ((( LOCATE_CHARACTER_ANY_MEANS ( p6, 83.5 , 106.5, 2.0, 1.0, 1.0 )) OR ( LOCATE_CHARACTER_ANY_MEANS ( p6, 141.5 , 106.5, 2.0, 1.0, 1.0 )))
		OR (( LOCATE_CHARACTER_ANY_MEANS ( p6, 112.5 , 67.5, 2.0, 1.0, 1.0 )) OR ( LOCATE_CHARACTER_ANY_MEANS ( p6, 112.5 , 106.5, 2.0, 1.0, 1.0 ))))
			SET_CHAR_INVINCIBLE ( p6 ,  ON   )
		ENDIF
    ELSE
		SET_CHAR_INVINCIBLE ( p6 ,OFF )
    ENDIF
ENDIF

 //}

//{ // cleanup
IF (mineoil_tmr > 0)
	SET mineoil_tmr = ( mineoil_tmr - 1)
ENDIF
IF (mineoil_tmr = 0)
	SET mineoil_tmr = (mineoil_max + 0)
	del_mine = CREATE_OBJ (1.0, 1.0, 1.0) 0 MINE END
	del_oil = CREATE_OBJ (1.0, 1.0, 1.0) 0 OIL END
ENDIF
//}


ENDWHILE

LEVELEND
