//{ // header
//blast city - awkward cargo
//script and map by elypter
//
//to view this script i highly recommend to use syntax highlighting and code folding for gta mis files with notepad++
//get it from here: http://gtamp.com/forum/viewtopic.php?f=4&t=218

//todo:
//in/out arena death count/score bug?
//fix ship horn sometimes stops //looks like gta bug
//not collected item causes next item not to spawn
//maybe fixed: when exiting car in arena it could hapen that you loose control
//jammed accelerator maybe works only for first opponent car
//maybe fixed: after deaths? or livelosses? on both? sides the initial carlock doesnt work

//max lines: 3014

////arena code
//leaving arena
//-car in air?
// -sunday driver
// -loose
//-else
// -in car?
//  -sunday driver
//  -loose
// -else
//  -no loose?
//   -nothing
//  -else
//   -wait 100 & get in

//after 100
//-job failed
//-loose
//}

//{ //Declares

//{ //Players
PLAYER_PED p1 = (56.5, 69.0, 255.0) 10 90
PLAYER_PED p2 = (59.5, 69.0, 255.0) 11 270
PLAYER_PED p3 = (57.0, 67.5, 255.0) 12 45
PLAYER_PED p4 = (59.0, 70.5, 255.0) 13 225
PLAYER_PED p5 = (57.0, 70.5, 255.0) 14 135
PLAYER_PED p6 = (59.0, 67.5, 255.0) 15 315
//}

//{ //Test cars
/*
CAR_DATA test3 = (61.5, 67.5) 15 270 BANKVAN
CAR_DATA test4 = (61.5, 68.5) 15 270 ICECREAM
CAR_DATA test5 = (61.5, 69.5) 15 270 BUS
CAR_DATA test6 = (61.5, 70.5) 15 270 FIRETRUK
CAR_DATA test7 = (54.0, 67.5) 15 90 APC
CAR_DATA test8 = (54.0, 68.5) 15 90 SWATVAN
CAR_DATA test9 = (54.0, 69.5) 15 90 KRSNABUS
CAR_DATA test10 = (54.0, 70.5) 15 90 VTYPE
CAR_DATA test11 = (61.5, 66.6) 15 270 MONSTER
CAR_DATA test12 = (61.5, 71.4) 15 270 ZCX5
CAR_DATA test21 = (54.0, 66.6) 15 90 TRUKCAB1
CAR_DATA test22 = (54.0, 71.4) 15 90 BUICK


CAR_DATA test1 = (54.5, 76.5) 15 90 MEDICAR
CAR_DATA test2 = (54.5, 75.5) 15 90 LIMO
CAR_DATA test13 = (61.5, 79.4) 15 270 STRIPETB
CAR_DATA test14 = (54.5, 79.4) 15 90 JEFFREY
CAR_DATA test15 = (61.5, 78.5) 15 270 ISETTA
CAR_DATA test16 = (61.5, 77.5) 15 270 TRUKCAB1
CAR_DATA test17 = (61.5, 76.5) 15 270 EDSEL
CAR_DATA test18 = (61.5, 75.5) 15 270 TAXI
CAR_DATA test19 = (54.5, 78.5) 15 90 TRUKCONT
CAR_DATA test20 = (54.5, 77.5) 15 90 TRUKCONT
*/
//}

//{ //cars

CAR_DATA p1_v
CAR_DATA p2_v
CAR_DATA p3_v
CAR_DATA p4_v
CAR_DATA p5_v
CAR_DATA p6_v


CAR_DATA car01
CAR_DATA car02
CAR_DATA car03
CAR_DATA car04
CAR_DATA car05
CAR_DATA car06

CAR_DATA car07
CAR_DATA car08
CAR_DATA car09
CAR_DATA car10
CAR_DATA car11
CAR_DATA car12

CAR_DATA car13
CAR_DATA car14
CAR_DATA car15
CAR_DATA car16
CAR_DATA car17
CAR_DATA car18

CAR_DATA car19
CAR_DATA car20
CAR_DATA car21
CAR_DATA car22
CAR_DATA car23
CAR_DATA car24


//}

//{ //static sounds
SOUND engine1 = (58.0, 73.0, 6.4) INDUSTRIAL_HIGH PLAY_FOREVER
SOUND engine4 = (58.0, 63.5, 4.0) INDUSTRIAL_HIGH PLAY_FOREVER
SOUND engine6 = (58.0, 78.5, 4.0) INDUSTRIAL_HIGH PLAY_FOREVER
SOUND engine8 = (58.0, 68.5, 5.0) INDUSTRIAL_HIGH PLAY_FOREVER
SOUND water06 = (63.0, 62.5, 4.0) WATERFALL PLAY_FOREVER
SOUND water07 = (53.0, 62.5, 4.0) WATERFALL PLAY_FOREVER
SOUND water08 = (63.0, 57.5, 4.0) WATERFALL PLAY_FOREVER
SOUND water09 = (53.0, 57.5, 4.0) WATERFALL PLAY_FOREVER
SOUND water10 = (63.0, 53.0, 3.0) WATERFALL PLAY_FOREVER
SOUND water14 = (55.5, 50.5, 3.0) WATERFALL PLAY_FOREVER
SOUND water15 = (60.5, 50.5, 3.0) WATERFALL PLAY_FOREVER
SOUND water18 = (58.0, 48.0, 3.0) WATERFALL PLAY_FOREVER
SOUND water20 = (63.0, 80.5, 4.0) WATERFALL PLAY_FOREVER
SOUND water21 = (53.0, 53.0, 3.0) WATERFALL PLAY_FOREVER
SOUND water23 = (53.0, 80.5, 4.0) WATERFALL PLAY_FOREVER
SOUND water24 = (63.0, 75.0, 4.0) WATERFALL PLAY_FOREVER
SOUND water25 = (53.0, 75.0, 4.0) WATERFALL PLAY_FOREVER
SOUND water28 = (63.0, 69.0, 5.0) WATERFALL PLAY_FOREVER
SOUND water31 = (53.0, 69.0, 5.0) WATERFALL PLAY_FOREVER
//}

//{ //bots
CHAR_DATA guard1
CHAR_DATA guard2
CHAR_DATA guard3
CHAR_DATA guard4
FORWARD guards:

CAR_DATA platform
CAR_DATA platform1
CAR_DATA tank0
CAR_DATA tank1
CAR_DATA tank2
CAR_DATA tank3
CAR_DATA tank4
CAR_DATA tank5
CAR_DATA tank6
CHAR_DATA tankbot0
CHAR_DATA tankbot1
CHAR_DATA tankbot2
CHAR_DATA tankbot3
CHAR_DATA tankbot4
CHAR_DATA tankbot5
CHAR_DATA tankbot6
FORWARD tank:

FORWARD jeep:

FORWARD thiefs:

CHAR_DATA targetbot1
CHAR_DATA targetbot2
CHAR_DATA targetbot3
CHAR_DATA targetbot4
CHAR_DATA targetbot5
CHAR_DATA targetbot6

//CHAR_DATA busdriver

CHAR_DATA busbot1
CHAR_DATA busbot2
CHAR_DATA busbot3
CHAR_DATA busbot4
CHAR_DATA busbot5
CHAR_DATA busbot6
CHAR_DATA busbot7
CHAR_DATA busbot8
CHAR_DATA busbot9
/*
CHAR_DATA busbot10
CHAR_DATA busbot11
CHAR_DATA busbot12
CHAR_DATA busbot13
CHAR_DATA busbot14
CHAR_DATA busbot15
CHAR_DATA busbot16
*/

COUNTER busbot1_d= 1
COUNTER busbot2_d= 1
COUNTER busbot3_d= 1
COUNTER busbot4_d= 1
COUNTER busbot5_d= 1
COUNTER busbot6_d= 1
COUNTER busbot7_d= 1
COUNTER busbot8_d= 1
COUNTER busbot9_d= 1
/*
COUNTER busbot10_d= 1
COUNTER busbot11_d= 1
COUNTER busbot12_d= 1
COUNTER busbot13_d= 1
COUNTER busbot14_d= 1
COUNTER busbot15_d= 1
COUNTER busbot16_d= 1
*/
//}

//{ //sound
SOUND horn

FORWARD s_horn:

COUNTER p_horn = 1
COUNTER c_horn = 0
//}

//{ //static objects
OBJ_DATA bollard1 = (63.5, 65.9) 0 BOLLARD
OBJ_DATA bollard2 = (52.5, 65.9) 0 BOLLARD
OBJ_DATA bollard3 = (62.6, 67.5) 270 BOLLARD
OBJ_DATA bollard4 = (53.4, 67.5) 270 BOLLARD
OBJ_DATA bollard5 = (62.6, 66.6) 270 BOLLARD
OBJ_DATA bollard6 = (53.4, 66.6) 270 BOLLARD
OBJ_DATA bollard7 = (63.5, 68.0) 0 BOLLARD
OBJ_DATA bollard8 = (52.5, 68.0) 0 BOLLARD
OBJ_DATA bollard9 = (62.8, 68.0) 0 BOLLARD
OBJ_DATA bollard10 = (53.2, 68.0) 0 BOLLARD
OBJ_DATA bollard11 = (57.6, 81.8) 0 BOLLARD
OBJ_DATA bollard12 = (58.4, 81.8) 0 BOLLARD
OBJ_DATA tower1 = (61.2, 72.8, 6.1) 0 TOWER
OBJ_DATA tower2 = (61.2, 59.2, 5.2) 0 TOWER
OBJ_DATA tower3 = (54.8, 59.2, 5.1) 0 TOWER
OBJ_DATA tower4 = (60.2, 65.8, 5.1) 0 TOWER
OBJ_DATA tower5 = (55.8, 65.8, 5.1) 0 TOWER
OBJ_DATA tower6 = (54.8, 72.8, 6.1) 0 TOWER

/*
OBJ_DATA tower7 = (63.7, 65.9, 5.1) 0 TOWER
OBJ_DATA tower8 = (63.3, 65.9, 5.1) 0 TOWER
OBJ_DATA tower9 = (52.3, 65.9, 5.1) 0 TOWER
OBJ_DATA tower10 = (52.7, 65.9, 5.1) 0 TOWER
*/

OBJ_DATA target1 = (57.5, 64.0) 0 INVISIBLE_TARGET
OBJ_DATA target2 = (58.5, 64.0) 0 INVISIBLE_TARGET
OBJ_DATA target3 = (57.5, 65.0) 0 INVISIBLE_TARGET
OBJ_DATA target4 = (58.5, 65.0) 0 INVISIBLE_TARGET
OBJ_DATA target5 = (57.5, 66.0, 4.0) 0 INVISIBLE_TARGET
OBJ_DATA target6 = (58.5, 66.0, 4.0) 0 INVISIBLE_TARGET
OBJ_DATA target7 = (58.0, 48.0) 0 INVISIBLE_TARGET
OBJ_DATA target8 = (58.0, 69.0) 0 INVISIBLE_TARGET

OBJ_DATA arrow01 = (62.3, 62.5) 90 SMALL_ARROW
OBJ_DATA arrow02 = (62.5, 62.7) 180 SMALL_ARROW
OBJ_DATA arrow03 = (62.7, 62.5) 270 SMALL_ARROW
OBJ_DATA arrow04 = (62.5, 62.3) 0 SMALL_ARROW

OBJ_DATA arrow05 = (62.3, 56.5) 90 SMALL_ARROW
OBJ_DATA arrow06 = (62.5, 56.7) 180 SMALL_ARROW
OBJ_DATA arrow07 = (62.7, 56.5) 270 SMALL_ARROW
OBJ_DATA arrow08 = (62.5, 56.3) 0 SMALL_ARROW

OBJ_DATA arrow09 = (53.3, 56.5) 90 SMALL_ARROW
OBJ_DATA arrow10 = (53.5, 56.7) 180 SMALL_ARROW
OBJ_DATA arrow11 = (53.7, 56.5) 270 SMALL_ARROW
OBJ_DATA arrow12 = (53.5, 56.3) 0 SMALL_ARROW

OBJ_DATA arrow13 = (53.3, 62.5) 90 SMALL_ARROW
OBJ_DATA arrow14 = (53.5, 62.7) 180 SMALL_ARROW
OBJ_DATA arrow15 = (53.7, 62.5) 270 SMALL_ARROW
OBJ_DATA arrow16 = (53.5, 62.3) 0 SMALL_ARROW
//}

//{ //generators
GENERATOR pistol = (57.5, 69.0) 0 COLLECT_00 1500 1500 20
GENERATOR coctail = (58.5, 69.0) 0 COLLECT_04 1500 1500 20
//}

//{ //game logic

//{ //p1
COUNTER p1_trg_arena = 0
COUNTER p1_lives = 10
ONSCREEN_COUNTER p1_osc
COUNTER p1_noloose = 0
COUNTER p1_bomb = 0
COUNTER p1_nocoll = 0
COUNTER p1_jammedacc = 0
COUNTER p1_jobfailed=0
COUNTER p1_canontop=0

COUNTER p1_trg_horn=1
COUNTER p1_tmr_remote=0
COUNTER p1_remote_ammo = 0
COUNTER p1_accel = 0

COUNTER p1_noraceon = 0
FORWARD p1_loose:
COUNTER p1_controlsoff = 0
//}

//{ //p2
COUNTER p2_trg_arena = 0
COUNTER p2_lives = 10
ONSCREEN_COUNTER p2_osc
COUNTER p2_noloose = 0
COUNTER p2_bomb = 0
COUNTER p2_nocoll = 0
COUNTER p2_jammedacc = 0
COUNTER p2_jobfailed=0
COUNTER p2_canontop=0

COUNTER p2_trg_horn=1
COUNTER p2_tmr_remote=0
COUNTER p2_remote_ammo = 0
COUNTER p2_accel = 0

COUNTER p2_noraceon = 0
FORWARD p2_loose:
COUNTER p2_controlsoff = 0
//}

//{ //p3
COUNTER p3_trg_arena = 0
COUNTER p3_lives = 10
ONSCREEN_COUNTER p3_osc
COUNTER p3_noloose = 0
COUNTER p3_bomb = 0
COUNTER p3_nocoll = 0
COUNTER p3_jammedacc = 0
COUNTER p3_msg_sunday=0
COUNTER p3_jobfailed=0
COUNTER p3_canontop=0

COUNTER p3_trg_horn=1
COUNTER p3_tmr_remote=0
COUNTER p3_remote_ammo = 0
COUNTER p3_accel = 0

COUNTER p3_noraceon = 0
FORWARD p3_loose:
COUNTER p3_controlsoff = 0
//}

//{ //p4
COUNTER p4_trg_arena = 0
COUNTER p4_lives = 10
ONSCREEN_COUNTER p4_osc
COUNTER p4_noloose = 0
COUNTER p4_bomb = 0
COUNTER p4_nocoll = 0
COUNTER p4_jammedacc = 0
COUNTER p4_msg_sunday=0
COUNTER p4_jobfailed=0
COUNTER p4_canontop=0

COUNTER p4_trg_horn=1
COUNTER p4_tmr_remote=0
COUNTER p4_remote_ammo = 0
COUNTER p4_accel = 0

COUNTER p4_noraceon = 0
FORWARD p4_loose:
COUNTER p4_controlsoff = 0
//}

//{ //p5
COUNTER p5_trg_arena = 0
COUNTER p5_lives = 10
ONSCREEN_COUNTER p5_osc
COUNTER p5_noloose = 0
COUNTER p5_bomb = 0
COUNTER p5_nocoll = 0
COUNTER p5_jammedacc = 0
COUNTER p5_msg_sunday=0
COUNTER p5_jobfailed=0
COUNTER p5_canontop=0

COUNTER p5_trg_horn=1
COUNTER p5_tmr_remote=0
COUNTER p5_remote_ammo = 0
COUNTER p5_accel = 0

COUNTER p5_noraceon = 0
FORWARD p5_loose:
COUNTER p5_controlsoff = 0
//}

//{ //p6
COUNTER p6_trg_arena = 0
COUNTER p6_lives = 10
ONSCREEN_COUNTER p6_osc
COUNTER p6_noloose = 0
COUNTER p6_bomb = 0
COUNTER p6_nocoll = 0
COUNTER p6_jammedacc = 0
COUNTER p6_msg_sunday=0
COUNTER p6_jobfailed=0
COUNTER p6_canontop=0

COUNTER p6_trg_horn=1
COUNTER p6_tmr_remote=0
COUNTER p6_remote_ammo = 0
COUNTER p6_accel = 0

COUNTER p6_noraceon = 0
FORWARD p6_loose:
COUNTER p6_controlsoff = 0
//}

COUNTER mainloop = 1
COUNTER firstrun = 1

COUNTER msg_sunday=0
OBJ_DATA surp_obj
OBJ_DATA surp_obj1
OBJ_DATA ball = (58.0, 82.5, 5.0) 0 FOOTY
//OBJ_DATA surp_obj3
//OBJ_DATA surp_obj4
COUNTER tmr = 0
COUNTER surp_tmr=300
COUNTER surp_sel=0
COUNTER rand = 0
COUNTER temp = 0
COUNTER surp_pos = 0
COUNTER collected = 0
COUNTER ply_taken = 0
COUNTER pos_taken = -1
COUNTER door_c = 0

COUNTER msg_hurt = 0
COUNTER msg_over = 0

CAR_DATA rc_car
CAR_DATA canon
CAR_DATA eject
CAR_DATA bus

//CAR_DATA garbage = (59.5, 68.5) 0 270 GTRUCK
//CHAR_DATA platformbot

//CONVEYOR cnv_west
//CONVEYOR cnv_east
//CONVEYOR cnv_south
//CONVEYOR cnv_north

COUNTER bus_tmr=200
COUNTER bus_c=-1
COUNTER bus_trg=0

//DESTRUCTOR dest //= (  58.0 , 57.0, 4.0 )  ( 13.0 , 25.0  ) //cannot be switched off & when created in code the whole script doesnt work properly anymore
DECLARE_DOOR_INFO ( 360 , 367 , 2 )
DECLARE_DOOR_INFO ( 360 , 367 , 2 )
DOOR_DATA door_1 = DOUBLE (58, 66, 4) (59.0, 66.5, 4.0, 2.0, 1.0) TOP 0 ANY_PLAYER CLOSE_WHEN_OPEN_RULE_FAILS 0 FLIP_RIGHT NOT_REVERSED
DOOR_DATA door_2 = DOUBLE (56, 66, 4) (57.0, 66.5, 4.0, 2.0, 1.0) TOP 1 ANY_PLAYER CLOSE_WHEN_OPEN_RULE_FAILS 0 FLIP_RIGHT NOT_REVERSED

DECLARE_DOOR_INFO ( 900 , 910 , 2 )
DECLARE_DOOR_INFO ( 900 , 910 , 2 )
DOOR_DATA door_3 = SINGLE (63, 66, 4) (63.5, 65.5, 4.0, 1.0, 1.0) TOP 2 ANY_PLAYER CLOSE_WHEN_OPEN_RULE_FAILS 0 FLIP_RIGHT NOT_REVERSED
DOOR_DATA door_4 = SINGLE (52, 66, 4) (52.5, 65.5, 4.0, 1.0, 1.0) TOP 3 ANY_PLAYER CLOSE_WHEN_OPEN_RULE_FAILS 0 FLIP_RIGHT NOT_REVERSED

ONSCREEN_COUNTER dummy_osc
//}

//}

LEVELSTART

WHILE_EXEC ( mainloop = 1 )
IF (firstrun=1)
//{ //Setup
//ADD_ONSCREEN_COUNTER  (   dummy_osc  ,  p1_jobfailed )

ADD_SCORE(p1, 10000000)
ADD_SCORE(p2, 10000000)
ADD_SCORE(p3, 10000000)
ADD_SCORE(p4, 10000000)
ADD_SCORE(p5, 10000000)
ADD_SCORE(p6, 10000000)

MAKE_DOOR_MANUAL(door_3)
MAKE_DOOR_MANUAL(door_4)
OPEN_DOOR(door_3)
OPEN_DOOR(door_4)

//}

//{ //generators
//SWITCH_GENERATOR ( pistol , ON )
//SWITCH_GENERATOR ( coctail , ON )
//}

//{ //cars
	LAUNCH_MISSION ( classic1.mis )
//}
SET firstrun=0
ENDIF

IF (tmr=350) //on screen counters
	//350 cycles delay so the first timer does not get deleted

	//ADD_ONSCREEN_COUNTER  (   dummy_osc  ,  loop ) //not needed with delay

	IF (CHECK_CHARACTER_HEALTH(p1, 0))
		ADD_ONSCREEN_COUNTER  (   p1_osc  ,  p1_lives )
	ENDIF
	IF (CHECK_CHARACTER_HEALTH(p2, 0))
		ADD_ONSCREEN_COUNTER  (   p2_osc  ,  p2_lives )
	ENDIF
	IF (CHECK_CHARACTER_HEALTH(p3, 0))
		ADD_ONSCREEN_COUNTER  (   p3_osc  ,  p3_lives )
	ENDIF

	//gta messed up with 4 counters and a dummy counter
	IF (CHECK_CHARACTER_HEALTH(p4, 0))
		ADD_ONSCREEN_COUNTER  (   p4_osc  ,  p4_lives )
	ENDIF

	/*
	//only 4 counters max are supported
	IF (CHECK_CHARACTER_HEALTH(p5, 0))
		ADD_ONSCREEN_COUNTER  (   p5_osc  ,  p5_lives )
	ENDIF

	IF (CHECK_CHARACTER_HEALTH(p6, 0))
		ADD_ONSCREEN_COUNTER  (   p6_osc  ,  p6_lives )
	ENDIF
	*/
ENDIF

//{ //Player Checks
//how to generate player 2-6:
//copy player 1 5 times and replace "p1" with "pX"
//adjust Surprise Collect each surp_pos "ply_taken = 1" to "ply_taken = X"
//don't replace the "p1" in "SET p1_accel=0" at TIMER  EVENTS/ITEM/after item timeout/IF (surp_sel=25)

IF (CHECK_CHARACTER_HEALTH(p1, 0))
	//{ //MISC
	STORE_CAR_CHARACTER_IS_IN ( p1  ,  p1_v  )
	//SET_CHAR_INVINCIBLE ( p1  ,  ON   )

	/*
	IF (p1_nocoll=1) //no collission
		SET_CAR_NO_COLLIDE ( p1_v )
	ELSE
		CLEAR_CAR_NO_COLLIDE (p1_v)
	ENDIF
	*/

	IF (p1_accel=1) //jammed accelerator
		SET_CAR_JAMMED_ACCELERATOR  ( p1_v  ,  ON  )
	ELSE
		SET_CAR_JAMMED_ACCELERATOR  ( p1_v  ,  OFF  )
	ENDIF

	IF ( LOCATE_CHARACTER_ANY_MEANS ( p1, 58.0, 82.5, 4.0, 2.0, 1.0) ) //SHIP HORN
		horn = CREATE_SOUND (58.0, 82.5, 5.0) PRISON_ALARM PLAY_INSTANT END
	ENDIF

	//}

	//{ //Surprise Collect
	IF ((surp_pos=0)AND(LOCATE_CHARACTER_BY_CAR ( p1 , 53.5, 62.5 , 4.0 , 1.0 , 1.0 )))
		SET ply_taken = 1
		SET pos_taken = 0
	ENDIF
	IF ((surp_pos=1)AND(LOCATE_CHARACTER_BY_CAR ( p1 , 53.5, 56.5 , 4.0 , 1.0 , 1.0 )))
		SET ply_taken = 1
		SET pos_taken = 1
	ENDIF
	IF ((surp_pos=2)AND(LOCATE_CHARACTER_BY_CAR ( p1 , 62.5, 56.5 , 4.0 , 1.0 , 1.0 )))
		SET ply_taken = 1
		SET pos_taken = 2
	ENDIF
	IF ((surp_pos=3)AND(LOCATE_CHARACTER_BY_CAR ( p1 , 62.5, 62.5 , 4.0 , 1.0 , 1.0 )))
		SET ply_taken = 1
		SET pos_taken = 3
	ENDIF
	//}

	IF (IS_CHAR_PRESSING_HORN  ( p1 ) ) //Player pressing HORN
		IF (p1_trg_horn=1)
			IF (p1_remote_ammo > 0) //canon
				TAKE_REMOTE_CONTROL_OF_CAR  ( p1  , canon )
				SET p1_tmr_remote=30
			ENDIF			
			
			//football
			EXPLODE_SMALL (ball)
			DELETE_ITEM(ball)
			ball = CREATE_OBJ (58.0, 82.5, 5.0) 180 FOOTY END
			
			SET p1_trg_horn=0
		ENDIF
		
		IF (p1_bomb = 1) // rc bomb
			EXPLODE_LARGE (53.5, 62.5, 4.0)
			EXPLODE_LARGE (53.5, 56.5, 4.0)
			EXPLODE_LARGE (62.5, 56.5, 4.0)
			EXPLODE_LARGE (62.5, 62.5, 4.0)
			SET p1_bomb = 0
		ENDIF

	ENDIF
	IF (NOT(IS_CHAR_PRESSING_HORN  ( p1 ) ))
	//ELSE //else doesnt work correctly
		SET p1_trg_horn=1
	ENDIF

	IF ((( LOCATE_CHARACTER_BY_CAR ( p1 , 58.0 , 57.0 , 4.0 , 13.0 , 25.0 )) OR ( LOCATE_CHARACTER_BY_CAR ( p1 , 58.0 , 57.0 , 3.0 , 13.0 , 25.0 )))OR(LOCATE_CHARACTER_BY_CAR ( p1 , 58.0 , 54.0 , 5.0 , 13.0 , 10.0 ))) //player is or is not in arena
		SET_ALL_CONTROLS_STATUS  (  p1  , ON  )
		SET_ENTER_CONTROL_STATUS  (  p1  , OFF  )
		IF (p1_noloose = 1) //this and the following if statements were seperated because gta had problems handling 3 ORs
			SET_ENTER_CONTROL_STATUS  (  p1  , ON  )
		ENDIF
		IF ((CHECK_CHAR_CURR_WEAPON (  p1 ,  molotov ) )OR (CHECK_CHAR_CURR_WEAPON (  p1  ,  rocket_launcher )))
			SET_ENTER_CONTROL_STATUS  (  p1  , ON  )
		ENDIF
		CHANGE_CAR_LOCK  (  p1_v   , LOCKOUT_PLAYER )
		
		IF (p1_trg_arena=0)
			IF (p1_noraceon = 0)
				DISPLAY_MESSAGE ( 5504 )
			ENDIF
			SET p1_noraceon=0
			SET p1_jobfailed = 0
			
			SET rand = 0
		ENDIF
		
		SET p1_trg_arena=1
	ELSE //not in arena
		SET_ENTER_CONTROL_STATUS  (  p1  , ON  )
		IF (p1_trg_arena=1) //you were in arena just before
			IF( IS_CAR_IN_AIR ( p1_v ) ) //you drove off the ship
				GOSUB p1_loose:
			ELSE
				IF(IS_CHARACTER_IN_CAR  (  p1  ,  p1_v  ) ) //you exited your car and fell off the ship
					GOSUB p1_loose:
				ELSE //you left the car
					CHANGE_CAR_LOCK  (  p1_v   , UNLOCKED )
					SET p1_noraceon=1
					IF ((p1_noloose = 0)AND (NOT( HAS_CHARACTER_DIED ( p1 )  ))) //you have to return o your car
						SET_ENTER_CONTROL_STATUS  (  p1  , OFF  )
						SET p1_jobfailed=100 //minimum 25
						SET p1_controlsoff=44
					ELSE //do nothing when you have a get out of jail card or used a rc weapon
						SET p1_noloose=0
					ENDIF
				ENDIF
			ENDIF
		ENDIF
		SET p1_trg_arena=0
	ENDIF

	IF ( HAS_CHARACTER_DIED ( p1 )  ) //Player died

		SET_ENTER_CONTROL_STATUS  (  p1  , ON  )
		SET_ALL_CONTROLS_STATUS  (  p1  , ON  )

		IF ((p1_trg_arena=1) OR (p1_noraceon=1)) //you died in the arena in your car or before getting back in
			SET p1_trg_arena=0
			GOSUB p1_loose:
			SET msg_hurt=3
		ENDIF

		//SUNDAY DRIVER
		IF (IS_CHARACTER_IN_ANY_CAR  ( p1  ))
			SET msg_sunday=3
		ENDIF

		//TANK TARGETS
		IF (IS_CAR_IN_BLOCK ( tank0 , 58.0 , 57.0 , 4.0 , 13.0 , 25.0  )) //works on jeep too but should not
			SET_CHAR_OBJECTIVE ( tankbot1 , KILL_CHAR_ANY_MEANS , p1 )
		ENDIF
	ENDIF

	//{ //TIMER  EVENTS

	//Canon
	IF (p1_tmr_remote>1) //canon shot timer
		SET p1_tmr_remote = ( p1_tmr_remote - 1)
	ENDIF
	IF (p1_tmr_remote=1) //canon after shooting
		SET p1_tmr_remote = 0

		eject = CREATE_CAR (58.0, 69.0, 4.0) 19 180 ISETTA MINI_CAR END
		TAKE_REMOTE_CONTROL_OF_CAR  ( p1  , eject )
		EXPLODE_SMALL (eject)
		//dest= CREATE_DESTRUCTOR( 58.0, 69.0, 4.0 )  ( 4.0 , 4.0  ) END //doesnt work in while_exec loops
		SET p1_remote_ammo = (p1_remote_ammo - 1)
		IF (p1_remote_ammo <= 0)
			DISPLAY_MESSAGE (5052)
			//this crahses the game when p1_v sinks, so removing the cannon isnt possible
			
			/*
			p1_v = CREATE_CAR (57.5, 68.5) 0 270 GTRUCK END
			PUT_CAR_ON_TRAILER  ( canon  ,  garbage )
			PUT_CAR_ON_TRAILER  ( platform  ,  garbage )
			PUT_CAR_ON_TRAILER  ( canon  ,  p1_v )
			PUT_CAR_ON_TRAILER  ( platform  ,  p1_v )
			DELETE_ITEM(canon)
			DELETE_ITEM(platform)
			//DELETE_ITEM(p1_v)
			STORE_CAR_CHARACTER_IS_IN ( p1  ,  p1_v  )
			*/
			
			SET_CAR_ROCKETPROOF (p1_v , OFF )
			SET_CAR_BULLETPROOF (p1_v , OFF )
			SET_CAR_FLAMEPROOF (p1_v , OFF )
		ENDIF
	ENDIF

	//ITEM
	IF (p1_jammedacc>0) //item timeout timer
		SET p1_jammedacc = ( p1_jammedacc + 1 )
	ENDIF
	IF ( p1_jammedacc > 933 ) //after jammed acc timeout
		IF (NOT(p1_jammedacc = 2001))
			DISPLAY_MESSAGE ( 5015 )
		ENDIF

		SET p1_accel=0
		SET p2_accel=0
		SET p3_accel=0
		SET p4_accel=0
		SET p5_accel=0
		SET p6_accel=0
		SET p1_jammedacc = 0
	ENDIF

	/*
		IF (surp_sel=13) //no collission (invulv)
			SET p1_nocoll = 0
		ENDIF
	*/
	
	//JOB FAILED
	IF (p1_jobfailed>1)
		SET p1_jobfailed = ( p1_jobfailed - 1 )
		//ORDER_CHAR_TO_DRIVE_CAR (  p1  ,  p1_v  )
		horn = CREATE_SOUND (58.0, 65.5, 5.0) BANK_ALARM PLAY_INSTANT END
	ENDIF
	IF (p1_jobfailed=1)
		DISPLAY_MESSAGE ( 1125 )
		GOSUB p1_loose:
		WARP_FROM_CAR_TO_POINT ( p1, 58.0, 85.5, 5.0, 180 )
	ENDIF
	
	//SET CONTROLS OFF
	IF (p1_controlsoff>1)
		SET p1_controlsoff = ( p1_controlsoff - 1 )
	ENDIF
	IF (p1_controlsoff=1)
		SET_ALL_CONTROLS_STATUS  (  p1  , OFF  )
		ORDER_CHAR_TO_DRIVE_CAR (  p1  ,  p1_v  )
		REMOVE_WEAPONS ( p1 )
		SET p1_controlsoff=0
	ENDIF
	//}
ENDIF

IF (CHECK_CHARACTER_HEALTH(p2, 0))
	//{ //MISC
	STORE_CAR_CHARACTER_IS_IN ( p2  ,  p2_v  )
	//SET_CHAR_INVINCIBLE ( p2  ,  ON   )

	/*
	IF (p2_nocoll=1) //no collission
		SET_CAR_NO_COLLIDE ( p2_v )
	ELSE
		CLEAR_CAR_NO_COLLIDE (p2_v)
	ENDIF
	*/

	IF (p2_accel=1) //jammed accelerator
		SET_CAR_JAMMED_ACCELERATOR  ( p2_v  ,  ON  )
	ELSE
		SET_CAR_JAMMED_ACCELERATOR  ( p2_v  ,  OFF  )
	ENDIF

	IF ( LOCATE_CHARACTER_ANY_MEANS ( p2, 58.0, 82.5, 4.0, 2.0, 1.0) ) //SHIP HORN
		horn = CREATE_SOUND (58.0, 82.5, 5.0) PRISON_ALARM PLAY_INSTANT END
	ENDIF

	//}

	//{ //Surprise Collect
	IF ((surp_pos=0)AND(LOCATE_CHARACTER_BY_CAR ( p2 , 53.5, 62.5 , 4.0 , 1.0 , 1.0 )))
		SET ply_taken = 2
		SET pos_taken = 0
	ENDIF
	IF ((surp_pos=1)AND(LOCATE_CHARACTER_BY_CAR ( p2 , 53.5, 56.5 , 4.0 , 1.0 , 1.0 )))
		SET ply_taken = 2
		SET pos_taken = 1
	ENDIF
	IF ((surp_pos=2)AND(LOCATE_CHARACTER_BY_CAR ( p2 , 62.5, 56.5 , 4.0 , 1.0 , 1.0 )))
		SET ply_taken = 2
		SET pos_taken = 2
	ENDIF
	IF ((surp_pos=3)AND(LOCATE_CHARACTER_BY_CAR ( p2 , 62.5, 62.5 , 4.0 , 1.0 , 1.0 )))
		SET ply_taken = 2
		SET pos_taken = 3
	ENDIF
	//}

	IF (IS_CHAR_PRESSING_HORN  ( p2 ) ) //Player pressing HORN
		IF (p2_trg_horn=1)
			IF (p2_remote_ammo > 0) //canon
				TAKE_REMOTE_CONTROL_OF_CAR  ( p2  , canon )
				SET p2_tmr_remote=30
			ENDIF			
			
			//football
			EXPLODE_SMALL (ball)
			DELETE_ITEM(ball)
			ball = CREATE_OBJ (58.0, 82.5, 5.0) 180 FOOTY END
			
			SET p2_trg_horn=0
		ENDIF
		
		IF (p2_bomb = 1) // rc bomb
			EXPLODE_LARGE (53.5, 62.5, 4.0)
			EXPLODE_LARGE (53.5, 56.5, 4.0)
			EXPLODE_LARGE (62.5, 56.5, 4.0)
			EXPLODE_LARGE (62.5, 62.5, 4.0)
			SET p2_bomb = 0
		ENDIF

	ENDIF
	IF (NOT(IS_CHAR_PRESSING_HORN  ( p2 ) ))
	//ELSE //else doesnt work correctly
		SET p2_trg_horn=1
	ENDIF

	IF ((( LOCATE_CHARACTER_BY_CAR ( p2 , 58.0 , 57.0 , 4.0 , 13.0 , 25.0 )) OR ( LOCATE_CHARACTER_BY_CAR ( p2 , 58.0 , 57.0 , 3.0 , 13.0 , 25.0 )))OR(LOCATE_CHARACTER_BY_CAR ( p2 , 58.0 , 54.0 , 5.0 , 13.0 , 10.0 ))) //player is or is not in arena
		SET_ALL_CONTROLS_STATUS  (  p2  , ON  )
		SET_ENTER_CONTROL_STATUS  (  p2  , OFF  )
		IF (p2_noloose = 1) //this and the following if statements were seperated because gta had problems handling 3 ORs
			SET_ENTER_CONTROL_STATUS  (  p2  , ON  )
		ENDIF
		IF ((CHECK_CHAR_CURR_WEAPON (  p2 ,  molotov ) )OR (CHECK_CHAR_CURR_WEAPON (  p2  ,  rocket_launcher )))
			SET_ENTER_CONTROL_STATUS  (  p2  , ON  )
		ENDIF
		CHANGE_CAR_LOCK  (  p2_v   , LOCKOUT_PLAYER )
		
		IF (p2_trg_arena=0)
			IF (p2_noraceon = 0)
				DISPLAY_MESSAGE ( 5504 )
			ENDIF
			SET p2_noraceon=0
			SET p2_jobfailed = 0
			
			SET rand = 0
		ENDIF
		
		SET p2_trg_arena=1
	ELSE //not in arena
		SET_ENTER_CONTROL_STATUS  (  p2  , ON  )
		IF (p2_trg_arena=1) //you were in arena just before
			IF( IS_CAR_IN_AIR ( p2_v ) ) //you drove off the ship
				GOSUB p2_loose:
			ELSE
				IF(IS_CHARACTER_IN_CAR  (  p2  ,  p2_v  ) ) //you exited your car and fell off the ship
					GOSUB p2_loose:
				ELSE //you left the car
					CHANGE_CAR_LOCK  (  p2_v   , UNLOCKED )
					SET p2_noraceon=1
					IF ((p2_noloose = 0)AND (NOT( HAS_CHARACTER_DIED ( p2 )  ))) //you have to return o your car
						SET_ENTER_CONTROL_STATUS  (  p2  , OFF  )
						SET p2_jobfailed=100 //minimum 25
						SET p2_controlsoff=44
					ELSE //do nothing when you have a get out of jail card or used a rc weapon
						SET p2_noloose=0
					ENDIF
				ENDIF
			ENDIF
		ENDIF
		SET p2_trg_arena=0
	ENDIF

	IF ( HAS_CHARACTER_DIED ( p2 )  ) //Player died

		SET_ENTER_CONTROL_STATUS  (  p2  , ON  )
		SET_ALL_CONTROLS_STATUS  (  p2  , ON  )

		IF ((p2_trg_arena=1) OR (p2_noraceon=1)) //you died in the arena in your car or before getting back in
			SET p2_trg_arena=0
			GOSUB p2_loose:
			SET msg_hurt=3
		ENDIF

		//SUNDAY DRIVER
		IF (IS_CHARACTER_IN_ANY_CAR  ( p2  ))
			SET msg_sunday=3
		ENDIF

		//TANK TARGETS
		IF (IS_CAR_IN_BLOCK ( tank0 , 58.0 , 57.0 , 4.0 , 13.0 , 25.0  )) //works on jeep too but should not
			SET_CHAR_OBJECTIVE ( tankbot1 , KILL_CHAR_ANY_MEANS , p2 )
		ENDIF
	ENDIF

	//{ //TIMER  EVENTS

	//Canon
	IF (p2_tmr_remote>1) //canon shot timer
		SET p2_tmr_remote = ( p2_tmr_remote - 1)
	ENDIF
	IF (p2_tmr_remote=1) //canon after shooting
		SET p2_tmr_remote = 0

		eject = CREATE_CAR (58.0, 69.0, 4.0) 19 180 ISETTA MINI_CAR END
		TAKE_REMOTE_CONTROL_OF_CAR  ( p2  , eject )
		EXPLODE_SMALL (eject)
		//dest= CREATE_DESTRUCTOR( 58.0, 69.0, 4.0 )  ( 4.0 , 4.0  ) END //doesnt work in while_exec loops
		SET p2_remote_ammo = (p2_remote_ammo - 1)
		IF (p2_remote_ammo <= 0)
			DISPLAY_MESSAGE (5052)
			//this crahses the game when p2_v sinks, so removing the cannon isnt possible
			
			/*
			p2_v = CREATE_CAR (57.5, 68.5) 0 270 GTRUCK END
			PUT_CAR_ON_TRAILER  ( canon  ,  garbage )
			PUT_CAR_ON_TRAILER  ( platform  ,  garbage )
			PUT_CAR_ON_TRAILER  ( canon  ,  p2_v )
			PUT_CAR_ON_TRAILER  ( platform  ,  p2_v )
			DELETE_ITEM(canon)
			DELETE_ITEM(platform)
			//DELETE_ITEM(p2_v)
			STORE_CAR_CHARACTER_IS_IN ( p2  ,  p2_v  )
			*/
			
			SET_CAR_ROCKETPROOF (p2_v , OFF )
			SET_CAR_BULLETPROOF (p2_v , OFF )
			SET_CAR_FLAMEPROOF (p2_v , OFF )
		ENDIF
	ENDIF

	//ITEM
	IF (p2_jammedacc>0) //item timeout timer
		SET p2_jammedacc = ( p2_jammedacc + 1 )
	ENDIF
	IF ( p2_jammedacc > 933 ) //after jammed acc timeout
		IF (NOT(p2_jammedacc = 2001))
			DISPLAY_MESSAGE ( 5015 )
		ENDIF

		SET p1_accel=0
		SET p2_accel=0
		SET p3_accel=0
		SET p4_accel=0
		SET p5_accel=0
		SET p6_accel=0
		SET p2_jammedacc = 0
	ENDIF

	/*
		IF (surp_sel=13) //no collission (invulv)
			SET p2_nocoll = 0
		ENDIF
	*/
	
	//JOB FAILED
	IF (p2_jobfailed>1)
		SET p2_jobfailed = ( p2_jobfailed - 1 )
		//ORDER_CHAR_TO_DRIVE_CAR (  p2  ,  p2_v  )
		horn = CREATE_SOUND (58.0, 65.5, 5.0) BANK_ALARM PLAY_INSTANT END
	ENDIF
	IF (p2_jobfailed=1)
		DISPLAY_MESSAGE ( 1125 )
		GOSUB p2_loose:
		WARP_FROM_CAR_TO_POINT ( p2, 58.0, 85.5, 5.0, 180 )
	ENDIF
	
	//SET CONTROLS OFF
	IF (p2_controlsoff>1)
		SET p2_controlsoff = ( p2_controlsoff - 1 )
	ENDIF
	IF (p2_controlsoff=1)
		SET_ALL_CONTROLS_STATUS  (  p2  , OFF  )
		ORDER_CHAR_TO_DRIVE_CAR (  p2  ,  p2_v  )
		REMOVE_WEAPONS ( p2 )
		SET p2_controlsoff=0
	ENDIF
	//}
ENDIF

IF (CHECK_CHARACTER_HEALTH(p3, 0))
	//{ //MISC
	STORE_CAR_CHARACTER_IS_IN ( p3  ,  p3_v  )
	//SET_CHAR_INVINCIBLE ( p3  ,  ON   )

	/*
	IF (p3_nocoll=1) //no collission
		SET_CAR_NO_COLLIDE ( p3_v )
	ELSE
		CLEAR_CAR_NO_COLLIDE (p3_v)
	ENDIF
	*/

	IF (p3_accel=1) //jammed accelerator
		SET_CAR_JAMMED_ACCELERATOR  ( p3_v  ,  ON  )
	ELSE
		SET_CAR_JAMMED_ACCELERATOR  ( p3_v  ,  OFF  )
	ENDIF

	IF ( LOCATE_CHARACTER_ANY_MEANS ( p3, 58.0, 82.5, 4.0, 2.0, 1.0) ) //SHIP HORN
		horn = CREATE_SOUND (58.0, 82.5, 5.0) PRISON_ALARM PLAY_INSTANT END
	ENDIF

	//}

	//{ //Surprise Collect
	IF ((surp_pos=0)AND(LOCATE_CHARACTER_BY_CAR ( p3 , 53.5, 62.5 , 4.0 , 1.0 , 1.0 )))
		SET ply_taken = 3
		SET pos_taken = 0
	ENDIF
	IF ((surp_pos=1)AND(LOCATE_CHARACTER_BY_CAR ( p3 , 53.5, 56.5 , 4.0 , 1.0 , 1.0 )))
		SET ply_taken = 3
		SET pos_taken = 1
	ENDIF
	IF ((surp_pos=2)AND(LOCATE_CHARACTER_BY_CAR ( p3 , 62.5, 56.5 , 4.0 , 1.0 , 1.0 )))
		SET ply_taken = 3
		SET pos_taken = 2
	ENDIF
	IF ((surp_pos=3)AND(LOCATE_CHARACTER_BY_CAR ( p3 , 62.5, 62.5 , 4.0 , 1.0 , 1.0 )))
		SET ply_taken = 3
		SET pos_taken = 3
	ENDIF
	//}

	IF (IS_CHAR_PRESSING_HORN  ( p3 ) ) //Player pressing HORN
		IF (p3_trg_horn=1)
			IF (p3_remote_ammo > 0) //canon
				TAKE_REMOTE_CONTROL_OF_CAR  ( p3  , canon )
				SET p3_tmr_remote=30
			ENDIF			
			
			//football
			EXPLODE_SMALL (ball)
			DELETE_ITEM(ball)
			ball = CREATE_OBJ (58.0, 82.5, 5.0) 180 FOOTY END
			
			SET p3_trg_horn=0
		ENDIF
		
		IF (p3_bomb = 1) // rc bomb
			EXPLODE_LARGE (53.5, 62.5, 4.0)
			EXPLODE_LARGE (53.5, 56.5, 4.0)
			EXPLODE_LARGE (62.5, 56.5, 4.0)
			EXPLODE_LARGE (62.5, 62.5, 4.0)
			SET p3_bomb = 0
		ENDIF

	ENDIF
	IF (NOT(IS_CHAR_PRESSING_HORN  ( p3 ) ))
	//ELSE //else doesnt work correctly
		SET p3_trg_horn=1
	ENDIF

	IF ((( LOCATE_CHARACTER_BY_CAR ( p3 , 58.0 , 57.0 , 4.0 , 13.0 , 25.0 )) OR ( LOCATE_CHARACTER_BY_CAR ( p3 , 58.0 , 57.0 , 3.0 , 13.0 , 25.0 )))OR(LOCATE_CHARACTER_BY_CAR ( p3 , 58.0 , 54.0 , 5.0 , 13.0 , 10.0 ))) //player is or is not in arena
		SET_ALL_CONTROLS_STATUS  (  p3  , ON  )
		SET_ENTER_CONTROL_STATUS  (  p3  , OFF  )
		IF (p3_noloose = 1) //this and the following if statements were seperated because gta had problems handling 3 ORs
			SET_ENTER_CONTROL_STATUS  (  p3  , ON  )
		ENDIF
		IF ((CHECK_CHAR_CURR_WEAPON (  p3 ,  molotov ) )OR (CHECK_CHAR_CURR_WEAPON (  p3  ,  rocket_launcher )))
			SET_ENTER_CONTROL_STATUS  (  p3  , ON  )
		ENDIF
		CHANGE_CAR_LOCK  (  p3_v   , LOCKOUT_PLAYER )
		
		IF (p3_trg_arena=0)
			IF (p3_noraceon = 0)
				DISPLAY_MESSAGE ( 5504 )
			ENDIF
			SET p3_noraceon=0
			SET p3_jobfailed = 0
			
			SET rand = 0
		ENDIF
		
		SET p3_trg_arena=1
	ELSE //not in arena
		SET_ENTER_CONTROL_STATUS  (  p3  , ON  )
		IF (p3_trg_arena=1) //you were in arena just before
			IF( IS_CAR_IN_AIR ( p3_v ) ) //you drove off the ship
				GOSUB p3_loose:
			ELSE
				IF(IS_CHARACTER_IN_CAR  (  p3  ,  p3_v  ) ) //you exited your car and fell off the ship
					GOSUB p3_loose:
				ELSE //you left the car
					CHANGE_CAR_LOCK  (  p3_v   , UNLOCKED )
					SET p3_noraceon=1
					IF ((p3_noloose = 0)AND (NOT( HAS_CHARACTER_DIED ( p3 )  ))) //you have to return o your car
						SET_ENTER_CONTROL_STATUS  (  p3  , OFF  )
						SET p3_jobfailed=100 //minimum 25
						SET p3_controlsoff=44
					ELSE //do nothing when you have a get out of jail card or used a rc weapon
						SET p3_noloose=0
					ENDIF
				ENDIF
			ENDIF
		ENDIF
		SET p3_trg_arena=0
	ENDIF

	IF ( HAS_CHARACTER_DIED ( p3 )  ) //Player died

		SET_ENTER_CONTROL_STATUS  (  p3  , ON  )
		SET_ALL_CONTROLS_STATUS  (  p3  , ON  )

		IF ((p3_trg_arena=1) OR (p3_noraceon=1)) //you died in the arena in your car or before getting back in
			SET p3_trg_arena=0
			GOSUB p3_loose:
			SET msg_hurt=3
		ENDIF

		//SUNDAY DRIVER
		IF (IS_CHARACTER_IN_ANY_CAR  ( p3  ))
			SET msg_sunday=3
		ENDIF

		//TANK TARGETS
		IF (IS_CAR_IN_BLOCK ( tank0 , 58.0 , 57.0 , 4.0 , 13.0 , 25.0  )) //works on jeep too but should not
			SET_CHAR_OBJECTIVE ( tankbot1 , KILL_CHAR_ANY_MEANS , p3 )
		ENDIF
	ENDIF

	//{ //TIMER  EVENTS

	//Canon
	IF (p3_tmr_remote>1) //canon shot timer
		SET p3_tmr_remote = ( p3_tmr_remote - 1)
	ENDIF
	IF (p3_tmr_remote=1) //canon after shooting
		SET p3_tmr_remote = 0

		eject = CREATE_CAR (58.0, 69.0, 4.0) 19 180 ISETTA MINI_CAR END
		TAKE_REMOTE_CONTROL_OF_CAR  ( p3  , eject )
		EXPLODE_SMALL (eject)
		//dest= CREATE_DESTRUCTOR( 58.0, 69.0, 4.0 )  ( 4.0 , 4.0  ) END //doesnt work in while_exec loops
		SET p3_remote_ammo = (p3_remote_ammo - 1)
		IF (p3_remote_ammo <= 0)
			DISPLAY_MESSAGE (5052)
			//this crahses the game when p3_v sinks, so removing the cannon isnt possible
			
			/*
			p3_v = CREATE_CAR (57.5, 68.5) 0 270 GTRUCK END
			PUT_CAR_ON_TRAILER  ( canon  ,  garbage )
			PUT_CAR_ON_TRAILER  ( platform  ,  garbage )
			PUT_CAR_ON_TRAILER  ( canon  ,  p3_v )
			PUT_CAR_ON_TRAILER  ( platform  ,  p3_v )
			DELETE_ITEM(canon)
			DELETE_ITEM(platform)
			//DELETE_ITEM(p3_v)
			STORE_CAR_CHARACTER_IS_IN ( p3  ,  p3_v  )
			*/
			
			SET_CAR_ROCKETPROOF (p3_v , OFF )
			SET_CAR_BULLETPROOF (p3_v , OFF )
			SET_CAR_FLAMEPROOF (p3_v , OFF )
		ENDIF
	ENDIF

	//ITEM
	IF (p3_jammedacc>0) //item timeout timer
		SET p3_jammedacc = ( p3_jammedacc + 1 )
	ENDIF
	IF ( p3_jammedacc > 933 ) //after jammed acc timeout
		IF (NOT(p3_jammedacc = 2001))
			DISPLAY_MESSAGE ( 5015 )
		ENDIF

		SET p1_accel=0
		SET p2_accel=0
		SET p3_accel=0
		SET p4_accel=0
		SET p5_accel=0
		SET p6_accel=0
		SET p3_jammedacc = 0
	ENDIF

	/*
		IF (surp_sel=13) //no collission (invulv)
			SET p3_nocoll = 0
		ENDIF
	*/
	
	//JOB FAILED
	IF (p3_jobfailed>1)
		SET p3_jobfailed = ( p3_jobfailed - 1 )
		//ORDER_CHAR_TO_DRIVE_CAR (  p3  ,  p3_v  )
		horn = CREATE_SOUND (58.0, 65.5, 5.0) BANK_ALARM PLAY_INSTANT END
	ENDIF
	IF (p3_jobfailed=1)
		DISPLAY_MESSAGE ( 1125 )
		GOSUB p3_loose:
		WARP_FROM_CAR_TO_POINT ( p3, 58.0, 85.5, 5.0, 180 )
	ENDIF
	
	//SET CONTROLS OFF
	IF (p3_controlsoff>1)
		SET p3_controlsoff = ( p3_controlsoff - 1 )
	ENDIF
	IF (p3_controlsoff=1)
		SET_ALL_CONTROLS_STATUS  (  p3  , OFF  )
		ORDER_CHAR_TO_DRIVE_CAR (  p3  ,  p3_v  )
		REMOVE_WEAPONS ( p3 )
		SET p3_controlsoff=0
	ENDIF
	//}
ENDIF

IF (CHECK_CHARACTER_HEALTH(p4, 0))
	//{ //MISC
	STORE_CAR_CHARACTER_IS_IN ( p4  ,  p4_v  )
	//SET_CHAR_INVINCIBLE ( p4  ,  ON   )

	/*
	IF (p4_nocoll=1) //no collission
		SET_CAR_NO_COLLIDE ( p4_v )
	ELSE
		CLEAR_CAR_NO_COLLIDE (p4_v)
	ENDIF
	*/

	IF (p4_accel=1) //jammed accelerator
		SET_CAR_JAMMED_ACCELERATOR  ( p4_v  ,  ON  )
	ELSE
		SET_CAR_JAMMED_ACCELERATOR  ( p4_v  ,  OFF  )
	ENDIF

	IF ( LOCATE_CHARACTER_ANY_MEANS ( p4, 58.0, 82.5, 4.0, 2.0, 1.0) ) //SHIP HORN
		horn = CREATE_SOUND (58.0, 82.5, 5.0) PRISON_ALARM PLAY_INSTANT END
	ENDIF

	//}

	//{ //Surprise Collect
	IF ((surp_pos=0)AND(LOCATE_CHARACTER_BY_CAR ( p4 , 53.5, 62.5 , 4.0 , 1.0 , 1.0 )))
		SET ply_taken = 4
		SET pos_taken = 0
	ENDIF
	IF ((surp_pos=1)AND(LOCATE_CHARACTER_BY_CAR ( p4 , 53.5, 56.5 , 4.0 , 1.0 , 1.0 )))
		SET ply_taken = 4
		SET pos_taken = 1
	ENDIF
	IF ((surp_pos=2)AND(LOCATE_CHARACTER_BY_CAR ( p4 , 62.5, 56.5 , 4.0 , 1.0 , 1.0 )))
		SET ply_taken = 4
		SET pos_taken = 2
	ENDIF
	IF ((surp_pos=3)AND(LOCATE_CHARACTER_BY_CAR ( p4 , 62.5, 62.5 , 4.0 , 1.0 , 1.0 )))
		SET ply_taken = 4
		SET pos_taken = 3
	ENDIF
	//}

	IF (IS_CHAR_PRESSING_HORN  ( p4 ) ) //Player pressing HORN
		IF (p4_trg_horn=1)
			IF (p4_remote_ammo > 0) //canon
				TAKE_REMOTE_CONTROL_OF_CAR  ( p4  , canon )
				SET p4_tmr_remote=30
			ENDIF			
			
			//football
			EXPLODE_SMALL (ball)
			DELETE_ITEM(ball)
			ball = CREATE_OBJ (58.0, 82.5, 5.0) 180 FOOTY END
			
			SET p4_trg_horn=0
		ENDIF
		
		IF (p4_bomb = 1) // rc bomb
			EXPLODE_LARGE (53.5, 62.5, 4.0)
			EXPLODE_LARGE (53.5, 56.5, 4.0)
			EXPLODE_LARGE (62.5, 56.5, 4.0)
			EXPLODE_LARGE (62.5, 62.5, 4.0)
			SET p4_bomb = 0
		ENDIF

	ENDIF
	IF (NOT(IS_CHAR_PRESSING_HORN  ( p4 ) ))
	//ELSE //else doesnt work correctly
		SET p4_trg_horn=1
	ENDIF

	IF ((( LOCATE_CHARACTER_BY_CAR ( p4 , 58.0 , 57.0 , 4.0 , 13.0 , 25.0 )) OR ( LOCATE_CHARACTER_BY_CAR ( p4 , 58.0 , 57.0 , 3.0 , 13.0 , 25.0 )))OR(LOCATE_CHARACTER_BY_CAR ( p4 , 58.0 , 54.0 , 5.0 , 13.0 , 10.0 ))) //player is or is not in arena
		SET_ALL_CONTROLS_STATUS  (  p4  , ON  )
		SET_ENTER_CONTROL_STATUS  (  p4  , OFF  )
		IF (p4_noloose = 1) //this and the following if statements were seperated because gta had problems handling 3 ORs
			SET_ENTER_CONTROL_STATUS  (  p4  , ON  )
		ENDIF
		IF ((CHECK_CHAR_CURR_WEAPON (  p4 ,  molotov ) )OR (CHECK_CHAR_CURR_WEAPON (  p4  ,  rocket_launcher )))
			SET_ENTER_CONTROL_STATUS  (  p4  , ON  )
		ENDIF
		CHANGE_CAR_LOCK  (  p4_v   , LOCKOUT_PLAYER )
		
		IF (p4_trg_arena=0)
			IF (p4_noraceon = 0)
				DISPLAY_MESSAGE ( 5504 )
			ENDIF
			SET p4_noraceon=0
			SET p4_jobfailed = 0
			
			SET rand = 0
		ENDIF
		
		SET p4_trg_arena=1
	ELSE //not in arena
		SET_ENTER_CONTROL_STATUS  (  p4  , ON  )
		IF (p4_trg_arena=1) //you were in arena just before
			IF( IS_CAR_IN_AIR ( p4_v ) ) //you drove off the ship
				GOSUB p4_loose:
			ELSE
				IF(IS_CHARACTER_IN_CAR  (  p4  ,  p4_v  ) ) //you exited your car and fell off the ship
					GOSUB p4_loose:
				ELSE //you left the car
					CHANGE_CAR_LOCK  (  p4_v   , UNLOCKED )
					SET p4_noraceon=1
					IF ((p4_noloose = 0)AND (NOT( HAS_CHARACTER_DIED ( p4 )  ))) //you have to return o your car
						SET_ENTER_CONTROL_STATUS  (  p4  , OFF  )
						SET p4_jobfailed=100 //minimum 25
						SET p4_controlsoff=44
					ELSE //do nothing when you have a get out of jail card or used a rc weapon
						SET p4_noloose=0
					ENDIF
				ENDIF
			ENDIF
		ENDIF
		SET p4_trg_arena=0
	ENDIF

	IF ( HAS_CHARACTER_DIED ( p4 )  ) //Player died

		SET_ENTER_CONTROL_STATUS  (  p4  , ON  )
		SET_ALL_CONTROLS_STATUS  (  p4  , ON  )

		IF ((p4_trg_arena=1) OR (p4_noraceon=1)) //you died in the arena in your car or before getting back in
			SET p4_trg_arena=0
			GOSUB p4_loose:
			SET msg_hurt=3
		ENDIF

		//SUNDAY DRIVER
		IF (IS_CHARACTER_IN_ANY_CAR  ( p4  ))
			SET msg_sunday=3
		ENDIF

		//TANK TARGETS
		IF (IS_CAR_IN_BLOCK ( tank0 , 58.0 , 57.0 , 4.0 , 13.0 , 25.0  )) //works on jeep too but should not
			SET_CHAR_OBJECTIVE ( tankbot1 , KILL_CHAR_ANY_MEANS , p4 )
		ENDIF
	ENDIF

	//{ //TIMER  EVENTS

	//Canon
	IF (p4_tmr_remote>1) //canon shot timer
		SET p4_tmr_remote = ( p4_tmr_remote - 1)
	ENDIF
	IF (p4_tmr_remote=1) //canon after shooting
		SET p4_tmr_remote = 0

		eject = CREATE_CAR (58.0, 69.0, 4.0) 19 180 ISETTA MINI_CAR END
		TAKE_REMOTE_CONTROL_OF_CAR  ( p4  , eject )
		EXPLODE_SMALL (eject)
		//dest= CREATE_DESTRUCTOR( 58.0, 69.0, 4.0 )  ( 4.0 , 4.0  ) END //doesnt work in while_exec loops
		SET p4_remote_ammo = (p4_remote_ammo - 1)
		IF (p4_remote_ammo <= 0)
			DISPLAY_MESSAGE (5052)
			//this crahses the game when p4_v sinks, so removing the cannon isnt possible
			
			/*
			p4_v = CREATE_CAR (57.5, 68.5) 0 270 GTRUCK END
			PUT_CAR_ON_TRAILER  ( canon  ,  garbage )
			PUT_CAR_ON_TRAILER  ( platform  ,  garbage )
			PUT_CAR_ON_TRAILER  ( canon  ,  p4_v )
			PUT_CAR_ON_TRAILER  ( platform  ,  p4_v )
			DELETE_ITEM(canon)
			DELETE_ITEM(platform)
			//DELETE_ITEM(p4_v)
			STORE_CAR_CHARACTER_IS_IN ( p4  ,  p4_v  )
			*/
			
			SET_CAR_ROCKETPROOF (p4_v , OFF )
			SET_CAR_BULLETPROOF (p4_v , OFF )
			SET_CAR_FLAMEPROOF (p4_v , OFF )
		ENDIF
	ENDIF

	//ITEM
	IF (p4_jammedacc>0) //item timeout timer
		SET p4_jammedacc = ( p4_jammedacc + 1 )
	ENDIF
	IF ( p4_jammedacc > 933 ) //after jammed acc timeout
		IF (NOT(p4_jammedacc = 2001))
			DISPLAY_MESSAGE ( 5015 )
		ENDIF

		SET p1_accel=0
		SET p2_accel=0
		SET p3_accel=0
		SET p4_accel=0
		SET p5_accel=0
		SET p6_accel=0
		SET p4_jammedacc = 0
	ENDIF

	/*
		IF (surp_sel=13) //no collission (invulv)
			SET p4_nocoll = 0
		ENDIF
	*/
	
	//JOB FAILED
	IF (p4_jobfailed>1)
		SET p4_jobfailed = ( p4_jobfailed - 1 )
		//ORDER_CHAR_TO_DRIVE_CAR (  p4  ,  p4_v  )
		horn = CREATE_SOUND (58.0, 65.5, 5.0) BANK_ALARM PLAY_INSTANT END
	ENDIF
	IF (p4_jobfailed=1)
		DISPLAY_MESSAGE ( 1125 )
		GOSUB p4_loose:
		WARP_FROM_CAR_TO_POINT ( p4, 58.0, 85.5, 5.0, 180 )
	ENDIF
	
	//SET CONTROLS OFF
	IF (p4_controlsoff>1)
		SET p4_controlsoff = ( p4_controlsoff - 1 )
	ENDIF
	IF (p4_controlsoff=1)
		SET_ALL_CONTROLS_STATUS  (  p4  , OFF  )
		ORDER_CHAR_TO_DRIVE_CAR (  p4  ,  p4_v  )
		REMOVE_WEAPONS ( p4 )
		SET p4_controlsoff=0
	ENDIF
	//}
ENDIF

IF (CHECK_CHARACTER_HEALTH(p5, 0))
	//{ //MISC
	STORE_CAR_CHARACTER_IS_IN ( p5  ,  p5_v  )
	//SET_CHAR_INVINCIBLE ( p5  ,  ON   )

	/*
	IF (p5_nocoll=1) //no collission
		SET_CAR_NO_COLLIDE ( p5_v )
	ELSE
		CLEAR_CAR_NO_COLLIDE (p5_v)
	ENDIF
	*/

	IF (p5_accel=1) //jammed accelerator
		SET_CAR_JAMMED_ACCELERATOR  ( p5_v  ,  ON  )
	ELSE
		SET_CAR_JAMMED_ACCELERATOR  ( p5_v  ,  OFF  )
	ENDIF

	IF ( LOCATE_CHARACTER_ANY_MEANS ( p5, 58.0, 82.5, 4.0, 2.0, 1.0) ) //SHIP HORN
		horn = CREATE_SOUND (58.0, 82.5, 5.0) PRISON_ALARM PLAY_INSTANT END
	ENDIF

	//}

	//{ //Surprise Collect
	IF ((surp_pos=0)AND(LOCATE_CHARACTER_BY_CAR ( p5 , 53.5, 62.5 , 4.0 , 1.0 , 1.0 )))
		SET ply_taken = 5
		SET pos_taken = 0
	ENDIF
	IF ((surp_pos=1)AND(LOCATE_CHARACTER_BY_CAR ( p5 , 53.5, 56.5 , 4.0 , 1.0 , 1.0 )))
		SET ply_taken = 5
		SET pos_taken = 1
	ENDIF
	IF ((surp_pos=2)AND(LOCATE_CHARACTER_BY_CAR ( p5 , 62.5, 56.5 , 4.0 , 1.0 , 1.0 )))
		SET ply_taken = 5
		SET pos_taken = 2
	ENDIF
	IF ((surp_pos=3)AND(LOCATE_CHARACTER_BY_CAR ( p5 , 62.5, 62.5 , 4.0 , 1.0 , 1.0 )))
		SET ply_taken = 5
		SET pos_taken = 3
	ENDIF
	//}

	IF (IS_CHAR_PRESSING_HORN  ( p5 ) ) //Player pressing HORN
		IF (p5_trg_horn=1)
			IF (p5_remote_ammo > 0) //canon
				TAKE_REMOTE_CONTROL_OF_CAR  ( p5  , canon )
				SET p5_tmr_remote=30
			ENDIF			
			
			//football
			EXPLODE_SMALL (ball)
			DELETE_ITEM(ball)
			ball = CREATE_OBJ (58.0, 82.5, 5.0) 180 FOOTY END
			
			SET p5_trg_horn=0
		ENDIF
		
		IF (p5_bomb = 1) // rc bomb
			EXPLODE_LARGE (53.5, 62.5, 4.0)
			EXPLODE_LARGE (53.5, 56.5, 4.0)
			EXPLODE_LARGE (62.5, 56.5, 4.0)
			EXPLODE_LARGE (62.5, 62.5, 4.0)
			SET p5_bomb = 0
		ENDIF

	ENDIF
	IF (NOT(IS_CHAR_PRESSING_HORN  ( p5 ) ))
	//ELSE //else doesnt work correctly
		SET p5_trg_horn=1
	ENDIF

	IF ((( LOCATE_CHARACTER_BY_CAR ( p5 , 58.0 , 57.0 , 4.0 , 13.0 , 25.0 )) OR ( LOCATE_CHARACTER_BY_CAR ( p5 , 58.0 , 57.0 , 3.0 , 13.0 , 25.0 )))OR(LOCATE_CHARACTER_BY_CAR ( p5 , 58.0 , 54.0 , 5.0 , 13.0 , 10.0 ))) //player is or is not in arena
		SET_ALL_CONTROLS_STATUS  (  p5  , ON  )
		SET_ENTER_CONTROL_STATUS  (  p5  , OFF  )
		IF (p5_noloose = 1) //this and the following if statements were seperated because gta had problems handling 3 ORs
			SET_ENTER_CONTROL_STATUS  (  p5  , ON  )
		ENDIF
		IF ((CHECK_CHAR_CURR_WEAPON (  p5 ,  molotov ) )OR (CHECK_CHAR_CURR_WEAPON (  p5  ,  rocket_launcher )))
			SET_ENTER_CONTROL_STATUS  (  p5  , ON  )
		ENDIF
		CHANGE_CAR_LOCK  (  p5_v   , LOCKOUT_PLAYER )
		
		IF (p5_trg_arena=0)
			IF (p5_noraceon = 0)
				DISPLAY_MESSAGE ( 5504 )
			ENDIF
			SET p5_noraceon=0
			SET p5_jobfailed = 0
			
			SET rand = 0
		ENDIF
		
		SET p5_trg_arena=1
	ELSE //not in arena
		SET_ENTER_CONTROL_STATUS  (  p5  , ON  )
		IF (p5_trg_arena=1) //you were in arena just before
			IF( IS_CAR_IN_AIR ( p5_v ) ) //you drove off the ship
				GOSUB p5_loose:
			ELSE
				IF(IS_CHARACTER_IN_CAR  (  p5  ,  p5_v  ) ) //you exited your car and fell off the ship
					GOSUB p5_loose:
				ELSE //you left the car
					CHANGE_CAR_LOCK  (  p5_v   , UNLOCKED )
					SET p5_noraceon=1
					IF ((p5_noloose = 0)AND (NOT( HAS_CHARACTER_DIED ( p5 )  ))) //you have to return o your car
						SET_ENTER_CONTROL_STATUS  (  p5  , OFF  )
						SET p5_jobfailed=100 //minimum 25
						SET p5_controlsoff=44
					ELSE //do nothing when you have a get out of jail card or used a rc weapon
						SET p5_noloose=0
					ENDIF
				ENDIF
			ENDIF
		ENDIF
		SET p5_trg_arena=0
	ENDIF

	IF ( HAS_CHARACTER_DIED ( p5 )  ) //Player died

		SET_ENTER_CONTROL_STATUS  (  p5  , ON  )
		SET_ALL_CONTROLS_STATUS  (  p5  , ON  )

		IF ((p5_trg_arena=1) OR (p5_noraceon=1)) //you died in the arena in your car or before getting back in
			SET p5_trg_arena=0
			GOSUB p5_loose:
			SET msg_hurt=3
		ENDIF

		//SUNDAY DRIVER
		IF (IS_CHARACTER_IN_ANY_CAR  ( p5  ))
			SET msg_sunday=3
		ENDIF

		//TANK TARGETS
		IF (IS_CAR_IN_BLOCK ( tank0 , 58.0 , 57.0 , 4.0 , 13.0 , 25.0  )) //works on jeep too but should not
			SET_CHAR_OBJECTIVE ( tankbot1 , KILL_CHAR_ANY_MEANS , p5 )
		ENDIF
	ENDIF

	//{ //TIMER  EVENTS

	//Canon
	IF (p5_tmr_remote>1) //canon shot timer
		SET p5_tmr_remote = ( p5_tmr_remote - 1)
	ENDIF
	IF (p5_tmr_remote=1) //canon after shooting
		SET p5_tmr_remote = 0

		eject = CREATE_CAR (58.0, 69.0, 4.0) 19 180 ISETTA MINI_CAR END
		TAKE_REMOTE_CONTROL_OF_CAR  ( p5  , eject )
		EXPLODE_SMALL (eject)
		//dest= CREATE_DESTRUCTOR( 58.0, 69.0, 4.0 )  ( 4.0 , 4.0  ) END //doesnt work in while_exec loops
		SET p5_remote_ammo = (p5_remote_ammo - 1)
		IF (p5_remote_ammo <= 0)
			DISPLAY_MESSAGE (5052)
			//this crahses the game when p5_v sinks, so removing the cannon isnt possible
			
			/*
			p5_v = CREATE_CAR (57.5, 68.5) 0 270 GTRUCK END
			PUT_CAR_ON_TRAILER  ( canon  ,  garbage )
			PUT_CAR_ON_TRAILER  ( platform  ,  garbage )
			PUT_CAR_ON_TRAILER  ( canon  ,  p5_v )
			PUT_CAR_ON_TRAILER  ( platform  ,  p5_v )
			DELETE_ITEM(canon)
			DELETE_ITEM(platform)
			//DELETE_ITEM(p5_v)
			STORE_CAR_CHARACTER_IS_IN ( p5  ,  p5_v  )
			*/
			
			SET_CAR_ROCKETPROOF (p5_v , OFF )
			SET_CAR_BULLETPROOF (p5_v , OFF )
			SET_CAR_FLAMEPROOF (p5_v , OFF )
		ENDIF
	ENDIF

	//ITEM
	IF (p5_jammedacc>0) //item timeout timer
		SET p5_jammedacc = ( p5_jammedacc + 1 )
	ENDIF
	IF ( p5_jammedacc > 933 ) //after jammed acc timeout
		IF (NOT(p5_jammedacc = 2001))
			DISPLAY_MESSAGE ( 5015 )
		ENDIF

		SET p1_accel=0
		SET p2_accel=0
		SET p3_accel=0
		SET p4_accel=0
		SET p5_accel=0
		SET p6_accel=0
		SET p5_jammedacc = 0
	ENDIF

	/*
		IF (surp_sel=13) //no collission (invulv)
			SET p5_nocoll = 0
		ENDIF
	*/
	
	//JOB FAILED
	IF (p5_jobfailed>1)
		SET p5_jobfailed = ( p5_jobfailed - 1 )
		//ORDER_CHAR_TO_DRIVE_CAR (  p5  ,  p5_v  )
		horn = CREATE_SOUND (58.0, 65.5, 5.0) BANK_ALARM PLAY_INSTANT END
	ENDIF
	IF (p5_jobfailed=1)
		DISPLAY_MESSAGE ( 1125 )
		GOSUB p5_loose:
		WARP_FROM_CAR_TO_POINT ( p5, 58.0, 85.5, 5.0, 180 )
	ENDIF
	
	//SET CONTROLS OFF
	IF (p5_controlsoff>1)
		SET p5_controlsoff = ( p5_controlsoff - 1 )
	ENDIF
	IF (p5_controlsoff=1)
		SET_ALL_CONTROLS_STATUS  (  p5  , OFF  )
		ORDER_CHAR_TO_DRIVE_CAR (  p5  ,  p5_v  )
		REMOVE_WEAPONS ( p5 )
		SET p5_controlsoff=0
	ENDIF
	//}
ENDIF

IF (CHECK_CHARACTER_HEALTH(p6, 0))
	//{ //MISC
	STORE_CAR_CHARACTER_IS_IN ( p6  ,  p6_v  )
	//SET_CHAR_INVINCIBLE ( p6  ,  ON   )

	/*
	IF (p6_nocoll=1) //no collission
		SET_CAR_NO_COLLIDE ( p6_v )
	ELSE
		CLEAR_CAR_NO_COLLIDE (p6_v)
	ENDIF
	*/

	IF (p6_accel=1) //jammed accelerator
		SET_CAR_JAMMED_ACCELERATOR  ( p6_v  ,  ON  )
	ELSE
		SET_CAR_JAMMED_ACCELERATOR  ( p6_v  ,  OFF  )
	ENDIF

	IF ( LOCATE_CHARACTER_ANY_MEANS ( p6, 58.0, 82.5, 4.0, 2.0, 1.0) ) //SHIP HORN
		horn = CREATE_SOUND (58.0, 82.5, 5.0) PRISON_ALARM PLAY_INSTANT END
	ENDIF

	//}

	//{ //Surprise Collect
	IF ((surp_pos=0)AND(LOCATE_CHARACTER_BY_CAR ( p6 , 53.5, 62.5 , 4.0 , 1.0 , 1.0 )))
		SET ply_taken = 6
		SET pos_taken = 0
	ENDIF
	IF ((surp_pos=1)AND(LOCATE_CHARACTER_BY_CAR ( p6 , 53.5, 56.5 , 4.0 , 1.0 , 1.0 )))
		SET ply_taken = 6
		SET pos_taken = 1
	ENDIF
	IF ((surp_pos=2)AND(LOCATE_CHARACTER_BY_CAR ( p6 , 62.5, 56.5 , 4.0 , 1.0 , 1.0 )))
		SET ply_taken = 6
		SET pos_taken = 2
	ENDIF
	IF ((surp_pos=3)AND(LOCATE_CHARACTER_BY_CAR ( p6 , 62.5, 62.5 , 4.0 , 1.0 , 1.0 )))
		SET ply_taken = 6
		SET pos_taken = 3
	ENDIF
	//}

	IF (IS_CHAR_PRESSING_HORN  ( p6 ) ) //Player pressing HORN
		IF (p6_trg_horn=1)
			IF (p6_remote_ammo > 0) //canon
				TAKE_REMOTE_CONTROL_OF_CAR  ( p6  , canon )
				SET p6_tmr_remote=30
			ENDIF			
			
			//football
			EXPLODE_SMALL (ball)
			DELETE_ITEM(ball)
			ball = CREATE_OBJ (58.0, 82.5, 5.0) 180 FOOTY END
			
			SET p6_trg_horn=0
		ENDIF
		
		IF (p6_bomb = 1) // rc bomb
			EXPLODE_LARGE (53.5, 62.5, 4.0)
			EXPLODE_LARGE (53.5, 56.5, 4.0)
			EXPLODE_LARGE (62.5, 56.5, 4.0)
			EXPLODE_LARGE (62.5, 62.5, 4.0)
			SET p6_bomb = 0
		ENDIF

	ENDIF
	IF (NOT(IS_CHAR_PRESSING_HORN  ( p6 ) ))
	//ELSE //else doesnt work correctly
		SET p6_trg_horn=1
	ENDIF

	IF ((( LOCATE_CHARACTER_BY_CAR ( p6 , 58.0 , 57.0 , 4.0 , 13.0 , 25.0 )) OR ( LOCATE_CHARACTER_BY_CAR ( p6 , 58.0 , 57.0 , 3.0 , 13.0 , 25.0 )))OR(LOCATE_CHARACTER_BY_CAR ( p6 , 58.0 , 54.0 , 5.0 , 13.0 , 10.0 ))) //player is or is not in arena
		SET_ALL_CONTROLS_STATUS  (  p6  , ON  )
		SET_ENTER_CONTROL_STATUS  (  p6  , OFF  )
		IF (p6_noloose = 1) //this and the following if statements were seperated because gta had problems handling 3 ORs
			SET_ENTER_CONTROL_STATUS  (  p6  , ON  )
		ENDIF
		IF ((CHECK_CHAR_CURR_WEAPON (  p6 ,  molotov ) )OR (CHECK_CHAR_CURR_WEAPON (  p6  ,  rocket_launcher )))
			SET_ENTER_CONTROL_STATUS  (  p6  , ON  )
		ENDIF
		CHANGE_CAR_LOCK  (  p6_v   , LOCKOUT_PLAYER )
		
		IF (p6_trg_arena=0)
			IF (p6_noraceon = 0)
				DISPLAY_MESSAGE ( 5504 )
			ENDIF
			SET p6_noraceon=0
			SET p6_jobfailed = 0
			
			SET rand = 0
		ENDIF
		
		SET p6_trg_arena=1
	ELSE //not in arena
		SET_ENTER_CONTROL_STATUS  (  p6  , ON  )
		IF (p6_trg_arena=1) //you were in arena just before
			IF( IS_CAR_IN_AIR ( p6_v ) ) //you drove off the ship
				GOSUB p6_loose:
			ELSE
				IF(IS_CHARACTER_IN_CAR  (  p6  ,  p6_v  ) ) //you exited your car and fell off the ship
					GOSUB p6_loose:
				ELSE //you left the car
					CHANGE_CAR_LOCK  (  p6_v   , UNLOCKED )
					SET p6_noraceon=1
					IF ((p6_noloose = 0)AND (NOT( HAS_CHARACTER_DIED ( p6 )  ))) //you have to return o your car
						SET_ENTER_CONTROL_STATUS  (  p6  , OFF  )
						SET p6_jobfailed=100 //minimum 25
						SET p6_controlsoff=44
					ELSE //do nothing when you have a get out of jail card or used a rc weapon
						SET p6_noloose=0
					ENDIF
				ENDIF
			ENDIF
		ENDIF
		SET p6_trg_arena=0
	ENDIF

	IF ( HAS_CHARACTER_DIED ( p6 )  ) //Player died

		SET_ENTER_CONTROL_STATUS  (  p6  , ON  )
		SET_ALL_CONTROLS_STATUS  (  p6  , ON  )

		IF ((p6_trg_arena=1) OR (p6_noraceon=1)) //you died in the arena in your car or before getting back in
			SET p6_trg_arena=0
			GOSUB p6_loose:
			SET msg_hurt=3
		ENDIF

		//SUNDAY DRIVER
		IF (IS_CHARACTER_IN_ANY_CAR  ( p6  ))
			SET msg_sunday=3
		ENDIF

		//TANK TARGETS
		IF (IS_CAR_IN_BLOCK ( tank0 , 58.0 , 57.0 , 4.0 , 13.0 , 25.0  )) //works on jeep too but should not
			SET_CHAR_OBJECTIVE ( tankbot1 , KILL_CHAR_ANY_MEANS , p6 )
		ENDIF
	ENDIF

	//{ //TIMER  EVENTS

	//Canon
	IF (p6_tmr_remote>1) //canon shot timer
		SET p6_tmr_remote = ( p6_tmr_remote - 1)
	ENDIF
	IF (p6_tmr_remote=1) //canon after shooting
		SET p6_tmr_remote = 0

		eject = CREATE_CAR (58.0, 69.0, 4.0) 19 180 ISETTA MINI_CAR END
		TAKE_REMOTE_CONTROL_OF_CAR  ( p6  , eject )
		EXPLODE_SMALL (eject)
		//dest= CREATE_DESTRUCTOR( 58.0, 69.0, 4.0 )  ( 4.0 , 4.0  ) END //doesnt work in while_exec loops
		SET p6_remote_ammo = (p6_remote_ammo - 1)
		IF (p6_remote_ammo <= 0)
			DISPLAY_MESSAGE (5052)
			//this crahses the game when p6_v sinks, so removing the cannon isnt possible
			
			/*
			p6_v = CREATE_CAR (57.5, 68.5) 0 270 GTRUCK END
			PUT_CAR_ON_TRAILER  ( canon  ,  garbage )
			PUT_CAR_ON_TRAILER  ( platform  ,  garbage )
			PUT_CAR_ON_TRAILER  ( canon  ,  p6_v )
			PUT_CAR_ON_TRAILER  ( platform  ,  p6_v )
			DELETE_ITEM(canon)
			DELETE_ITEM(platform)
			//DELETE_ITEM(p6_v)
			STORE_CAR_CHARACTER_IS_IN ( p6  ,  p6_v  )
			*/
			
			SET_CAR_ROCKETPROOF (p6_v , OFF )
			SET_CAR_BULLETPROOF (p6_v , OFF )
			SET_CAR_FLAMEPROOF (p6_v , OFF )
		ENDIF
	ENDIF

	//ITEM
	IF (p6_jammedacc>0) //item timeout timer
		SET p6_jammedacc = ( p6_jammedacc + 1 )
	ENDIF
	IF ( p6_jammedacc > 933 ) //after jammed acc timeout
		IF (NOT(p6_jammedacc = 2001))
			DISPLAY_MESSAGE ( 5015 )
		ENDIF

		SET p1_accel=0
		SET p2_accel=0
		SET p3_accel=0
		SET p4_accel=0
		SET p5_accel=0
		SET p6_accel=0
		SET p6_jammedacc = 0
	ENDIF

	/*
		IF (surp_sel=13) //no collission (invulv)
			SET p6_nocoll = 0
		ENDIF
	*/
	
	//JOB FAILED
	IF (p6_jobfailed>1)
		SET p6_jobfailed = ( p6_jobfailed - 1 )
		//ORDER_CHAR_TO_DRIVE_CAR (  p6  ,  p6_v  )
		horn = CREATE_SOUND (58.0, 65.5, 5.0) BANK_ALARM PLAY_INSTANT END
	ENDIF
	IF (p6_jobfailed=1)
		DISPLAY_MESSAGE ( 1125 )
		GOSUB p6_loose:
		WARP_FROM_CAR_TO_POINT ( p6, 58.0, 85.5, 5.0, 180 )
	ENDIF
	
	//SET CONTROLS OFF
	IF (p6_controlsoff>1)
		SET p6_controlsoff = ( p6_controlsoff - 1 )
	ENDIF
	IF (p6_controlsoff=1)
		SET_ALL_CONTROLS_STATUS  (  p6  , OFF  )
		ORDER_CHAR_TO_DRIVE_CAR (  p6  ,  p6_v  )
		REMOVE_WEAPONS ( p6 )
		SET p6_controlsoff=0
	ENDIF
	//}
ENDIF


//}

//{ //TIMER EVENTS
SET rand = ( rand + 1 )

IF (door_c>0)
	SET door_c = ( door_c + 1 )
ENDIF
IF ( door_c > 200 ) //door close
	MAKE_DOOR_AUTOMATIC  ( door_1 )
	MAKE_DOOR_AUTOMATIC  ( door_2 )
	SET door_c = 0
ENDIF

IF (surp_tmr>0)
	SET surp_tmr = ( surp_tmr - 1 )
ENDIF

IF(bus_c=16)
	SET bus_c = 0
ENDIF
IF (bus_tmr>0)
	SET bus_tmr = ( bus_tmr - 1 )
ELSE
	SET bus_tmr = 200
	SET bus_c = ( bus_c + 1 )
	SET bus_trg=1
ENDIF

//DEATH MESSAGE
IF (msg_hurt>1)
	SET msg_hurt = ( msg_hurt - 1 )
ENDIF
IF (msg_hurt=1)
	SET temp = ( rand / 4 )
	SET temp = ( temp * 4 )
	SET temp= ( rand - temp )
	IF (temp=0)
		DISPLAY_MESSAGE ( 5053 )
	ENDIF
	IF (temp=1)
		DISPLAY_MESSAGE ( 5058 )
	ENDIF
	IF (temp=2)
		DISPLAY_MESSAGE ( 5059 )
	ENDIF
	IF (temp=3)
		DISPLAY_MESSAGE ( 5031 )
	ENDIF
	SET msg_hurt = 0
ENDIF

//GAME OVER MESSAGE
IF (msg_over>1)
	SET msg_over = ( msg_over - 1 )
ENDIF
IF (msg_over=1)
	DISPLAY_MESSAGE ( 5501 )
	SET msg_over = 0
ENDIF

//SUNDAY DRIVER
IF (msg_sunday>1)
	SET msg_sunday = ( msg_sunday - 1 )
ENDIF
IF (msg_sunday=1)
	DISPLAY_MESSAGE ( 5061 )
	SET msg_sunday = 0
ENDIF


SET tmr = ( tmr + 1 )
//}

//{ //Surprise
IF (surp_tmr=0) //surprise spawn
	//{ //Setup
	SET surp_tmr = 555
	SET collected=0

	SET ply_taken = 0
	SET pos_taken = -1

	DELETE_ITEM ( surp_obj )
	//DELETE_ITEM ( ball )
	//}

	//{ //Random
	//generates a pseudo random number by calculating the modulo of a timer that resets in game dependednd moments so it is different each game
	//when using the same seed for more than one random value ensure that both random number field lengths dont have a common divisor

	//SET temp = ( rand / X )
	//SET temp = ( temp * X )
	//SET number = ( rand - temp )
	//replace X with a value and number will be a random value between 0 and X-1

	SET temp = ( rand / 33 )
	SET temp = ( temp * 33 )
	SET surp_sel= ( rand - temp )

	SET temp = (rand / 4)
	SET temp = ( temp * 4 )
	SET surp_pos= ( rand - temp )

	//SET surp_sel= 31 //for testing specific items
	//SET surp_pos= 0  //always on position 0
	//}

	LAUNCH_MISSION ( objects.mis )

ENDIF

IF (( ply_taken > 0 )AND(pos_taken >= 0 )) //surprise collect
		IF (collected=0)
			SET rand = 0
			SET collected=1
			DELETE_ITEM ( surp_obj )
			IF (surp_sel=7) //remote bomb (BRIEFCASE)
				DISPLAY_BRIEF_NOW (3342)
				IF(ply_taken=1)
					SET p1_bomb = 1
				ENDIF
				IF(ply_taken=2)
					SET p2_bomb = 1
				ENDIF
				IF(ply_taken=3)
					SET p3_bomb = 1
				ENDIF
				IF(ply_taken=4)
					SET p4_bomb = 1
				ENDIF
				IF(ply_taken=5)
					SET p5_bomb = 1
				ENDIF
				IF(ply_taken=6)
					SET p6_bomb = 1
				ENDIF

			ENDIF

			IF (((surp_sel=8)OR(surp_sel=0))OR((surp_sel=23)OR(surp_sel=24))) //repair (health)
				IF(ply_taken=1)
					ADD_SCORE (p1,5000)
				ENDIF
				IF(ply_taken=2)
					ADD_SCORE (p2,5000)
				ENDIF
				IF(ply_taken=3)
					ADD_SCORE (p3,5000)
				ENDIF
				IF(ply_taken=4)
					ADD_SCORE (p4,5000)
				ENDIF
				IF(ply_taken=5)
					ADD_SCORE (p5,5000)
				ENDIF
				IF(ply_taken=6)
					ADD_SCORE (p1,5000)
				ENDIF

				IF (surp_pos=0)
					surp_obj1 = CREATE_OBJ (53.5, 62.5, 255.0) 0 CAR_SHOP 28 END
				ENDIF
				IF (surp_pos=1)
					surp_obj1 = CREATE_OBJ (53.5, 56.5, 255.0) 0 CAR_SHOP 14 END
				ENDIF
				IF (surp_pos=2)
					surp_obj1 = CREATE_OBJ (62.5, 56.5, 255.0) 0 CAR_SHOP 9 END
				ENDIF
				IF (surp_pos=3)
					surp_obj1 = CREATE_OBJ (62.5, 62.5, 255.0) 0 CAR_SHOP 17 END
				ENDIF

				DELETE_ITEM ( surp_obj1 )
				//DELETE_ITEM ( ball )
				//DELETE_ITEM ( surp_obj3 )
				//DELETE_ITEM ( surp_obj4 )
			ENDIF

			IF (surp_sel=9) //tank (kill frenzy(1/2))
				GOSUB tank:
			ENDIF

			IF (surp_sel=11) //squad (instant gang)
				GOSUB guards:
			ENDIF

			IF (surp_sel=12) //rocket bullet flame proof (armour)
				IF(ply_taken=1)
					SET_CAR_BULLETPROOF  (  p1_v   ,  ON  )
					SET_CAR_FLAMEPROOF  (  p1_v   ,  ON  )
					SET_CAR_ROCKETPROOF  (  p1_v   ,  ON  )
				ENDIF
				IF(ply_taken=2)
					SET_CAR_BULLETPROOF  (  p2_v   ,  ON  )
					SET_CAR_FLAMEPROOF  (  p2_v   ,  ON  )
					SET_CAR_ROCKETPROOF  (  p2_v   ,  ON  )
				ENDIF
				IF(ply_taken=3)
					SET_CAR_BULLETPROOF  (  p3_v   ,  ON  )
					SET_CAR_FLAMEPROOF  (  p3_v   ,  ON  )
					SET_CAR_ROCKETPROOF  (  p3_v   ,  ON  )
				ENDIF
				IF(ply_taken=4)
					SET_CAR_BULLETPROOF  (  p4_v   ,  ON  )
					SET_CAR_FLAMEPROOF  (  p4_v   ,  ON  )
					SET_CAR_ROCKETPROOF  (  p4_v   ,  ON  )
				ENDIF
				IF(ply_taken=5)
					SET_CAR_BULLETPROOF  (  p5_v   ,  ON  )
					SET_CAR_FLAMEPROOF  (  p5_v   ,  ON  )
					SET_CAR_ROCKETPROOF  (  p5_v   ,  ON  )
				ENDIF
				IF(ply_taken=6)
					SET_CAR_BULLETPROOF  (  p6_v   ,  ON  )
					SET_CAR_FLAMEPROOF  (  p6_v   ,  ON  )
					SET_CAR_ROCKETPROOF  (  p6_v   ,  ON  )
				ENDIF
			ENDIF

			IF (surp_sel=13) //no collission (invulv)
				IF(ply_taken=1)
					//SET p1_jammedacc = 1
					//SET p1_nocoll = 1
					SET_CAR_NO_COLLIDE ( p1_v )
				ENDIF
				IF(ply_taken=2)
					//SET p2_jammedacc = 1
					//SET p2_nocoll = 1
					SET_CAR_NO_COLLIDE ( p2_v )
				ENDIF
				IF(ply_taken=3)
					//SET p3_jammedacc = 1
					//SET p3_nocoll = 1
					SET_CAR_NO_COLLIDE ( p3_v )
				ENDIF
				IF(ply_taken=4)
					//SET p4_jammedacc = 1
					//SET p4_nocoll = 1
					SET_CAR_NO_COLLIDE ( p4_v )
				ENDIF
				IF(ply_taken=5)
					//SET p5_jammedacc = 1
					//SET p5_nocoll = 1
					SET_CAR_NO_COLLIDE ( p5_v )
				ENDIF
				IF(ply_taken=6)
					//SET p6_jammedacc = 1
					//SET p6_nocoll = 1
					SET_CAR_NO_COLLIDE ( p6_v )
				ENDIF

			ENDIF

			IF (surp_sel=14) //life + 1 (life)
				IF(ply_taken=1)
					SET p1_lives = (p1_lives + 1)
					ADD_SCORE (p1,100000)
				ENDIF
				IF(ply_taken=2)
					SET p2_lives = (p2_lives + 1)
					ADD_SCORE (p2,100000)
				ENDIF
				IF(ply_taken=3)
					SET p3_lives = (p3_lives + 1)
					ADD_SCORE (p3,100000)
				ENDIF
				IF(ply_taken=4)
					SET p4_lives = (p4_lives + 1)
					ADD_SCORE (p4,100000)
				ENDIF
				IF(ply_taken=5)
					SET p5_lives = (p5_lives + 1)
					ADD_SCORE (p5,100000)
				ENDIF
				IF(ply_taken=6)
					SET p6_lives = (p6_lives + 1)
					ADD_SCORE (p6,100000)
				ENDIF
			ENDIF

			IF (surp_sel=15) //1 free walk (out of jail)
				IF(ply_taken=1)
					SET p1_noloose = 1
				ENDIF
				IF(ply_taken=2)
					SET p2_noloose = 1
				ENDIF
				IF(ply_taken=3)
					SET p3_noloose = 1
				ENDIF
				IF(ply_taken=4)
					SET p4_noloose = 1
				ENDIF
				IF(ply_taken=5)
					SET p5_noloose = 1
				ENDIF
				IF(ply_taken=6)
					SET p6_noloose = 1
				ENDIF
			ENDIF

			IF (surp_sel=16) //planted bomb (bomb)
				IF (surp_pos=0)
					EXPLODE_LARGE (53.5, 62.5, 4.0)
				ENDIF
				IF (surp_pos=1)
					EXPLODE_LARGE (53.5, 56.5, 4.0)
				ENDIF
				IF (surp_pos=2)
					EXPLODE_LARGE (62.5, 56.5, 4.0)
				ENDIF
				IF (surp_pos=3)
					EXPLODE_LARGE (62.5, 62.5, 4.0)
				ENDIF
			ENDIF

			IF (surp_sel=18) //Mini Car (rc) + destructor test (not working)
				//dest = CREATE_DESTRUCTOR  (  58.0 , 57.0, 4.0 )  ( 13.0 , 25.0  ) END
				//DELETE_ITEM ( dest )

				rc_car = CREATE_CAR (58.0, 66.5, 4.0) 0 180 ZCX5 MINI_CAR END
				GIVE_WEAPON ( rc_car , CAR_BOMB   , 1 )

				IF(ply_taken=1)
					SET p1_noloose = 1
					WARP_FROM_CAR_TO_POINT ( p1, 58.0, 85.5, 5.0, 180 )
					TAKE_REMOTE_CONTROL_OF_CAR  ( p1  , rc_car )
				ENDIF
				IF(ply_taken=2)
					SET p2_noloose = 1
					WARP_FROM_CAR_TO_POINT ( p2, 58.0, 85.5, 5.0, 180 )
					TAKE_REMOTE_CONTROL_OF_CAR  ( p2  , rc_car )
				ENDIF
				IF(ply_taken=3)
					SET p3_noloose = 1
					WARP_FROM_CAR_TO_POINT ( p3, 58.0, 85.5, 5.0, 180 )
					TAKE_REMOTE_CONTROL_OF_CAR  ( p3  , rc_car )
				ENDIF
				IF(ply_taken=4)
					SET p4_noloose = 1
					WARP_FROM_CAR_TO_POINT ( p4, 58.0, 85.5, 5.0, 180 )
					TAKE_REMOTE_CONTROL_OF_CAR  ( p4  , rc_car )
				ENDIF
				IF(ply_taken=5)
					SET p5_noloose = 1
					WARP_FROM_CAR_TO_POINT ( p5, 58.0, 85.5, 5.0, 180 )
					TAKE_REMOTE_CONTROL_OF_CAR  ( p5  , rc_car )
				ENDIF
				IF(ply_taken=6)
					SET p6_noloose = 1
					WARP_FROM_CAR_TO_POINT ( p6, 58.0, 85.5, 5.0, 180 )
					TAKE_REMOTE_CONTROL_OF_CAR  ( p6  , rc_car )
				ENDIF
			ENDIF

			IF (surp_sel=19) //Rocket Door (muliplyer)
				MAKE_DOOR_MANUAL  ( door_1 )
				MAKE_DOOR_MANUAL  ( door_2 )

				OPEN_DOOR ( door_1 )
				OPEN_DOOR ( door_2 )
				target1 = CREATE_OBJ (56.5, 65.8) 180 ROCKET END
				target2 = CREATE_OBJ (57.0, 65.8) 180 ROCKET END
				target3 = CREATE_OBJ (57.5, 65.8) 180 ROCKET END
				target4 = CREATE_OBJ (58.0, 65.8) 180 ROCKET END
				target5 = CREATE_OBJ (57.5, 65.8) 180 ROCKET END
				target6 = CREATE_OBJ (58.0, 65.8) 180 ROCKET END
				SET door_c = 1
			ENDIF

			IF (surp_sel=20) //Tanktop (tanktop)
				canon = CREATE_CAR (58.0, 66.5, 4.0) 0 180 TANK MINI_CAR END
				SET_CAR_ROCKETPROOF  (  canon   ,  ON  )
				platform = CREATE_CAR (58.0, 65.0, 4.0) 19 180 ISETTA MINI_CAR END
				SET_CAR_ROCKETPROOF  (  platform   ,  ON  )
				PUT_CAR_ON_TRAILER  ( canon  ,  platform )

				IF(ply_taken=1)
					SET_CAR_ROCKETPROOF  (  p1_v   ,  ON  )
					PUT_CAR_ON_TRAILER  ( platform  ,  p1_v )
					SET p1_canontop = 1
					SET p1_remote_ammo = (p1_remote_ammo+1)
				ENDIF
				IF(ply_taken=2)
					SET_CAR_ROCKETPROOF  (  p2_v   ,  ON  )
					PUT_CAR_ON_TRAILER  ( platform  ,  p2_v )
					SET p2_canontop = 1
					SET p2_remote_ammo = (p2_remote_ammo+1)
				ENDIF
				IF(ply_taken=3)
					SET_CAR_ROCKETPROOF  (  p3_v   ,  ON  )
					PUT_CAR_ON_TRAILER  ( platform  ,  p3_v )
					SET p3_canontop = 1
					SET p3_remote_ammo = (p3_remote_ammo+1)
				ENDIF
				IF(ply_taken=4)
					SET_CAR_ROCKETPROOF  (  p4_v   ,  ON  )
					PUT_CAR_ON_TRAILER  ( platform  ,  p4_v )
					SET p4_canontop = 1
					SET p4_remote_ammo = (p4_remote_ammo+1)
				ENDIF
				IF(ply_taken=5)
					SET_CAR_ROCKETPROOF  (  p5_v   ,  ON  )
					PUT_CAR_ON_TRAILER  ( platform  ,  p5_v )
					SET p5_canontop = 1
					SET p5_remote_ammo = (p5_remote_ammo+1)
				ENDIF
				IF(ply_taken=6)
					SET_CAR_ROCKETPROOF  (  p6_v   ,  ON  )
					PUT_CAR_ON_TRAILER  ( platform  ,  p6_v )
					SET p6_canontop = 1
					SET p6_remote_ammo = (p6_remote_ammo+1)
				ENDIF
			ENDIF

			IF (surp_sel=21) //Bus with exploding Bots(respekt)
				//GOSUB bus:
				MAKE_DOOR_MANUAL  ( door_1 )
				MAKE_DOOR_MANUAL  ( door_2 )

				OPEN_DOOR ( door_1 )
				OPEN_DOOR ( door_2 )

				bus = CREATE_CAR (58.0, 64.8, 4.0) 19 180 VAN END

				SET door_c = 1
			ENDIF

			IF (surp_sel=22) //watercanon (watercanon)
				canon = CREATE_CAR (58.0, 66.5, 4.0) 0 180 FIRETRUK MINI_CAR END
				SET_CAR_ROCKETPROOF  (  canon   ,  ON  )
				platform = CREATE_CAR (58.0, 65.0, 4.0) 19 180 ISETTA MINI_CAR END
				SET_CAR_ROCKETPROOF  (  platform   ,  ON  )
				PUT_CAR_ON_TRAILER  ( canon  ,  platform )

				IF(ply_taken=1)
					SET_CAR_ROCKETPROOF  (  p1_v   ,  ON  )
					PUT_CAR_ON_TRAILER  ( platform  ,  p1_v )
					SET p1_canontop = 1
					SET p1_remote_ammo = (p1_remote_ammo+1)
				ENDIF
				IF(ply_taken=2)
					SET_CAR_ROCKETPROOF  (  p2_v   ,  ON  )
					PUT_CAR_ON_TRAILER  ( platform  ,  p2_v )
					SET p2_canontop = 1
					SET p2_remote_ammo = (p2_remote_ammo+1)
				ENDIF
				IF(ply_taken=3)
					SET_CAR_ROCKETPROOF  (  p3_v   ,  ON  )
					PUT_CAR_ON_TRAILER  ( platform  ,  p3_v )
					SET p3_canontop = 1
					SET p3_remote_ammo = (p3_remote_ammo+1)
				ENDIF
				IF(ply_taken=4)
					SET_CAR_ROCKETPROOF  (  p4_v   ,  ON  )
					PUT_CAR_ON_TRAILER  ( platform  ,  p4_v )
					SET p4_canontop = 1
					SET p4_remote_ammo = (p4_remote_ammo+1)
				ENDIF
				IF(ply_taken=5)
					SET_CAR_ROCKETPROOF  (  p5_v   ,  ON  )
					PUT_CAR_ON_TRAILER  ( platform  ,  p5_v )
					SET p5_canontop = 1
					SET p5_remote_ammo = (p5_remote_ammo+1)
				ENDIF
				IF(ply_taken=6)
					SET_CAR_ROCKETPROOF  (  p6_v   ,  ON  )
					PUT_CAR_ON_TRAILER  ( platform  ,  p6_v )
					SET p6_canontop = 1
					SET p6_remote_ammo = (p6_remote_ammo+1)
				ENDIF
			ENDIF

			IF (surp_sel=23) //weatherstorm (electrofingers) xxxxxxxxxxxx
				DELETE_ITEM ( surp_obj )

				//midgame conveyors do not work
				/*
				IF (surp_pos=0)
					cnv_west = CREATE_CONVEYOR ( 108.0 , 115.5 , 3.0 )  ( 16.5 , 1.0 ) -5 0 END
				ENDIF

				IF (surp_pos=1)
					cnv_north = CREATE_CONVEYOR ( 108.0 , 115.5 , 3.0 )  ( 16.5 , 1.0 ) -5 0 END
				ENDIF
				IF (surp_pos=2)
					cnv_east = CREATE_CONVEYOR ( 108.0 , 115.5 , 3.0 )  ( 16.5 , 1.0 ) -5 0 END
				ENDIF
				IF (surp_pos=3)
					cnv_south = CREATE_CONVEYOR ( 108.0 , 115.5 , 3.0 )  ( 16.5 , 1.0 ) -5 0 END
				ENDIF
				*/
			ENDIF

			IF (surp_sel=24) //slow opponents (satellite dish) xxxxxxxxxxxxxx
				DELETE_ITEM ( surp_obj )

			ENDIF

			IF (surp_sel=25) //JAMMED_ACCELERATOR (invis)

				IF(ply_taken=1)
					SET p1_jammedacc = 1
					//SET p1_accel=1
					SET p2_accel=1
					SET p3_accel=1
					SET p4_accel=1
					SET p5_accel=1
					SET p6_accel=1
				ENDIF
				IF(ply_taken=2)
					SET p2_jammedacc = 1
					SET p1_accel=1
					//SET p2_accel=1
					SET p3_accel=1
					SET p4_accel=1
					SET p5_accel=1
					SET p6_accel=1
				ENDIF
				IF(ply_taken=3)
					SET p3_jammedacc = 1
					SET p1_accel=1
					SET p2_accel=1
					//SET p3_accel=1
					SET p4_accel=1
					SET p5_accel=1
					SET p6_accel=1
				ENDIF
				IF(ply_taken=4)
					SET p4_jammedacc = 1
					SET p1_accel=1
					SET p2_accel=1
					SET p3_accel=1
					//SET p4_accel=1
					SET p5_accel=1
					SET p6_accel=1
				ENDIF
				IF(ply_taken=5)
					SET p5_jammedacc = 1
					SET p1_accel=1
					SET p2_accel=1
					SET p3_accel=1
					SET p4_accel=1
					//SET p5_accel=1
					SET p6_accel=1
				ENDIF
				IF(ply_taken=6)
					SET p6_jammedacc = 1
					SET p1_accel=1
					SET p2_accel=1
					SET p3_accel=1
					SET p4_accel=1
					SET p5_accel=1
					//SET p6_accel=1
				ENDIF

			ENDIF

			IF (surp_sel=26) //Flamethrower (flame)
				canon = CREATE_CAR (58.0, 66.5, 4.0) 0 180 FIRETRUK MINI_CAR END
				GIVE_WEAPON (canon , CAR_FLAMETHROWER  )
				SET_CAR_ROCKETPROOF  (  canon   ,  ON  )
				platform = CREATE_CAR (58.0, 65.0, 4.0) 19 180 ISETTA MINI_CAR END
				SET_CAR_FLAMEPROOF  (  platform   ,  ON  )
				PUT_CAR_ON_TRAILER  ( canon  ,  platform )

				IF(ply_taken=1)
					SET_CAR_FLAMEPROOF  (  p1_v   ,  ON  )
					PUT_CAR_ON_TRAILER  ( platform  ,  p1_v )
					SET p1_canontop = 1
					SET p1_remote_ammo = (p1_remote_ammo+4)
				ENDIF
				IF(ply_taken=2)
					SET_CAR_FLAMEPROOF  (  p2_v   ,  ON  )
					PUT_CAR_ON_TRAILER  ( platform  ,  p2_v )
					SET p2_canontop = 1
					SET p2_remote_ammo = (p2_remote_ammo+4)
				ENDIF
				IF(ply_taken=3)
					SET_CAR_FLAMEPROOF  (  p3_v   ,  ON  )
					PUT_CAR_ON_TRAILER  ( platform  ,  p3_v )
					SET p3_canontop = 1
					SET p3_remote_ammo = (p3_remote_ammo+4)
				ENDIF
				IF(ply_taken=4)
					SET_CAR_FLAMEPROOF  (  p4_v   ,  ON  )
					PUT_CAR_ON_TRAILER  ( platform  ,  p4_v )
					SET p4_canontop = 1
					SET p4_remote_ammo = (p4_remote_ammo+4)
				ENDIF
				IF(ply_taken=5)
					SET_CAR_FLAMEPROOF  (  p5_v   ,  ON  )
					PUT_CAR_ON_TRAILER  ( platform  ,  p5_v )
					SET p5_canontop = 1
					SET p5_remote_ammo = (p5_remote_ammo+4)
				ENDIF
				IF(ply_taken=6)
					SET_CAR_FLAMEPROOF  (  p6_v   ,  ON  )
					PUT_CAR_ON_TRAILER  ( platform  ,  p6_v )
					SET p6_canontop = 1
					SET p6_remote_ammo = (p6_remote_ammo+4)
				ENDIF
			ENDIF

			IF (surp_sel=27) //car thiefs (gta2 logo)
				GOSUB thiefs:
			ENDIF

			IF (surp_sel=28) //bankvans (bribe)
				platform = CREATE_CAR (53.8, 54.7, 7.99) 19 205 BANKVAN END
				MAKE_CAR_A_DUMMY  (  platform  )
				platform = CREATE_CAR (62.9, 65.1, 7.99) 19 190 BANKVAN END
				MAKE_CAR_A_DUMMY  (  platform  )
				platform = CREATE_CAR (56.1, 53.6, 7.99) 19 60 BANKVAN END
				MAKE_CAR_A_DUMMY  (  platform  )
				platform = CREATE_CAR (59.1, 50.6, 7.99) 19 310 BANKVAN END
				MAKE_CAR_A_DUMMY  (  platform  )
				platform = CREATE_CAR (60.0, 56.2, 7.99) 19 260 BANKVAN END
				MAKE_CAR_A_DUMMY  (  platform  )
				platform = CREATE_CAR (56.8, 58.7, 7.99) 19 115 BANKVAN END
				MAKE_CAR_A_DUMMY  (  platform  )
				platform = CREATE_CAR (55.5, 56.5, 7.99) 19 40 BANKVAN END
				MAKE_CAR_A_DUMMY  (  platform  )
				platform = CREATE_CAR (54.8, 63.0, 7.99) 19 160 BANKVAN END
				MAKE_CAR_A_DUMMY  (  platform  )
				platform = CREATE_CAR (60.8, 62.7, 7.99) 19 205 BANKVAN END
				MAKE_CAR_A_DUMMY  (  platform  )
				platform = CREATE_CAR (54.0, 61.0, 7.99) 19 190 BANKVAN END
				MAKE_CAR_A_DUMMY  (  platform  )
				platform = CREATE_CAR (57.7, 63.5, 7.99) 19 120 BANKVAN END
				MAKE_CAR_A_DUMMY  (  platform  )
				platform = CREATE_CAR (56.7, 61.3, 7.99) 19 210 BANKVAN END
				MAKE_CAR_A_DUMMY  (  platform  )
				platform = CREATE_CAR (59.2, 61.4, 7.99) 19 300 BANKVAN END
				MAKE_CAR_A_DUMMY  (  platform  )
			ENDIF

			IF (surp_sel=29) //jeep (kill frenzy(2/2))
				GOSUB jeep:
			ENDIF
			
	ENDIF
ENDIF

//{ //busbots
IF(((IS_CAR_IN_BLOCK ( bus , 58.0 , 57.0 , 4.0 , 13.0 , 25.0  ))AND(bus_trg=1))AND(NOT (IS_CAR_WRECKED(bus))))
	SET bus_trg=0

	IF (bus_c=1)
		IF ((CHECK_CHARACTER_HEALTH(busbot9, 0)) AND (CHECK_CHARACTER_HEALTH(busbot8, 0)))
			SET_CHAR_OBJECTIVE ( busbot9 , FLEE_CHAR_ON_FOOT_TILL_SAFE , busbot8 )
		ENDIF
		SET busbot1_d=0
		busbot1 = CREATE_CHAR_INSIDE_CAR ( bus ) 7 DUMMY END
	ENDIF
	IF (bus_c=2)
		IF (CHECK_CHARACTER_HEALTH(busbot1, 0))
			SET_CHAR_OBJECTIVE ( busbot1 , LEAVE_CAR , bus )
		ENDIF
	ENDIF
	IF (bus_c=3)
		IF ((CHECK_CHARACTER_HEALTH(busbot1, 0)) AND (CHECK_CHARACTER_HEALTH(busbot9, 0)))
			SET_CHAR_OBJECTIVE ( busbot1 , FLEE_CHAR_ON_FOOT_TILL_SAFE , busbot9 )
		ENDIF
		SET busbot2_d=0
		busbot2 = CREATE_CHAR_INSIDE_CAR ( bus ) 7 DUMMY END
	ENDIF
	IF (bus_c=4)
		IF (CHECK_CHARACTER_HEALTH(busbot2, 0))
			SET_CHAR_OBJECTIVE ( busbot2 , LEAVE_CAR , bus )
		ENDIF
	ENDIF
	IF (bus_c=5)
		IF ((CHECK_CHARACTER_HEALTH(busbot2, 0)) AND (CHECK_CHARACTER_HEALTH(busbot1, 0)))
			SET_CHAR_OBJECTIVE ( busbot2 , FLEE_CHAR_ON_FOOT_TILL_SAFE , busbot1 )
		ENDIF

		SET busbot3_d=0
		busbot3 = CREATE_CHAR_INSIDE_CAR ( bus ) 7 DUMMY END
	ENDIF
	IF (bus_c=6)
		IF (CHECK_CHARACTER_HEALTH(busbot3, 0))
			SET_CHAR_OBJECTIVE ( busbot3 , LEAVE_CAR , bus )
		ENDIF
	ENDIF
	IF (bus_c=7)
		IF ((CHECK_CHARACTER_HEALTH(busbot3, 0)) AND (CHECK_CHARACTER_HEALTH(busbot2, 0)))
			SET_CHAR_OBJECTIVE ( busbot3 , FLEE_CHAR_ON_FOOT_TILL_SAFE , busbot2 )
		ENDIF
		SET busbot4_d=0
		busbot4 = CREATE_CHAR_INSIDE_CAR ( bus ) 7 DUMMY END
	ENDIF
	IF (bus_c=8)
		IF (CHECK_CHARACTER_HEALTH(busbot4, 0))
			SET_CHAR_OBJECTIVE ( busbot4 , LEAVE_CAR , bus )
		ENDIF
	ENDIF
	IF (bus_c=9)
		IF ((CHECK_CHARACTER_HEALTH(busbot4, 0)) AND (CHECK_CHARACTER_HEALTH(busbot3, 0)))
			SET_CHAR_OBJECTIVE ( busbot4 , FLEE_CHAR_ON_FOOT_TILL_SAFE , busbot3 )
		ENDIF
		SET busbot5_d=0
		busbot5 = CREATE_CHAR_INSIDE_CAR ( bus ) 7 DUMMY END
	ENDIF
	IF (bus_c=10)
		IF (CHECK_CHARACTER_HEALTH(busbot5, 0))
			SET_CHAR_OBJECTIVE ( busbot5 , LEAVE_CAR , bus )
		ENDIF
	ENDIF
	IF (bus_c=11)
		IF ((CHECK_CHARACTER_HEALTH(busbot5, 0)) AND (CHECK_CHARACTER_HEALTH(busbot4, 0)))
			SET_CHAR_OBJECTIVE ( busbot5 , FLEE_CHAR_ON_FOOT_TILL_SAFE , busbot4 )
		ENDIF
		SET busbot6_d=0
		busbot6 = CREATE_CHAR_INSIDE_CAR ( bus ) 7 DUMMY END
	ENDIF
	IF (bus_c=12)
		IF (CHECK_CHARACTER_HEALTH(busbot6, 0))
			SET_CHAR_OBJECTIVE ( busbot6 , LEAVE_CAR , bus )
		ENDIF
	ENDIF
	IF (bus_c=13)
		IF ((CHECK_CHARACTER_HEALTH(busbot6, 0)) AND (CHECK_CHARACTER_HEALTH(busbot5, 0)))
			SET_CHAR_OBJECTIVE ( busbot6 , FLEE_CHAR_ON_FOOT_TILL_SAFE , busbot5 )
		ENDIF
		SET busbot7_d=0
		busbot7 = CREATE_CHAR_INSIDE_CAR ( bus ) 7 DUMMY END
	ENDIF
	IF (bus_c=14)
		IF (CHECK_CHARACTER_HEALTH(busbot7, 0))
			SET_CHAR_OBJECTIVE ( busbot7 , LEAVE_CAR , bus )
		ENDIF
	ENDIF
	IF (bus_c=15)
		IF ((CHECK_CHARACTER_HEALTH(busbot7, 0)) AND (CHECK_CHARACTER_HEALTH(busbot8, 0)))
			SET_CHAR_OBJECTIVE ( busbot7 , FLEE_CHAR_ON_FOOT_TILL_SAFE , busbot6 )
		ENDIF
		SET busbot8_d=0
		busbot8 = CREATE_CHAR_INSIDE_CAR ( bus ) 7 DUMMY END
	ENDIF
	IF (bus_c=16)
		IF (CHECK_CHARACTER_HEALTH(busbot8, 0))
			SET_CHAR_OBJECTIVE ( busbot8 , LEAVE_CAR , bus )
		ENDIF
	ENDIF
	IF (bus_c=17)
		IF ((CHECK_CHARACTER_HEALTH(busbot8, 0)) AND (CHECK_CHARACTER_HEALTH(busbot8, 0)))
			SET_CHAR_OBJECTIVE ( busbot8 , FLEE_CHAR_ON_FOOT_TILL_SAFE , busbot8 )
		ENDIF
		SET busbot9_d=0
		busbot9 = CREATE_CHAR_INSIDE_CAR ( bus ) 7 DUMMY END
	ENDIF
	IF (bus_c=18)
		IF (CHECK_CHARACTER_HEALTH(busbot9, 0))
			SET_CHAR_OBJECTIVE ( busbot9 , LEAVE_CAR , bus )
		ENDIF

		SET bus_c=0
	ENDIF

ENDIF

//{ //explosions
IF ((has_character_died(busbot1))AND(busbot1_d=0))
	EXPLODE_SMALL (busbot1)
	SET busbot1_d=1
ENDIF
IF ((has_character_died(busbot2))AND(busbot2_d=0))
	EXPLODE_SMALL (busbot2)
	SET busbot2_d=1
ENDIF
IF ((has_character_died(busbot3))AND(busbot3_d=0))
	EXPLODE_SMALL (busbot3)
	SET busbot3_d=1
ENDIF
IF ((has_character_died(busbot4))AND(busbot4_d=0))
	EXPLODE_SMALL (busbot4)
	SET busbot4_d=1
ENDIF
IF ((has_character_died(busbot5))AND(busbot5_d=0))
	EXPLODE_SMALL (busbot5)
	SET busbot5_d=1
ENDIF
IF ((has_character_died(busbot6))AND(busbot6_d=0))
	EXPLODE_SMALL (busbot6)
	SET busbot6_d=1
ENDIF
IF ((has_character_died(busbot7))AND(busbot7_d=0))
	EXPLODE_SMALL (busbot7)
	SET busbot7_d=1
ENDIF
IF ((has_character_died(busbot8))AND(busbot8_d=0))
	EXPLODE_SMALL (busbot8)
	SET busbot8_d=1
ENDIF
IF ((has_character_died(busbot9))AND(busbot9_d=0))
	EXPLODE_SMALL (busbot9)
	SET busbot9_d=1
ENDIF
//}
//}
//}

//{ //CARS
//GIVE_DRIVER_AND_BRAKE(car01) makes the car fall down. And in my combination with high thrust in gci it is hard to crash

//LAUNCH_MISSION ( classic2.mis )

IF (IS_CAR_WRECKED(car01))
	car01 = CREATE_CAR (61.5, 66.5, 7.99) 24 270 STINGRAY END
	GIVE_DRIVER_AND_BRAKE(car01)
ENDIF
IF (IS_CAR_WRECKED(car02))
	car02 = CREATE_CAR (61.5, 67.5, 7.99) 25 270 STINGRAY END
	GIVE_DRIVER_AND_BRAKE(car02)
ENDIF
IF (IS_CAR_WRECKED(car03))
	car03 = CREATE_CAR (61.5, 68.5, 7.99) 26 270 STINGRAY END
	GIVE_DRIVER_AND_BRAKE(car03)
ENDIF
IF (IS_CAR_WRECKED(car04))
	car04 = CREATE_CAR (61.5, 69.5, 7.99) 27 270 STINGRAY END
	GIVE_DRIVER_AND_BRAKE(car04)
ENDIF
IF (IS_CAR_WRECKED(car05))
	car05 = CREATE_CAR (61.5, 70.5, 7.99) 28 270 STINGRAY END
	GIVE_DRIVER_AND_BRAKE(car05)
ENDIF
IF (IS_CAR_WRECKED(car06))
	car06 = CREATE_CAR (61.5, 71.5, 7.99) 29 270 STINGRAY END
	GIVE_DRIVER_AND_BRAKE(car06)
ENDIF


IF (IS_CAR_WRECKED(car07))
	car07 = CREATE_CAR (54.5, 66.5, 7.99) 28 90 WBTWIN END
	GIVE_DRIVER_AND_BRAKE(car07)
ENDIF
IF (IS_CAR_WRECKED(car08))
	car08 = CREATE_CAR (54.5, 67.5, 7.99) 29 90 WBTWIN END
	GIVE_DRIVER_AND_BRAKE(car08)
ENDIF
IF (IS_CAR_WRECKED(car09))
	car09 = CREATE_CAR (54.5, 68.5, 7.99) 30 90 WBTWIN END
	GIVE_DRIVER_AND_BRAKE(car09)
ENDIF
IF (IS_CAR_WRECKED(car10))
	car10 = CREATE_CAR (54.5, 69.5, 7.99) 31 90 WBTWIN END
	GIVE_DRIVER_AND_BRAKE(car10)
ENDIF
IF (IS_CAR_WRECKED(car11))
	car11 = CREATE_CAR (54.5, 70.5, 7.99) 32 90 WBTWIN END
	GIVE_DRIVER_AND_BRAKE(car11)
ENDIF
IF (IS_CAR_WRECKED(car12))
	car12 = CREATE_CAR (54.5, 71.5, 7.99) 33 90 WBTWIN END
	GIVE_DRIVER_AND_BRAKE(car12)
ENDIF

IF (IS_CAR_WRECKED(car13))
	car13 = CREATE_CAR (61.5, 76.5, 7.99) 34 270 GT24640 END
	GIVE_DRIVER_AND_BRAKE(car13)
ENDIF
IF (IS_CAR_WRECKED(car14))
	car14 = CREATE_CAR (61.5, 77.5, 7.99) 35 270 GT24640 END
	GIVE_DRIVER_AND_BRAKE(car14)
ENDIF
IF (IS_CAR_WRECKED(car15))
	car15 = CREATE_CAR (61.5, 78.5, 7.99) 1 270 GT24640 END
	GIVE_DRIVER_AND_BRAKE(car15)
ENDIF
IF (IS_CAR_WRECKED(car16))
	car16 = CREATE_CAR (61.5, 79.5, 7.99) 0 270 GT24640 END
	GIVE_DRIVER_AND_BRAKE(car16)
ENDIF
IF (IS_CAR_WRECKED(car17))
	car17 = CREATE_CAR (61.5, 80.5, 7.99) 1 270 GT24640 END
	GIVE_DRIVER_AND_BRAKE(car17)
ENDIF
IF (IS_CAR_WRECKED(car18))
	car18 = CREATE_CAR (61.5, 81.5, 7.99) 2 270 GT24640 END
	GIVE_DRIVER_AND_BRAKE(car18)
ENDIF

IF (IS_CAR_WRECKED(car19))
	car19 = CREATE_CAR (54.5, 76.5, 7.99) 3 90 STYPE END
	GIVE_DRIVER_AND_BRAKE(car19)
ENDIF
IF (IS_CAR_WRECKED(car20))
	car20 = CREATE_CAR (54.5, 77.5, 7.99) 4 90 STYPE END
	GIVE_DRIVER_AND_BRAKE(car20)
ENDIF
IF (IS_CAR_WRECKED(car21))
	car21 = CREATE_CAR (54.5, 78.5, 7.99) 5 90 STYPE END
	GIVE_DRIVER_AND_BRAKE(car21)
ENDIF
IF (IS_CAR_WRECKED(car22))
	car22 = CREATE_CAR (54.5, 79.5, 7.99) 6 90 STYPE END
	GIVE_DRIVER_AND_BRAKE(car22)
ENDIF
IF (IS_CAR_WRECKED(car23))
	car23 = CREATE_CAR (54.5, 80.5, 7.99) 7 90 STYPE END
	GIVE_DRIVER_AND_BRAKE(car23)
ENDIF
IF (IS_CAR_WRECKED(car24))
	car24 = CREATE_CAR (54.5, 81.5, 7.99) 8 90 STYPE END
	GIVE_DRIVER_AND_BRAKE(car24)
ENDIF

//}

ENDWHILE

LEVELEND

//{ //SUBS
s_horn: //:

RETURN

guards: //:

	MAKE_DOOR_MANUAL  ( door_1 )
	MAKE_DOOR_MANUAL  ( door_2 )

	OPEN_DOOR ( door_1 )
	OPEN_DOOR ( door_2 )

	guard1 = CREATE_CHAR (57.0, 65.8) 4 180 ARMY END
	SET_CHAR_SHOOTING_SKILL ( guard1 , CRACK_SHOT )
	GIVE_WEAPON ( guard1 , MACHINE_GUN )
	SET_CHAR_OBJECTIVE (guard1, GUARD_SPOT)
	SET_CHAR_THREAT_SEARCH (guard1, AREA_PLAYER_ONLY)
	SET_CHAR_THREAT_REACTION (guard1, REACT_AS_NORMAL)
	ADD_PATROL_POINT (guard1, 53.5, 62.5, 4.0)
	ADD_PATROL_POINT (guard1, 53.5, 56.5, 4.0)
	ADD_PATROL_POINT (guard1, 62.5, 56.5, 4.0)
	ADD_PATROL_POINT (guard1, 62.5, 62.5, 4.0)

	guard2 = CREATE_CHAR (59.0, 65.8) 4 180 ARMY END
	SET_CHAR_SHOOTING_SKILL ( guard2 , CRACK_SHOT )
	GIVE_WEAPON ( guard2 , ROCKET_LAUNCHER )
	SET_CHAR_OBJECTIVE (guard2, GUARD_SPOT)
	SET_CHAR_THREAT_SEARCH (guard2, AREA_PLAYER_ONLY)
	SET_CHAR_THREAT_REACTION (guard2, REACT_AS_NORMAL)
	ADD_PATROL_POINT (guard2, 62.5, 62.5, 4.0)
	ADD_PATROL_POINT (guard2, 53.5, 62.5, 4.0)
	ADD_PATROL_POINT (guard2, 53.5, 56.5, 4.0)
	ADD_PATROL_POINT (guard2, 62.5, 56.5, 4.0)

	guard3 = CREATE_CHAR (58.5, 65.8) 4 180 ARMY END
	SET_CHAR_SHOOTING_SKILL ( guard3 , CRACK_SHOT )
	GIVE_WEAPON ( guard3 , ROCKET_LAUNCHER )
	SET_CHAR_OBJECTIVE (guard3, GUARD_SPOT)
	SET_CHAR_THREAT_SEARCH (guard3, AREA_PLAYER_ONLY)
	SET_CHAR_THREAT_REACTION (guard3, REACT_AS_NORMAL)
	ADD_PATROL_POINT (guard3, 62.5, 56.5, 4.0)
	ADD_PATROL_POINT (guard3, 62.5, 62.5, 4.0)
	ADD_PATROL_POINT (guard3, 53.5, 62.5, 4.0)
	ADD_PATROL_POINT (guard3, 53.5, 56.5, 4.0)

	guard4 = CREATE_CHAR (57.5, 65.8, 4.0) 4 180 ARMY END
	SET_CHAR_SHOOTING_SKILL ( guard4 , CRACK_SHOT )
	GIVE_WEAPON ( guard4 , MACHINE_GUN )
	SET_CHAR_OBJECTIVE (guard4, GUARD_SPOT)
	SET_CHAR_THREAT_SEARCH (guard4, AREA_PLAYER_ONLY)
	SET_CHAR_THREAT_REACTION (guard4, REACT_AS_NORMAL)
	ADD_PATROL_POINT (guard4, 53.5, 56.5, 4.0)
	ADD_PATROL_POINT (guard4, 62.5, 56.5, 4.0)
	ADD_PATROL_POINT (guard4, 62.5, 62.5, 4.0)
	ADD_PATROL_POINT (guard4, 53.5, 62.5, 4.0)

	SET door_c = 1

return

thiefs: //:

	MAKE_DOOR_MANUAL  ( door_1 )
	MAKE_DOOR_MANUAL  ( door_2 )

	OPEN_DOOR ( door_1 )
	OPEN_DOOR ( door_2 )

	guard1 = CREATE_CHAR (57.0, 65.8) 0 180 ARMY END
	SET_CHAR_SHOOTING_SKILL ( guard1 , CRACK_SHOT )
	SET_CHAR_OBJECTIVE (guard1, GUARD_SPOT)
	SET_CHAR_THREAT_SEARCH (guard1, AREA_PLAYER_ONLY)
	SET_CHAR_THREAT_REACTION (guard1, REACT_AS_NORMAL)
	ADD_PATROL_POINT (guard1, 53.5, 62.5, 4.0)
	ADD_PATROL_POINT (guard1, 53.5, 56.5, 4.0)
	ADD_PATROL_POINT (guard1, 62.5, 56.5, 4.0)
	ADD_PATROL_POINT (guard1, 62.5, 62.5, 4.0)

	guard2 = CREATE_CHAR (59.0, 65.8) 0 180 ARMY END
	SET_CHAR_SHOOTING_SKILL ( guard2 , CRACK_SHOT )
	SET_CHAR_OBJECTIVE (guard2, GUARD_SPOT)
	SET_CHAR_THREAT_SEARCH (guard2, AREA_PLAYER_ONLY)
	SET_CHAR_THREAT_REACTION (guard2, REACT_AS_NORMAL)
	ADD_PATROL_POINT (guard2, 62.5, 62.5, 4.0)
	ADD_PATROL_POINT (guard2, 53.5, 62.5, 4.0)
	ADD_PATROL_POINT (guard2, 53.5, 56.5, 4.0)
	ADD_PATROL_POINT (guard2, 62.5, 56.5, 4.0)

	guard3 = CREATE_CHAR (58.5, 65.8) 0 180 ARMY END
	SET_CHAR_SHOOTING_SKILL ( guard3 , CRACK_SHOT )
	SET_CHAR_OBJECTIVE (guard3, GUARD_SPOT)
	SET_CHAR_THREAT_SEARCH (guard3, AREA_PLAYER_ONLY)
	SET_CHAR_THREAT_REACTION (guard3, REACT_AS_NORMAL)
	ADD_PATROL_POINT (guard3, 62.5, 56.5, 4.0)
	ADD_PATROL_POINT (guard3, 62.5, 62.5, 4.0)
	ADD_PATROL_POINT (guard3, 53.5, 62.5, 4.0)
	ADD_PATROL_POINT (guard3, 53.5, 56.5, 4.0)

	guard4 = CREATE_CHAR (57.5, 65.8, 4.0) 0 180 ARMY END
	SET_CHAR_SHOOTING_SKILL ( guard4 , CRACK_SHOT )
	SET_CHAR_OBJECTIVE (guard4, GUARD_SPOT)
	SET_CHAR_THREAT_SEARCH (guard4, AREA_PLAYER_ONLY)
	SET_CHAR_THREAT_REACTION (guard4, REACT_AS_NORMAL)
	ADD_PATROL_POINT (guard4, 53.5, 56.5, 4.0)
	ADD_PATROL_POINT (guard4, 62.5, 56.5, 4.0)
	ADD_PATROL_POINT (guard4, 62.5, 62.5, 4.0)
	ADD_PATROL_POINT (guard4, 53.5, 62.5, 4.0)

	SET door_c = 1

return

tank: //:

	MAKE_DOOR_MANUAL  ( door_1 )
	MAKE_DOOR_MANUAL  ( door_2 )

	OPEN_DOOR ( door_1 )
	OPEN_DOOR ( door_2 )

	DELETE_ITEM (tank0)
	tank0 = CREATE_CAR (58.0, 65.0, 4.0) 19 180 ISETTA MINI_CAR END
	SET_CAR_ROCKETPROOF  (  tank0   ,  ON  )
	platform = CREATE_CAR (58.0, 65.0, 4.0) 19 180 ISETTA MINI_CAR END
	SET_CAR_ROCKETPROOF  (  platform   ,  ON  )
	PUT_CAR_ON_TRAILER  ( platform  ,  tank0 )

	//{ //turrets

	tank1 = CREATE_CAR (58.0, 65.0, 4.0) 19 180 GUNJEEP END
	SET_CAR_ROCKETPROOF  (  tank1   ,  ON  )
	PUT_CAR_ON_TRAILER  ( tank1  ,  platform )
	tank2 = CREATE_CAR (58.0, 65.0, 4.0) 19 180 GUNJEEP END
	PUT_CAR_ON_TRAILER  ( tank2  ,  platform )
	SET_CAR_ROCKETPROOF  (  tank2   ,  ON  )
	tank3 = CREATE_CAR (58.0, 65.0, 4.0) 19 180 GUNJEEP END
	PUT_CAR_ON_TRAILER  ( tank3  ,  platform )
	SET_CAR_ROCKETPROOF  (  tank3   ,  ON  )
	tank4 = CREATE_CAR (58.0, 65.0, 4.0) 19 180 GUNJEEP END
	PUT_CAR_ON_TRAILER  ( tank4  ,  platform )
	SET_CAR_ROCKETPROOF  (  tank4   ,  ON  )
	tank5 = CREATE_CAR (58.0, 65.0, 4.0) 19 180 GUNJEEP END
	PUT_CAR_ON_TRAILER  ( tank5  ,  platform )
	SET_CAR_ROCKETPROOF  (  tank5   ,  ON  )
	tank6 = CREATE_CAR (58.0, 65.0, 4.0) 19 180 GUNJEEP END
	SET_CAR_ROCKETPROOF  (  tank6   ,  ON  )
	PUT_CAR_ON_TRAILER  ( tank6  ,  platform )


	//}

	//{ //turrets

	tank1 = CREATE_CAR (58.0, 65.0, 4.0) 19 180 TANK END
	SET_CAR_ROCKETPROOF  (  tank1   ,  ON  )
	PUT_CAR_ON_TRAILER  ( tank1  ,  platform )
	tank2 = CREATE_CAR (58.0, 65.0, 4.0) 19 180 TANK END
	PUT_CAR_ON_TRAILER  ( tank2  ,  platform )
	SET_CAR_ROCKETPROOF  (  tank2   ,  ON  )
	tank3 = CREATE_CAR (58.0, 65.0, 4.0) 19 180 TANK END
	PUT_CAR_ON_TRAILER  ( tank3  ,  platform )
	SET_CAR_ROCKETPROOF  (  tank3   ,  ON  )
	tank4 = CREATE_CAR (58.0, 65.0, 4.0) 19 180 TANK END
	PUT_CAR_ON_TRAILER  ( tank4  ,  platform )
	SET_CAR_ROCKETPROOF  (  tank4   ,  ON  )
	tank5 = CREATE_CAR (58.0, 65.0, 4.0) 19 180 TANK END
	PUT_CAR_ON_TRAILER  ( tank5  ,  platform )
	SET_CAR_ROCKETPROOF  (  tank5   ,  ON  )
	tank6 = CREATE_CAR (58.0, 65.0, 4.0) 19 180 TANK END
	SET_CAR_ROCKETPROOF  (  tank6   ,  ON  )
	PUT_CAR_ON_TRAILER  ( tank6  ,  platform )

	//}

	//platform1 = CREATE_CAR (58.0, 65.0, 4.0) 19 180 BUG END
	//SET_CAR_ROCKETPROOF  (  tank1   ,  ON  )
	//PUT_CAR_ON_TRAILER  ( platform1  ,  platform )

	tankbot0 = CREATE_CHAR_INSIDE_CAR ( tank0 ) 4 ARMY END
	//SET_CHAR_MAX_DRIVESPEED (  tankbot0  ,  0.01 ) //no effect
	SET_CHAR_TO_STAY_IN_CAR ( tankbot0 , ON )
	SET_CHAR_OBJECTIVE ( tankbot0 , ENTER_CAR_AS_DRIVER , tank0 )
	SET_CHAR_SHOOTING_SKILL ( tankbot0 , CRACK_SHOT )
	SET_CHAR_THREAT_SEARCH (tankbot0, AREA_PLAYER_ONLY)
	SET_CHAR_THREAT_REACTION (tankbot0, REACT_AS_NORMAL)
	//SET_CHAR_TO_USE_CAR_WEAPON ( tankbot0 , ON )
	//SET_FAVOURITE_MODEL ( tankbot0, TANK )

	//{ //tankbots
	tankbot1 = CREATE_CHAR_INSIDE_CAR ( tank1 ) 4 ARMY END
	SET_CHAR_TO_STAY_IN_CAR ( tankbot1 , ON )
	SET_CHAR_THREAT_SEARCH (tankbot1, AREA_PLAYER_ONLY)
	SET_CHAR_THREAT_REACTION (tankbot1, REACT_AS_NORMAL)
	SET_CHAR_TO_USE_CAR_WEAPON ( tankbot1 , ON )
	SET_FAVOURITE_MODEL ( tankbot1, TANK )

	tankbot2 = CREATE_CHAR_INSIDE_CAR ( tank2 ) 4 ARMY END
	SET_CHAR_TO_STAY_IN_CAR ( tankbot2 , ON )
	SET_CHAR_THREAT_SEARCH (tankbot2, AREA_PLAYER_ONLY)
	SET_CHAR_THREAT_REACTION (tankbot2, REACT_AS_NORMAL)
	SET_CHAR_TO_USE_CAR_WEAPON ( tankbot2 , ON )
	SET_FAVOURITE_MODEL ( tankbot2, TANK )

	tankbot3 = CREATE_CHAR_INSIDE_CAR ( tank3 ) 4 ARMY END
	SET_CHAR_TO_STAY_IN_CAR ( tankbot3 , ON )
	SET_CHAR_THREAT_SEARCH (tankbot3, AREA_PLAYER_ONLY)
	SET_CHAR_THREAT_REACTION (tankbot3, REACT_AS_NORMAL)
	SET_CHAR_TO_USE_CAR_WEAPON ( tankbot3 , ON )
	SET_FAVOURITE_MODEL ( tankbot3, TANK )

	tankbot4 = CREATE_CHAR_INSIDE_CAR ( tank4 ) 4 ARMY END
	SET_CHAR_TO_STAY_IN_CAR ( tankbot4 , ON )
	SET_CHAR_THREAT_SEARCH (tankbot4, AREA_PLAYER_ONLY)
	SET_CHAR_THREAT_REACTION (tankbot4, REACT_AS_NORMAL)
	SET_CHAR_TO_USE_CAR_WEAPON ( tankbot4 , ON )
	SET_FAVOURITE_MODEL ( tankbot4, TANK )

	tankbot5 = CREATE_CHAR_INSIDE_CAR ( tank5 ) 4 ARMY END
	SET_CHAR_TO_STAY_IN_CAR ( tankbot5 , ON )
	SET_CHAR_THREAT_SEARCH (tankbot5, AREA_PLAYER_ONLY)
	SET_CHAR_THREAT_REACTION (tankbot5, REACT_AS_NORMAL)
	SET_CHAR_TO_USE_CAR_WEAPON ( tankbot5 , ON )
	SET_FAVOURITE_MODEL ( tankbot5, TANK )

	tankbot6 = CREATE_CHAR_INSIDE_CAR ( tank6 ) 4 ARMY END
	SET_CHAR_TO_STAY_IN_CAR ( tankbot6 , ON )
	SET_CHAR_THREAT_SEARCH (tankbot6, AREA_PLAYER_ONLY)
	SET_CHAR_THREAT_REACTION (tankbot6, REACT_AS_NORMAL)
	SET_CHAR_TO_USE_CAR_WEAPON ( tankbot6 , ON )
	SET_FAVOURITE_MODEL ( tankbot6, TANK )

	//}

	IF (CHECK_CHARACTER_HEALTH(p1, 0))
		SET_CHAR_OBJECTIVE ( tankbot1 , KILL_CHAR_ANY_MEANS , p1 )
	ENDIF
	IF (CHECK_CHARACTER_HEALTH(p2, 0))
		SET_CHAR_OBJECTIVE ( tankbot2 , KILL_CHAR_ANY_MEANS , p2 )
	ENDIF
	IF (CHECK_CHARACTER_HEALTH(p3, 0))
		SET_CHAR_OBJECTIVE ( tankbot3 , KILL_CHAR_ANY_MEANS , p3 )
	ELSE
		SET_CHAR_OBJECTIVE ( tankbot3 , FIRE_AT_OBJECT_FROM_VEHICLE , arrow01 )
	ENDIF
	IF (CHECK_CHARACTER_HEALTH(p4, 0))
		SET_CHAR_OBJECTIVE ( tankbot4 , KILL_CHAR_ANY_MEANS , p4 )
	ELSE
		SET_CHAR_OBJECTIVE ( tankbot4 , FIRE_AT_OBJECT_FROM_VEHICLE , arrow05 )
	ENDIF
	IF (CHECK_CHARACTER_HEALTH(p5, 0))
		SET_CHAR_OBJECTIVE ( tankbot5 , KILL_CHAR_ANY_MEANS , p5 )
	ELSE
		SET_CHAR_OBJECTIVE ( tankbot5 , FIRE_AT_OBJECT_FROM_VEHICLE , arrow09 )
	ENDIF
	IF (CHECK_CHARACTER_HEALTH(p6, 0))
		SET_CHAR_OBJECTIVE ( tankbot6 , KILL_CHAR_ANY_MEANS , p6 )
	ELSE
		SET_CHAR_OBJECTIVE ( tankbot6 , FIRE_AT_OBJECT_FROM_VEHICLE , arrow13 )
	ENDIF

	CHANGE_CAR_LOCK ( tank0, LOCKED_PERMANENTLY )

	CHANGE_CAR_LOCK ( tank1, LOCKED_PERMANENTLY )
	CHANGE_CAR_LOCK ( tank2, LOCKED_PERMANENTLY )
	CHANGE_CAR_LOCK ( tank3, LOCKED_PERMANENTLY )
	CHANGE_CAR_LOCK ( tank4, LOCKED_PERMANENTLY )
	CHANGE_CAR_LOCK ( tank5, LOCKED_PERMANENTLY )
	CHANGE_CAR_LOCK ( tank6, LOCKED_PERMANENTLY )

	SET door_c = 1

return

jeep: //:

	MAKE_DOOR_MANUAL  ( door_1 )
	MAKE_DOOR_MANUAL  ( door_2 )

	OPEN_DOOR ( door_1 )
	OPEN_DOOR ( door_2 )

	DELETE_ITEM (tank0)
	tank0 = CREATE_CAR (58.0, 65.0, 4.0) 19 180 ISETTA MINI_CAR END
	SET_CAR_ROCKETPROOF  (  tank0   ,  ON  )
	SET_CAR_BULLETPROOF  (  tank0   ,  ON  )
	platform = CREATE_CAR (58.0, 65.0, 4.0) 19 180 ISETTA MINI_CAR END
	SET_CAR_ROCKETPROOF  (  platform   ,  ON  )
	SET_CAR_BULLETPROOF  (  platform   ,  ON  )
	PUT_CAR_ON_TRAILER  ( platform  ,  tank0 )

	//{ //turrets

	tank1 = CREATE_CAR (58.0, 65.0, 4.0) 19 180 GUNJEEP END
	SET_CAR_ROCKETPROOF  (  tank1   ,  ON  )
	SET_CAR_BULLETPROOF  (  tank1   ,  ON  )
	PUT_CAR_ON_TRAILER  ( tank1  ,  platform )

	tank2 = CREATE_CAR (58.0, 65.0, 4.0) 19 180 GUNJEEP END
	PUT_CAR_ON_TRAILER  ( tank2  ,  platform )
	SET_CAR_ROCKETPROOF  (  tank2   ,  ON  )
	SET_CAR_BULLETPROOF  (  tank2   ,  ON  )

	tank3 = CREATE_CAR (58.0, 65.0, 4.0) 19 180 GUNJEEP END
	PUT_CAR_ON_TRAILER  ( tank3  ,  platform )
	SET_CAR_ROCKETPROOF  (  tank3   ,  ON  )
	SET_CAR_BULLETPROOF  (  tank3   ,  ON  )
	tank4 = CREATE_CAR (58.0, 65.0, 4.0) 19 180 GUNJEEP END
	PUT_CAR_ON_TRAILER  ( tank4  ,  platform )
	SET_CAR_ROCKETPROOF  (  tank4   ,  ON  )
	SET_CAR_BULLETPROOF  (  tank4   ,  ON  )
	tank5 = CREATE_CAR (58.0, 65.0, 4.0) 19 180 GUNJEEP END
	PUT_CAR_ON_TRAILER  ( tank5  ,  platform )
	SET_CAR_ROCKETPROOF  (  tank5   ,  ON  )
	SET_CAR_BULLETPROOF  (  tank5   ,  ON  )
	tank6 = CREATE_CAR (58.0, 65.0, 4.0) 19 180 GUNJEEP END
	SET_CAR_ROCKETPROOF  (  tank6   ,  ON  )
	SET_CAR_BULLETPROOF  (  tank6   ,  ON  )
	PUT_CAR_ON_TRAILER  ( tank6  ,  platform )

	//}


	//platform1 = CREATE_CAR (58.0, 65.0, 4.0) 19 180 BUG END
	//SET_CAR_ROCKETPROOF  (  tank1   ,  ON  )
	//PUT_CAR_ON_TRAILER  ( platform1  ,  platform )

	tankbot0 = CREATE_CHAR_INSIDE_CAR ( tank0 ) 4 ARMY END
	//SET_CHAR_MAX_DRIVESPEED (  tankbot0  ,  0.01 ) //no effect
	SET_CHAR_TO_STAY_IN_CAR ( tankbot0 , ON )
	SET_CHAR_OBJECTIVE ( tankbot0 , ENTER_CAR_AS_DRIVER , tank0 )
	SET_CHAR_SHOOTING_SKILL ( tankbot0 , CRACK_SHOT )
	SET_CHAR_THREAT_SEARCH (tankbot0, AREA)
	SET_CHAR_THREAT_REACTION (tankbot0, REACT_AS_NORMAL)
	SET_CHAR_TO_USE_CAR_WEAPON ( tankbot0 , ON )
	SET_FAVOURITE_MODEL ( tankbot0, GUNJEEP )

	//{ //tankbots

	tankbot1 = CREATE_CHAR_INSIDE_CAR ( tank1 ) 4 ARMY END
	SET_CHAR_TO_STAY_IN_CAR ( tankbot1 , ON )
	SET_CHAR_THREAT_SEARCH (tankbot1, AREA_PLAYER_ONLY)
	SET_CHAR_THREAT_REACTION (tankbot1, REACT_AS_NORMAL)
	SET_CHAR_TO_USE_CAR_WEAPON ( tankbot1 , ON )
	SET_FAVOURITE_MODEL ( tankbot1, GUNJEEP )

	tankbot2 = CREATE_CHAR_INSIDE_CAR ( tank2 ) 4 ARMY END
	SET_CHAR_TO_STAY_IN_CAR ( tankbot2 , ON )
	SET_CHAR_THREAT_SEARCH (tankbot2, AREA_PLAYER_ONLY)
	SET_CHAR_THREAT_REACTION (tankbot2, REACT_AS_NORMAL)
	SET_CHAR_TO_USE_CAR_WEAPON ( tankbot2 , ON )
	SET_FAVOURITE_MODEL ( tankbot2, GUNJEEP )

	tankbot3 = CREATE_CHAR_INSIDE_CAR ( tank3 ) 4 ARMY END
	SET_CHAR_TO_STAY_IN_CAR ( tankbot3 , ON )
	SET_CHAR_THREAT_SEARCH (tankbot3, AREA_PLAYER_ONLY)
	SET_CHAR_THREAT_REACTION (tankbot3, REACT_AS_NORMAL)
	SET_CHAR_TO_USE_CAR_WEAPON ( tankbot3 , ON )
	SET_FAVOURITE_MODEL ( tankbot3, GUNJEEP )

	tankbot4 = CREATE_CHAR_INSIDE_CAR ( tank4 ) 4 ARMY END
	SET_CHAR_TO_STAY_IN_CAR ( tankbot4 , ON )
	SET_CHAR_THREAT_SEARCH (tankbot4, AREA_PLAYER_ONLY)
	SET_CHAR_THREAT_REACTION (tankbot4, REACT_AS_NORMAL)
	SET_CHAR_TO_USE_CAR_WEAPON ( tankbot4 , ON )
	SET_FAVOURITE_MODEL ( tankbot4, GUNJEEP )

	tankbot5 = CREATE_CHAR_INSIDE_CAR ( tank5 ) 4 ARMY END
	SET_CHAR_TO_STAY_IN_CAR ( tankbot5 , ON )
	SET_CHAR_THREAT_SEARCH (tankbot5, AREA_PLAYER_ONLY)
	SET_CHAR_THREAT_REACTION (tankbot5, REACT_AS_NORMAL)
	SET_CHAR_TO_USE_CAR_WEAPON ( tankbot5 , ON )
	SET_FAVOURITE_MODEL ( tankbot5, GUNJEEP )

	tankbot6 = CREATE_CHAR_INSIDE_CAR ( tank6 ) 4 ARMY END
	SET_CHAR_TO_STAY_IN_CAR ( tankbot6 , ON )
	SET_CHAR_THREAT_SEARCH (tankbot6, AREA_PLAYER_ONLY)
	SET_CHAR_THREAT_REACTION (tankbot6, REACT_AS_NORMAL)
	SET_CHAR_TO_USE_CAR_WEAPON ( tankbot6 , ON )
	SET_FAVOURITE_MODEL ( tankbot6, GUNJEEP )

	//}

	/*
	IF (CHECK_CHARACTER_HEALTH(p1, 0))
		SET_CHAR_OBJECTIVE ( tankbot0 , KILL_CHAR_ANY_MEANS , p1 )
	ENDIF
	*/

	/*
	SET_CHAR_OBJECTIVE ( tankbot1 , FIRE_AT_OBJECT_FROM_VEHICLE , target7 )
	SET_CHAR_OBJECTIVE ( tankbot2 , FIRE_AT_OBJECT_FROM_VEHICLE , target8 )
	SET_CHAR_OBJECTIVE ( tankbot3 , FIRE_AT_OBJECT_FROM_VEHICLE , arrow01 )
	SET_CHAR_OBJECTIVE ( tankbot4 , FIRE_AT_OBJECT_FROM_VEHICLE , arrow05 )
	SET_CHAR_OBJECTIVE ( tankbot5 , FIRE_AT_OBJECT_FROM_VEHICLE , arrow09 )
	SET_CHAR_OBJECTIVE ( tankbot6 , FIRE_AT_OBJECT_FROM_VEHICLE , arrow13 )
	*/

	targetbot1 = CREATE_CHAR (55.5, 62.5, 3.0) 4 180 CRIMINAL_TYPE1 END
	//SET_CHAR_THREAT_REACTION (targetbot1, REACT_AS_NORMAL)
	targetbot2 = CREATE_CHAR (55.5, 56.5, 3.0) 4 180 CRIMINAL_TYPE1 END
	targetbot3 = CREATE_CHAR (60.5, 56.5, 3.0) 4 180 CRIMINAL_TYPE1 END
	targetbot4 = CREATE_CHAR (60.5, 62.5, 3.0) 4 180 CRIMINAL_TYPE1 END
	targetbot5 = CREATE_CHAR (55.5, 59.5, 3.0) 4 180 CRIMINAL_TYPE1 END
	targetbot6 = CREATE_CHAR (60.5, 59.5, 3.0) 4 180 CRIMINAL_TYPE1 END

	//GIVE_WEAPON(targetbot1, FLAME_THROWER  )
	//SET_CHAR_OBJECTIVE ( targetbot1 , KILL_CHAR_ANY_MEANS , targetbot1 )
	SET_CHAR_OBJECTIVE ( tankbot0 , KILL_CHAR_ANY_MEANS , targetbot1 )

	SET_CHAR_OBJECTIVE ( tankbot1 , KILL_CHAR_ANY_MEANS , targetbot1 )
	SET_CHAR_OBJECTIVE ( tankbot2 , KILL_CHAR_ANY_MEANS , targetbot2 )
	SET_CHAR_OBJECTIVE ( tankbot3 , KILL_CHAR_ANY_MEANS , targetbot3 )
	SET_CHAR_OBJECTIVE ( tankbot4 , KILL_CHAR_ANY_MEANS , targetbot4 )
	SET_CHAR_OBJECTIVE ( tankbot5 , KILL_CHAR_ANY_MEANS , targetbot5 )
	SET_CHAR_OBJECTIVE ( tankbot6 , KILL_CHAR_ANY_MEANS , targetbot6 )


	CHANGE_CAR_LOCK ( tank0, LOCKED_PERMANENTLY )


	CHANGE_CAR_LOCK ( tank1, LOCKED_PERMANENTLY )
	CHANGE_CAR_LOCK ( tank2, LOCKED_PERMANENTLY )
	CHANGE_CAR_LOCK ( tank3, LOCKED_PERMANENTLY )
	CHANGE_CAR_LOCK ( tank4, LOCKED_PERMANENTLY )
	CHANGE_CAR_LOCK ( tank5, LOCKED_PERMANENTLY )
	CHANGE_CAR_LOCK ( tank6, LOCKED_PERMANENTLY )


	SET door_c = 1

return

p1_loose: //:
	SET p1_noraceon=0
	SET_ALL_CONTROLS_STATUS  (  p1  , ON  )
	ADD_SCORE(p1, -100000)
	SET p1_jammedacc = 2000
	SET p1_bomb = 0
	SET p1_remote_ammo = 0
	SET p1_canontop = 0
	SET p1_tmr_remote = 0
	SET p1_jobfailed=0
	IF (p1_lives = 0)
		SET msg_over=100
	ENDIF
	IF (p1_lives >= 0)
		SET p1_lives = (p1_lives - 1)
	ENDIF
	SET p1_noloose = 0
return

p2_loose: //:
	SET_ALL_CONTROLS_STATUS  (  p2  , ON  )
	ADD_SCORE(p2, -100000)
	SET p2_jammedacc = 2000
	SET p2_bomb = 0
	SET p2_remote_ammo = 0
	SET p2_canontop = 0
	SET p2_tmr_remote = 0
	SET p2_noraceon=0
	SET p2_jobfailed=0
	IF (p2_lives = 0)
		SET msg_over=100
	ENDIF
	IF (p2_lives >= 0)
		SET p2_lives = (p2_lives - 1)
	ENDIF
	SET p2_noloose = 0
return

p3_loose: //:
	SET_ALL_CONTROLS_STATUS  (  p3  , ON  )
	ADD_SCORE(p3, -100000)
	SET p3_jammedacc = 2000
	SET p3_bomb = 0
	SET p3_remote_ammo = 0
	SET p3_canontop = 0
	SET p3_tmr_remote = 0
	SET p3_noraceon=0
	SET p3_jobfailed=0
	IF (p3_lives = 0)
		SET msg_over=100
	ENDIF
	IF (p3_lives >= 0)
		SET p3_lives = (p3_lives - 1)
	ENDIF
	SET p3_noloose = 0
return

p4_loose: //:
	SET_ALL_CONTROLS_STATUS  (  p4  , ON  )
	ADD_SCORE(p4, -100000)
	SET p4_jammedacc = 2000
	SET p4_bomb = 0
	SET p4_remote_ammo = 0
	SET p4_canontop = 0
	SET p4_tmr_remote = 0
	SET p4_noraceon=0
	SET p4_jobfailed=0
	IF (p4_lives = 0)
		SET msg_over=100
	ENDIF
	IF (p4_lives >= 0)
		SET p4_lives = (p4_lives - 1)
	ENDIF
	SET p4_noloose = 0
return

p5_loose: //:
	SET_ALL_CONTROLS_STATUS  (  p5  , ON  )
	ADD_SCORE(p5, -100000)
	SET p5_jammedacc = 2000
	SET p5_bomb = 0
	SET p5_remote_ammo = 0
	SET p5_canontop = 0
	SET p5_tmr_remote = 0
	SET p5_noraceon=0
	SET p5_jobfailed=0
	IF (p5_lives = 0)
		SET msg_over=100
	ENDIF
	IF (p5_lives >= 0)
		SET p5_lives = (p5_lives - 1)
	ENDIF
	SET p5_noloose = 0
return

p6_loose: //:
	SET_ALL_CONTROLS_STATUS  (  p6  , ON  )
	ADD_SCORE(p6, -100000)
	SET p6_jammedacc = 2000
	SET p6_bomb = 0
	SET p6_remote_ammo = 0
	SET p6_canontop = 0
	SET p6_tmr_remote = 0
	SET p6_noraceon=0
	SET p6_jobfailed=0
	IF (p6_lives = 0)
		SET msg_over=100
	ENDIF
	IF (p6_lives >= 0)
		SET p6_lives = (p6_lives - 1)
	ENDIF
	SET p6_noloose = 0
return

//}

//{ //SNIPPETS
	//{ //slowdown (not working)
	/*
	IF (p1_slowdown=1) //slow down car
		SET_CHAR_MAX_DRIVESPEED (  p1  ,  0.01 )
	ELSE
		SET_CHAR_MAX_DRIVESPEED (  p1  ,  1.0 )
	ENDIF
    */
	//}

	//{ //horn test (not working) from exec loop
/*
SET c_horn = (c_horn + 1)

IF ( c_horn > 100 )
	SET p_horn = 1
	WHILE_EXEC( p_horn = 1 )
		horn = CREATE_SOUND (55.5 , 66.5 , 5.0 ) PRISON_ALARM PLAY_INSTANT END
		SET p_horn = 0
	ENDWHILE
	SET c_horn = 0
ENDIF
*/
//}

	//{ //horn test (not working)
/*
WHILE ( loop = 1 )

	WHILE_EXEC ( loop = 1 )
		IF (p_horn=1)
			horn = CREATE_SOUND (56.5, 69.0, 5.0) PRISON_ALARM PLAY_INSTANT END
			SET p_horn = 0
		ENDIF
	ENDWHILE
	WHILE_EXEC ( loop = 1 )
		horn = CREATE_SOUND (56.5, 69.0, 5.0) INDUSTRIAL_HIGH PLAY_INSTANT END
	ENDWHILE
ENDWHILE
*/
//}

//}
