//minitest = CREATE_CAR ( 217.5 , 210.5 , 255.0 ) 3 0 STRATOS MINI_CAR END 

// objects

// burger 1 tables and benches
OBJ_DATA bbench1 = ( 24.8 , 64.7, 3.0 ) 45  bench
OBJ_DATA bbench2 = ( 25.5 , 64.7, 3.0 ) 315 bench
OBJ_DATA bbench3 = ( 24.8 , 65.3, 3.0 ) 135 bench
OBJ_DATA bbench4 = ( 25.4 , 65.4, 3.0 ) 225 bench
OBJ_DATA btable1 = ( 25.1 , 65.0, 3.0 ) 0   HYDRANT

OBJ_DATA bbench01 = ( 24.8 , 68.7, 3.0 ) 45  bench
OBJ_DATA bbench02 = ( 25.5 , 68.7, 3.0 ) 315 bench
OBJ_DATA bbench03 = ( 24.8 , 69.3, 3.0 ) 135 bench
OBJ_DATA bbench04 = ( 25.4 , 69.4, 3.0 ) 225 bench
OBJ_DATA btable2 =  ( 25.1,  69.0, 3.0 ) 0   HYDRANT

OBJ_DATA bbbench1 = ( 23.8 , 64.7, 3.0 ) 45  bench
OBJ_DATA bbbench2 = ( 24.5 , 64.7, 3.0 ) 315 bench
OBJ_DATA bbbench3 = ( 23.8 , 65.3, 3.0 ) 135 bench
OBJ_DATA bbbench4 = ( 24.4 , 65.4, 3.0 ) 225 bench
OBJ_DATA bbtable1 = ( 24.1 , 65.0, 3.0 ) 0   HYDRANT

OBJ_DATA bbbench01 = ( 23.8 , 68.7, 3.0 ) 45  bench
OBJ_DATA bbbench02 = ( 24.5 , 68.7, 3.0 ) 315 bench
OBJ_DATA bbbench03 = ( 23.8 , 69.3, 3.0 ) 135 bench
OBJ_DATA bbbench04 = ( 24.4 , 69.4, 3.0 ) 225 bench
OBJ_DATA bbtable2 =  ( 24.1,  69.0, 3.0 ) 0   HYDRANT


// hospital benches
OBJ_DATA bench1 = ( 36.2 , 244.7, 2.0 ) 90 bench
OBJ_DATA bench2 = ( 36.2 , 244.3, 2.0 ) 90 bench
OBJ_DATA bench3 = ( 36.2 , 243.7, 2.0 ) 90 bench
OBJ_DATA bench4 = ( 36.2 , 243.3, 2.0 ) 90 bench
OBJ_DATA bench5 = ( 36.2 , 242.7, 2.0 ) 90 bench
OBJ_DATA bench7 = ( 36.2 , 242.3, 2.0 ) 90 bench

// police station benches
OBJ_DATA bencha1 = ( 9.7 , 192.2, 3.0 ) 0 bench
OBJ_DATA bencha2 = ( 9.3 , 192.2, 3.0 ) 0 bench
OBJ_DATA bencha3 = ( 10.7 , 192.2, 3.0 ) 0 bench
OBJ_DATA bencha4 = ( 10.3 , 192.2, 3.0 ) 0 bench

OBJ_DATA bencha5 = ( 9.7 , 193.8, 3.0 ) 180 bench
OBJ_DATA bencha7 = ( 9.3 , 193.8, 3.0 ) 180 bench
OBJ_DATA bencha8 = ( 10.7 , 193.8, 3.0 ) 180 bench
OBJ_DATA bencha9 = ( 10.3 , 193.8, 3.0 ) 180 bench

/*partblocksbegin*/

// until mispad can't create code to make special blocks collidable using objects
// they are coded here, this method works excellent, and makes partial blocks more 
// useful every day. there is only one glitch about them.. you can't throw things above / over them.

// left side of weaponreload
OBJ_DATA t000 = ( 89.8, 39.2, 3.0 ) 180 tower
OBJ_DATA t001 = ( 89.8, 39.5, 3.0 ) 180 tower
OBJ_DATA t002 = ( 89.8, 39.8, 3.0 ) 180 tower

OBJ_DATA t010 = ( 89.8, 40.2, 3.0 ) 180 tower
OBJ_DATA t011 = ( 89.8, 40.5, 3.0 ) 180 tower
OBJ_DATA t012 = ( 89.8, 40.8, 3.0 ) 180 tower

OBJ_DATA t020 = ( 89.8, 41.2, 3.0 ) 180 tower
OBJ_DATA t021 = ( 89.8, 41.5, 3.0 ) 180 tower
OBJ_DATA t022 = ( 89.8, 41.8, 3.0 ) 180 tower

OBJ_DATA t030 = ( 89.8, 42.2, 3.0 ) 180 tower
OBJ_DATA t031 = ( 89.8, 42.5, 3.0 ) 180 tower
OBJ_DATA t032 = ( 89.8, 42.8, 3.0 ) 180 tower

// right side
OBJ_DATA t100 = ( 96.2, 39.2, 3.0 ) 180 tower
OBJ_DATA t101 = ( 96.2, 39.5, 3.0 ) 180 tower
OBJ_DATA t102 = ( 96.2, 39.8, 3.0 ) 180 tower

OBJ_DATA t110 = ( 96.2, 40.2, 3.0 ) 180 tower
OBJ_DATA t111 = ( 96.2, 40.5, 3.0 ) 180 tower
OBJ_DATA t112 = ( 96.2, 40.8, 3.0 ) 180 tower

OBJ_DATA t120 = ( 96.2, 41.2, 3.0 ) 180 tower
OBJ_DATA t121 = ( 96.2, 41.5, 3.0 ) 180 tower
OBJ_DATA t122 = ( 96.2, 41.8, 3.0 ) 180 tower

OBJ_DATA t130 = ( 96.2, 42.2, 3.0 ) 180 tower
OBJ_DATA t131 = ( 96.2, 42.5, 3.0 ) 180 tower
OBJ_DATA t132 = ( 96.2, 42.8, 3.0 ) 180 tower

// north wall

OBJ_DATA tz00 = ( 90.2, 39.2, 3.0 ) 180 tower
OBJ_DATA tz01 = ( 90.5, 39.2, 3.0 ) 180 tower
OBJ_DATA tz02 = ( 90.8, 39.2, 3.0 ) 180 tower

OBJ_DATA tz10 = ( 91.2, 39.2, 3.0 ) 180 tower
OBJ_DATA tz11 = ( 91.5, 39.2, 3.0 ) 180 tower
OBJ_DATA tz12 = ( 91.8, 39.2, 3.0 ) 180 tower

OBJ_DATA tz20 = ( 94.2, 39.2, 3.0 ) 180 tower
OBJ_DATA tz21 = ( 94.5, 39.2, 3.0 ) 180 tower
OBJ_DATA tz22 = ( 94.8, 39.2, 3.0 ) 180 tower

OBJ_DATA tz30 = ( 95.2, 39.2, 3.0 ) 180 tower
OBJ_DATA tz31 = ( 95.5, 39.2, 3.0 ) 180 tower
OBJ_DATA tz32 = ( 95.8, 39.2, 3.0 ) 180 tower

// south wall

OBJ_DATA ta00 = ( 90.2, 42.8, 3.0 ) 180 tower
OBJ_DATA ta01 = ( 90.5, 42.8, 3.0 ) 180 tower
OBJ_DATA ta02 = ( 90.8, 42.8, 3.0 ) 180 tower

OBJ_DATA ta10 = ( 91.2, 42.8, 3.0 ) 180 tower
OBJ_DATA ta11 = ( 91.5, 42.8, 3.0 ) 180 tower
OBJ_DATA ta12 = ( 91.8, 42.8, 3.0 ) 180 tower

OBJ_DATA ta20 = ( 92.2, 42.8, 3.0 ) 180 tower
OBJ_DATA ta21 = ( 92.5, 42.8, 3.0 ) 180 tower
OBJ_DATA ta22 = ( 92.8, 42.8, 3.0 ) 180 tower

OBJ_DATA ta30 = ( 93.2, 42.8, 3.0 ) 180 tower
OBJ_DATA ta31 = ( 93.5, 42.8, 3.0 ) 180 tower
OBJ_DATA ta32 = ( 93.8, 42.8, 3.0 ) 180 tower

OBJ_DATA ta40 = ( 94.2, 42.8, 3.0 ) 180 tower
OBJ_DATA ta41 = ( 94.5, 42.8, 3.0 ) 180 tower
OBJ_DATA ta42 = ( 94.8, 42.8, 3.0 ) 180 tower

OBJ_DATA ta50 = ( 95.2, 42.8, 3.0 ) 180 tower
OBJ_DATA ta51 = ( 95.5, 42.8, 3.0 ) 180 tower
OBJ_DATA ta52 = ( 95.8, 42.8, 3.0 ) 180 tower


/*partblocksend*/

// declare zones

MAP_ZONE m00 = ( 
550 , 250 , 250 , 250 , 
200 , 50 , 150 , 
200 , 50 , 100 , 0)

// player's normal start position
PLAYER_PED player = (55.9, 80.5, 2.0) 25 0
//PARKED_CAR_DATA player_car = (55.5, 80.5) 0 0 tvvan
PARKED_CAR_DATA player_car = (55.5, 81.5) 0 0 zcx5

// test stuff..
//OBJ_DATA theball = (55.5, 80.5, 2.0) 0 footy
PARKED_CAR_DATA robot1 = (58.5, 80.5) 0 0 GUNJEEP

PARKED_CAR_DATA trktanker = (57.5, 79.0) 0 0 trukcont
PARKED_CAR_DATA trkjuggernaut2 = (57.5, 80.8) 0 0 krsnabus

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

// on mission flags
SAVED_COUNTER flag_on_mission = 0 
DECLARE_MISSION_FLAG ( player , flag_on_mission )

// animated cars
CAR_DATA animcontrol

DECLARE_POLICELEVEL (5) // until robots get ready ;)

//COUNTER carspeed
COUNTER cardamage
COUNTER carmax

//ONSCREEN_COUNTER speed
ONSCREEN_COUNTER damage

// ship loading / unloading crane system

CRANE_DATA boatload = ( 115.5 , 55.5 ) 180 NO_HOMECRANE FIRST ( 116.5 , 56.5 ) 0
CRANE_DATA boatunload = ( 127.5 , 53.5 ) 180 NO_HOMECRANE FIRST ( 130.5 , 53.5 ) 0

// track conveyors that move cars to other crane
CONVEYOR convtoshiptrack1  =  ( 117.5 , 56.5)  ( 5.5 , 0.5 ) 1 0
CONVEYOR convfromshiptrack1  =  ( 117.5 , 57.5)  ( 8.0 , 0.5 ) -1 0

CONVEYOR convtoshiptrack2  =  ( 120.5 , 53.7)  ( 0.5 , 6.0 ) 0 -1
CONVEYOR convfromshiptrack2  =  ( 121.5 , 55.0)  ( 0.5 , 5.5 ) 0 1

CONVEYOR convtoshiptrack3  =  ( 123.0 , 51.5)  ( 5.0 , 0.5 ) 1 0
CONVEYOR convfromshiptrack3  =  ( 123.7 , 52.5)  ( 4.0 , 0.5 ) -1 0

// boatyard destructor
DESTRUCTOR boatyarddestructor = ( 112.0 , 57.0 , 3.0)  ( 2.0 , 2.0 )

// construction site things
CRANE_DATA crane_2 = (92.5, 56.5) 105 NO_HOMECRANE
PARKED_CAR_DATA trailer_crane_2 = (95.5, 57.5) 0 0 TRUKTRNS

// shops
OBJ_DATA spray = (106.5, 35.5, 2.0) 0 car_shop 0
OBJ_DATA bombshop = (110.5,40.5,2.0) 0 car_shop bomb_shop
OBJ_DATA guns = (110.5, 37.5, 2.0) 0 car_shop MACHINEGUN_SHOP
OBJ_DATA mines = (102.5, 40.5, 2.0) 0 car_shop MINES_SHOP
OBJ_DATA oil = (102.5, 37.5, 2.0) 0 car_shop OILSLICK_SHOP


// doors
// they have one single glitch - if something explodes near them
// they are blown too and game crashes! (unless their anti-strength is set to 0)

// hospital

PARKED_CAR_DATA hospitalfrontdoor = (52.0, 101.5, 2.0) 0 0 TOWTRUCK
PARKED_CAR_DATA hospitalfrontdoorreturn = (39.0, 244.5, 2.0) 0 0 TOWTRUCK

PARKED_CAR_DATA hospitalbackdoor1 = (51.5, 90.5, 3.0) 0 0 TOWTRUCK
PARKED_CAR_DATA hospitalbackdoorreturn1 = (38.5, 235.5, 3.0) 0 0 TOWTRUCK

// bunker

PARKED_CAR_DATA keithbunkerfront = (104.5, 69.0, 1.3) 0 0 TOWTRUCK
PARKED_CAR_DATA keithbunkerfrontreturn = (93.5, 213.0, 1.0) 0 0 TOWTRUCK

// euro ncap
PARKED_CAR_DATA eurocnapfront = (53.5, 80.0, 2.0) 0 0 TOWTRUCK
PARKED_CAR_DATA eurocnapfrontreturn = (38.5, 223.5, 3.0) 0 0 TOWTRUCK

PARKED_CAR_DATA eurocnapback = (38.5, 227.5, 3.0) 0 0 TOWTRUCK
PARKED_CAR_DATA eurocnapbackreturn = (51.5, 84.5, 3.0) 0 0 TOWTRUCK

// local control
PARKED_CAR_DATA lcfront = (31.5, 54.0, 3.0) 0 0 TOWTRUCK
PARKED_CAR_DATA lcfrontreturn = (19.5, 198.0, 3.0) 0 0 TOWTRUCK

PARKED_CAR_DATA lcback = (35.5, 55.0, 3.0) 0 0 TOWTRUCK
PARKED_CAR_DATA lcbackreturn = (21.5, 199.0, 3.0) 0 0 TOWTRUCK

// police station
PARKED_CAR_DATA pdfront = (24.5, 49.0, 3.0) 0 0 TOWTRUCK
PARKED_CAR_DATA pdfrontreturn = (10.5, 193.0, 3.0) 0 0 TOWTRUCK

PARKED_CAR_DATA pdback = (20.5, 49.0, 3.0) 0 0 TOWTRUCK
PARKED_CAR_DATA pdbackreturn = (8.5, 193.0, 3.0) 0 0 TOWTRUCK

// powerups

GENERATOR powerup_0 = ( 52.5 , 101.5 ) 0 COLLECT_00 100 200 80
GENERATOR powerup_1351D30 = ( 59.5 , 98.5 ) 0 COLLECT_03 100 200 70
GENERATOR powerup_1E648C7 = ( 69.5 , 106.5 ) 0 COLLECT_01 100 200 30
GENERATOR powerup_28986D0 = ( 73.5 , 101.5 ) 0 COLLECT_00 100 200 30
GENERATOR powerup_6BAE25 = ( 81.5 , 98.5 ) 0 COLLECT_10 100 200 20
GENERATOR powerup_1BF88F9 = ( 33.5 , 68.5 ) 0 COLLECT_15 100 200 30
GENERATOR powerup_49E0B79 = ( 18.5 , 48.5 ) 0 COLLECT_03 100 200 70
GENERATOR powerup_5081A48 = ( 19.5 , 48.5 ) 0 COLLECT_08 100 200 30
GENERATOR powerup_F825B9 = ( 18.5 , 66.5 ) 0 COLLECT_03 100 200 30
GENERATOR powerup_1785D14 = ( 18.5 , 67.5 ) 0 COLLECT_10 100 200 30
GENERATOR powerup_2DF1DF7 = ( 112.5 , 64.5 ) 0 COLLECT_01 100 200 80
GENERATOR powerup_1B6604C = ( 89.5 , 66.5 ) 0 COLLECT_09 100 200 80
GENERATOR powerup_2EF89BE = ( 83.5 , 63.5 ) 0 COLLECT_10 100 200 80
GENERATOR powerup_1EF879 = ( 73.5 , 73.5 ) 0 COLLECT_01 100 200 20
GENERATOR powerup_2FC2C08 = ( 76.5 , 71.5 ) 0 COLLECT_00 100 200 70

GENERATOR powerup_10 = ( 53.5 , 81.5 ) 0 COLLECT_01 100 200 70
GENERATOR powerup_11351D30 = ( 90.5 , 78.5 ) 0 COLLECT_02 100 200 80
GENERATOR powerup_11E648C7 = ( 84.5 , 64.5 ) 0 COLLECT_03 100 200 30
GENERATOR powerup_128986D0 = ( 106.5 , 68.5 ) 0 COLLECT_04 100 200 70
GENERATOR powerup_16BAE25 = ( 109.5 , 47.5 ) 0 COLLECT_34 100 200 30
GENERATOR powerup_11BF88F9 = ( 111.5 , 47.5 ) 0 COLLECT_08 100 200 20
GENERATOR powerup_149E0B79 = ( 114.5 , 47.5 ) 0 COLLECT_06 100 200 70
GENERATOR powerup_15081A48 = ( 107.5 , 47.5 ) 0 COLLECT_36 100 200 80
GENERATOR powerup_1F825B9 = ( 104.5 , 50.5 ) 0 COLLECT_03 100 200 80
GENERATOR powerup_11785D14 = ( 110.5 , 48.5, 2.0 ) 0 COLLECT_40 100 200 99
GENERATOR powerup_12DF1DF7 = ( 107.5 , 37.5 ) 0 COLLECT_05 100 200 20
GENERATOR powerup_11B6604C = ( 105.5 , 33.5 ) 0 COLLECT_08 100 200 20
GENERATOR powerup_12EF89BE = ( 76.5 , 31.5 ) 0 COLLECT_02 100 200 70
GENERATOR powerup_11EF879 = ( 71.5 , 22.5 ) 0 COLLECT_08 100 200 80
GENERATOR powerup_12FC2C08 = ( 93.5 , 41.5 ) 0 COLLECT_09 100 200 80
GENERATOR powerup_1EB923 =   ( 109.5 , 57.5 ) 0 COLLECT_34 100 200 30
GENERATOR powerup_1497AC24 = ( 122.5 , 47.5 ) 0 COLLECT_02 100 200 30
GENERATOR powerup_113A6081 = ( 122.5 , 49.5 ) 0 COLLECT_03 100 200 10

GENERATOR powerup_113A6081a = ( 41.0 , 80.0 ) 0 COLLECT_35 100 200 10

// boat
GENERATOR powerup_15B1E918 = ( 129.5 , 67.5 , 3.0 ) 0 COLLECT_04 100 200 80
GENERATOR powerup_1173FAC1 = ( 129.5 , 66.5 , 3.0 ) 0 COLLECT_05 100 200 70
GENERATOR powerup_1B9BB0 =   ( 129.5 , 68.5 , 3.0 ) 0 COLLECT_09 100 200 10
GENERATOR powerup_1830EEB =  ( 130.5 , 66.5 , 3.0 ) 0 COLLECT_08 100 200 30
GENERATOR powerup_154157BD = ( 130.5 , 67.5 , 3.0 ) 0 COLLECT_02 100 200 70
GENERATOR powerup_15AE7504 = ( 130.5 , 68.5 , 3.0 ) 0 COLLECT_08 100 200 80

// hospirtal
GENERATOR powerup_1830EEBa =  ( 38.7 , 241.7) 0 COLLECT_03 100 200 30

// on top of hospital powerups
GENERATOR powerup_1830EEBb =  ( 49.5 , 100.5) 0 COLLECT_39 100 200 30
GENERATOR powerup_1830EEBc =  ( 50.5 , 100.5) 0 COLLECT_31 100 200 30


// spark loop cycling indicator
OBJ_DATA effect1

//////////////////////////////////////////////////////////////////////
//                                                                  //
// main script starts here                                          //
//                                                                  //
//////////////////////////////////////////////////////////////////////

//FORWARD savepoint_1:
//FORWARD soccertest:

LEVELSTART 

SET_DIR_OF_TV_VANS ( 80.0 , 80.0 )

//RADIO_STATION industrial = STATION_INDUSTRIAL  ( 200.0 , 200.0 ) 
RADIO_STATION residential = STATION_RESIDENTIAL ( 200.0 , 200.0 ) 
//RADIO_STATION downtown = STATION_DOWNTOWN    ( 200.0 , 200.0 ) 

// turn on the powerups
SWITCH_GENERATOR ( powerup_0 , ON )
SWITCH_GENERATOR ( powerup_1351D30 , ON )
SWITCH_GENERATOR ( powerup_1E648C7 , ON )
SWITCH_GENERATOR ( powerup_28986D0 , ON )
SWITCH_GENERATOR ( powerup_6BAE25 , ON )
SWITCH_GENERATOR ( powerup_1BF88F9 , ON )
SWITCH_GENERATOR ( powerup_49E0B79 , ON )
SWITCH_GENERATOR ( powerup_5081A48 , ON )
SWITCH_GENERATOR ( powerup_F825B9 , ON )
SWITCH_GENERATOR ( powerup_1785D14 , ON )
SWITCH_GENERATOR ( powerup_2DF1DF7 , ON )
SWITCH_GENERATOR ( powerup_1B6604C , ON )
SWITCH_GENERATOR ( powerup_2EF89BE , ON )
SWITCH_GENERATOR ( powerup_1EF879 , ON )

SWITCH_GENERATOR ( powerup_10 , ON )
SWITCH_GENERATOR ( powerup_11351D30 , ON )
SWITCH_GENERATOR ( powerup_11E648C7 , ON )
SWITCH_GENERATOR ( powerup_128986D0 , ON )
SWITCH_GENERATOR ( powerup_16BAE25 , ON )
SWITCH_GENERATOR ( powerup_11BF88F9 , ON )
SWITCH_GENERATOR ( powerup_149E0B79 , ON )
SWITCH_GENERATOR ( powerup_15081A48 , ON )
SWITCH_GENERATOR ( powerup_1F825B9 , ON )
SWITCH_GENERATOR ( powerup_11785D14 , ON )
SWITCH_GENERATOR ( powerup_12DF1DF7 , ON )
SWITCH_GENERATOR ( powerup_11B6604C , ON )
SWITCH_GENERATOR ( powerup_12EF89BE , ON )
SWITCH_GENERATOR ( powerup_11EF879 , ON )
SWITCH_GENERATOR ( powerup_12FC2C08 , ON )
SWITCH_GENERATOR ( powerup_1EB923 , ON )
SWITCH_GENERATOR ( powerup_1497AC24 , ON )
SWITCH_GENERATOR ( powerup_113A6081 , ON )
SWITCH_GENERATOR ( powerup_15B1E918 , ON )
SWITCH_GENERATOR ( powerup_1173FAC1 , ON )
SWITCH_GENERATOR ( powerup_1830EEB , ON )
SWITCH_GENERATOR ( powerup_154157BD , ON )
SWITCH_GENERATOR ( powerup_15AE7504 , ON )
SWITCH_GENERATOR ( powerup_1B9BB0 , ON )

SWITCH_GENERATOR ( powerup_113A6081a , ON )
SWITCH_GENERATOR ( powerup_1830EEBa , ON )
SWITCH_GENERATOR ( powerup_1830EEBb , ON )
SWITCH_GENERATOR ( powerup_1830EEBc , ON )

// set doors non-collidable and resistant to all kind of stuff
SET_CAR_NO_COLLIDE ( hospitalfrontdoor ) 
SET_CAR_NO_COLLIDE ( hospitalfrontdoorreturn ) 
SET_CAR_NO_COLLIDE ( hospitalbackdoor1 ) 
SET_CAR_NO_COLLIDE ( hospitalbackdoorreturn1 ) 
SET_CAR_NO_COLLIDE ( keithbunkerfront ) 
SET_CAR_NO_COLLIDE ( keithbunkerfrontreturn ) 
SET_CAR_NO_COLLIDE ( eurocnapfront ) 
SET_CAR_NO_COLLIDE ( eurocnapfrontreturn ) 
SET_CAR_NO_COLLIDE ( eurocnapback ) 
SET_CAR_NO_COLLIDE ( eurocnapbackreturn ) 
SET_CAR_NO_COLLIDE ( lcfront ) 
SET_CAR_NO_COLLIDE ( lcfrontreturn ) 
SET_CAR_NO_COLLIDE ( lcback ) 
SET_CAR_NO_COLLIDE ( lcbackreturn ) 
SET_CAR_NO_COLLIDE ( pdfront ) 
SET_CAR_NO_COLLIDE ( pdfrontreturn ) 
SET_CAR_NO_COLLIDE ( pdback ) 
SET_CAR_NO_COLLIDE ( pdbackreturn ) 

SET_CAR_ROCKETPROOF ( hospitalfrontdoor , ON ) 
SET_CAR_ROCKETPROOF ( hospitalfrontdoorreturn , ON ) 
SET_CAR_ROCKETPROOF ( hospitalbackdoor1 , ON ) 
SET_CAR_ROCKETPROOF ( hospitalbackdoorreturn1 , ON ) 
SET_CAR_ROCKETPROOF ( keithbunkerfront , ON ) 
SET_CAR_ROCKETPROOF ( keithbunkerfrontreturn , ON ) 
SET_CAR_ROCKETPROOF ( eurocnapfront , ON ) 
SET_CAR_ROCKETPROOF ( eurocnapfrontreturn , ON ) 
SET_CAR_ROCKETPROOF ( eurocnapback , ON ) 
SET_CAR_ROCKETPROOF ( eurocnapbackreturn , ON ) 
SET_CAR_ROCKETPROOF ( lcfront , ON ) 
SET_CAR_ROCKETPROOF ( lcfrontreturn , ON ) 
SET_CAR_ROCKETPROOF ( lcback , ON ) 
SET_CAR_ROCKETPROOF ( lcbackreturn , ON ) 
SET_CAR_ROCKETPROOF ( pdfront , ON ) 
SET_CAR_ROCKETPROOF ( pdfrontreturn , ON ) 
SET_CAR_ROCKETPROOF ( pdback , ON ) 
SET_CAR_ROCKETPROOF ( pdbackreturn , ON ) 

SET_CAR_BULLETPROOF ( hospitalfrontdoor , ON ) 
SET_CAR_BULLETPROOF ( hospitalfrontdoorreturn , ON ) 
SET_CAR_BULLETPROOF ( hospitalbackdoor1 , ON ) 
SET_CAR_BULLETPROOF ( hospitalbackdoorreturn1 , ON ) 
SET_CAR_BULLETPROOF ( keithbunkerfront , ON ) 
SET_CAR_BULLETPROOF ( keithbunkerfrontreturn , ON ) 
SET_CAR_BULLETPROOF ( eurocnapfront , ON ) 
SET_CAR_BULLETPROOF ( eurocnapfrontreturn , ON ) 
SET_CAR_BULLETPROOF ( eurocnapback , ON ) 
SET_CAR_BULLETPROOF ( eurocnapbackreturn , ON ) 
SET_CAR_BULLETPROOF ( lcfront , ON ) 
SET_CAR_BULLETPROOF ( lcfrontreturn , ON ) 
SET_CAR_BULLETPROOF ( lcback , ON ) 
SET_CAR_BULLETPROOF ( lcbackreturn , ON ) 
SET_CAR_BULLETPROOF ( pdfront , ON ) 
SET_CAR_BULLETPROOF ( pdfrontreturn , ON ) 
SET_CAR_BULLETPROOF ( pdback , ON ) 
SET_CAR_BULLETPROOF ( pdbackreturn , ON ) 

SET_CAR_FLAMEPROOF ( hospitalfrontdoor , ON ) 
SET_CAR_FLAMEPROOF ( hospitalfrontdoorreturn , ON ) 
SET_CAR_FLAMEPROOF ( hospitalbackdoor1 , ON ) 
SET_CAR_FLAMEPROOF ( hospitalbackdoorreturn1 , ON ) 
SET_CAR_FLAMEPROOF ( keithbunkerfront , ON ) 
SET_CAR_FLAMEPROOF ( keithbunkerfrontreturn , ON ) 
SET_CAR_FLAMEPROOF ( eurocnapfront , ON ) 
SET_CAR_FLAMEPROOF ( eurocnapfrontreturn , ON ) 
SET_CAR_FLAMEPROOF ( eurocnapback , ON ) 
SET_CAR_FLAMEPROOF ( eurocnapbackreturn , ON ) 
SET_CAR_FLAMEPROOF ( lcfront , ON ) 
SET_CAR_FLAMEPROOF ( lcfrontreturn , ON ) 
SET_CAR_FLAMEPROOF ( lcback , ON ) 
SET_CAR_FLAMEPROOF ( lcbackreturn , ON ) 
SET_CAR_FLAMEPROOF ( pdfront , ON ) 
SET_CAR_FLAMEPROOF ( pdfrontreturn , ON ) 
SET_CAR_FLAMEPROOF ( pdback , ON ) 
SET_CAR_FLAMEPROOF ( pdbackreturn , ON ) 

// setup test robot
GIVE_WEAPON ( robot1, CAR_FLAMETHROWER )
GIVE_WEAPON ( robot1, CAR_MINE )
GIVE_WEAPON ( robot1, CAR_MACHINE_GUN )
GIVE_WEAPON ( robot1, JEEP_GUN )
GIVE_WEAPON ( robot1, CAR_OIL )

SET_CAR_BULLETPROOF ( robot1 , ON )
SET_CAR_FLAMEPROOF ( robot1 , ON )
SET_CAR_ROCKETPROOF ( robot1 , ON )
// don't worry, the robot is still destructable if a car with carbomb explodes near

// default weapons
REMOVE_WEAPONS (player) //for cheaters... hahaha!
GIVE_WEAPON ( player, pistol, 255)
GIVE_WEAPON ( player, machine_gun, 255)
GIVE_WEAPON ( player, rocket_launcher, 255)
GIVE_WEAPON ( player, flame_thrower, 255)
GIVE_WEAPON ( player, molotov, 255) // petrol bomb
GIVE_WEAPON ( player , electro_gun , 255 ) // will be changed to freezer gun
GIVE_WEAPON (player, WEAPON_13, 1) // microphone

//ADD_ONSCREEN_COUNTER ( damage , cardamage )

//POINT_ARROW_AT( arrow1 , residential )

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

WHILE ( true = 1 ) // the basic loop
SET_CHAR_GRAPHIC_TYPE (player, DUMMY_GRAPHIC , 21) // if he dies he becomes back normal player, this fixes the thing

/* onscreen damage display (supposed to be one)
if ( IS_CHARACTER_IN_ANY_CAR ( player )) 

STORE_CAR_CHARACTER_IS_IN ( player , animcontrol )

STORE_CAR_MAX_SPEED ( animcontrol , carmax ) 

STORE_CAR_CURRENT_SPEED( animcontrol, cardamage )

set carmax = ( carmax * 100 )
set carmax = ( carmax div cardamage )

//if ( CHECK_CAR_DAMAGE_LEVEL (animcontrol, 1) ) set cardamage = 1 endif

endif // character in any car
*/

/*               *\
|  animated cars  |
\*               */              

// incase if player is driving a ROBOT (GUNJEEP)
IF ( IS_CHARACTER_IN_MODEL ( player , GUNJEEP ) )

DELAY_HERE  ( 1 )  // remove and game will freeze when you enter the gunjeep, 
                   // must have something to do with if statement :/

// then remember the car player is driving
STORE_CAR_CHARACTER_IS_IN ( player , animcontrol )

// check his speed
IF ( CHECK_CAR_SPEED ( animcontrol , 0 ) )

// animate!

// yes, all these delays are IMPORTANT!
SET_CAR_NUMBER_GRAPHIC ( animcontrol , 0 ) // first back-door delta
DELAY_HERE  ( 2 ) 
SET_CAR_NUMBER_GRAPHIC ( animcontrol , 1 )
DELAY_HERE  ( 2 ) 
SET_CAR_NUMBER_GRAPHIC ( animcontrol , 2 )
DELAY_HERE  ( 2 ) 
SET_CAR_NUMBER_GRAPHIC ( animcontrol , 3 ) // last back door delta

DELAY_HERE  ( 12 ) 

SET_CAR_NUMBER_GRAPHIC ( animcontrol , 4 ) 
DELAY_HERE  ( 2 ) 
SET_CAR_NUMBER_GRAPHIC ( animcontrol , 5 ) 
DELAY_HERE  ( 2 ) 
SET_CAR_NUMBER_GRAPHIC ( animcontrol , 6 )
DELAY_HERE  ( 2 ) 
SET_CAR_NUMBER_GRAPHIC ( animcontrol , 7 )

// when standing default frame
DELAY_HERE  ( 3 ) 
SET_CAR_NUMBER_GRAPHIC ( animcontrol , 8 ) // the last delta (normal position)
//SET_CAR_NUMBER_GRAPHIC ( robocontroled , 9 ) // number 9 is a delta that can't be edited (stupid styed)

ENDIF // speed check

ELSE // end animation check

/**********************************************************************
* doors                                                               *
* they are 1000% indestructable, so no wrecked-check is done on them. *
*                                                                     *
**********************************************************************/

// hospital

IF ( IS_CHARACTER_IN_CAR  ( player , hospitalfrontdoor ) )
WARP_FROM_CAR_TO_POINT ( player , 39.0 , 244.5 , 2.0 , 180 ) 
ENDIF 

IF ( IS_CHARACTER_IN_CAR  ( player , hospitalfrontdoorreturn ) )
WARP_FROM_CAR_TO_POINT ( player , 52.0 , 101.5 , 2.0 , 0 ) 
ENDIF

IF ( IS_CHARACTER_IN_CAR  ( player , hospitalbackdoor1 ) )
WARP_FROM_CAR_TO_POINT ( player , 38.5, 235.5, 3.0 , 0 ) 
ENDIF

IF ( IS_CHARACTER_IN_CAR  ( player , hospitalbackdoorreturn1 ) )
WARP_FROM_CAR_TO_POINT ( player , 51.5, 90.5, 3.0 , 180 ) 
ENDIF

// bunker

IF ( IS_CHARACTER_IN_CAR  ( player , keithbunkerfront ) )
WARP_FROM_CAR_TO_POINT ( player , 93.5, 213.0, 1.0 , 90 ) 
ENDIF

IF ( IS_CHARACTER_IN_CAR  ( player , keithbunkerfrontreturn ) )
WARP_FROM_CAR_TO_POINT ( player , 104.5, 69.0, 1.3 , 270 ) 
ENDIF

// euro ncap

IF ( IS_CHARACTER_IN_CAR  ( player , eurocnapfront ) )
WARP_FROM_CAR_TO_POINT ( player , 38.5, 223.5, 3.0 , 270 ) 
ENDIF

IF ( IS_CHARACTER_IN_CAR  ( player , eurocnapfrontreturn ) )
WARP_FROM_CAR_TO_POINT ( player , 53.5, 80.0, 2.0 , 90 ) 
ENDIF

IF ( IS_CHARACTER_IN_CAR  ( player , eurocnapback ) )
WARP_FROM_CAR_TO_POINT ( player , 51.5, 84.5, 3.0 , 0 ) 
ENDIF

IF ( IS_CHARACTER_IN_CAR  ( player , eurocnapbackreturn ) )
WARP_FROM_CAR_TO_POINT ( player , 38.5, 227.5, 3.0 , 180 ) 
ENDIF

// local control

IF ( IS_CHARACTER_IN_CAR  ( player , lcfront ) )
WARP_FROM_CAR_TO_POINT ( player , 19.5, 198.0, 3.0 , 90 ) 
ENDIF

IF ( IS_CHARACTER_IN_CAR  ( player , lcfrontreturn ) )
WARP_FROM_CAR_TO_POINT ( player , 31.5, 54.0, 3.0 , 270 ) 
ENDIF

IF ( IS_CHARACTER_IN_CAR  ( player , lcback ) )
WARP_FROM_CAR_TO_POINT ( player , 21.5, 199.0, 3.0 , 270 ) 
ENDIF

IF ( IS_CHARACTER_IN_CAR  ( player , lcbackreturn ) )
WARP_FROM_CAR_TO_POINT ( player , 35.5, 55.0, 3.0 , 90) 
ENDIF

// police station

IF ( IS_CHARACTER_IN_CAR  ( player , pdfront ) )
WARP_FROM_CAR_TO_POINT ( player , 10.5, 193.0, 3.0 , 270 ) 
ENDIF

IF ( IS_CHARACTER_IN_CAR  ( player , pdfrontreturn ) )
WARP_FROM_CAR_TO_POINT ( player , 24.5, 49.0, 3.0 , 90 ) 
ENDIF

IF ( IS_CHARACTER_IN_CAR  ( player , pdback ) )
WARP_FROM_CAR_TO_POINT ( player , 8.5, 193.0, 3.0 , 90 ) 
ENDIF

IF ( IS_CHARACTER_IN_CAR  ( player , pdbackreturn ) )
WARP_FROM_CAR_TO_POINT ( player , 20.5, 49.0, 3.0 , 270) 
ENDIF

endif

// loop spark indicator
effect1 = CREATE_OBJ ( 58.5 , 81.7 , 4.7 ) 0 SPARK END // this spark is there to debug the main loop, 
                           // if it freezes the spark disappears and identifies infionite-loop error

ENDWHILE // basic loop


////////////////////
// save game test //
////////////////////
//THREAD_TRIGGER thr_savepoint_1 = THREAD_WAIT_FOR_CHAR_IN_AREA ( player , 53.5 , 81.5 , 2.0 , 3.0 , 1.0 , savepoint_1: )
//savepoint_1:
//ADD_SCORE ( player , 50000 )
//PERFORM_SAVE_GAME ( thr_savepoint_1 , 53.5 , 81.5 , 2.0 , 3.0 , 1.0 )	

/*THREAD_TRIGGER soccergoal = THREAD_WAIT_FOR_CHAR_IN_AREA_ANY_MEANS ( player , 55.5 , 81.5 ,  2.0 , 1.0, 1.0, soccertest: )
soccertest:

while ( true = 1 )

if ( LOCATE_ANOTHER_CHARACTER_ON_FOOT ( player, theball ,  0.5, 0.5 ) )
effect1 = CREATE_OBJ ( 55.5, 81.5, 2.0 ) 0 SPARK END
endif

endwhile*/

//LOCATE_CHARACTER_ANY_MEANS( theball  ,  57.0  , 80.0 , 2.0 , 1.0 , 1.0  ) 
//explode(theball)

RETURN

LEVELEND
