R4gn0r0k

firetruck.sc

Feb 4th, 2016
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.01 KB | None | 0 0
  1. MISSION_START
  2. // *****************************************************************************************
  3. // *****************************************************************************************
  4. // *****************************************************************************************
  5. // *************************************** Fire missions ***********************************
  6. // *****************************************************************************************
  7. // *****************************************************************************************
  8. // *****************************************************************************************
  9.  
  10. // Mission start stuff
  11.  
  12. GOSUB mission_start_fire
  13.  
  14. GOSUB failed
  15.  
  16. MISSION_END
  17.  
  18. // Variables for mission
  19.  
  20. VAR_INT fire_time_limit fire_to_extinguish fire_to_extinguish_blip car_on_fire random_car_model fires_extinguished
  21. VAR_INT car_on_fire_created player_in_range_fire flag_got_range_mssg intermediate_int score_ft displayed_timer
  22. VAR_INT total_score displayed_counter first_fire_flag mission_end_button_ft fire_location dummy_ped_for_zone
  23. VAR_INT players_firetruck players_firetruck_health car_on_fire_health
  24.  
  25. VAR_FLOAT random_fire_x random_fire_y time_divider time_divider_divider
  26. VAR_FLOAT player1_x player1_y player1_z
  27. VAR_FLOAT fire_coord_x fire_coord_y fire_coord_z
  28. VAR_FLOAT difference_x_float difference_y_float sum_difference_xy
  29. VAR_FLOAT players_distance_from_fire fire_time_limit_float random_car_heading
  30.  
  31.  
  32. // ****************************************Mission Start************************************
  33.  
  34. mission_start_fire:
  35.  
  36. flag_player_on_mission = 1
  37. flag_player_on_fire_mission = 1
  38.  
  39. SCRIPT_NAME firetru
  40.  
  41. WAIT 0
  42.  
  43. fire_time_limit = 0
  44. fire_to_extinguish = 0
  45. fire_to_extinguish_blip = 0
  46. car_on_fire = 0
  47. random_car_model = 0
  48. car_on_fire_created = 0
  49. player_in_range_fire = 0
  50. flag_got_range_mssg = 0
  51. score_ft = 250
  52. displayed_timer = 0
  53. fires_extinguished = 0
  54. displayed_counter = 0
  55. total_score = 0
  56. first_fire_flag = 0
  57. mission_end_button_ft = 0
  58. fire_location = 0
  59. time_divider_divider = 2.0
  60.  
  61.  
  62. next_fire:
  63.  
  64. WAIT 0
  65.  
  66. SET_WANTED_MULTIPLIER 0.5
  67.  
  68. GET_PLAYER_COORDINATES player player1_x player1_y player1_z
  69.  
  70. IF NOT IS_PLAYER_IN_MODEL player CAR_FIRETRUCK
  71. PRINT_NOW F_CANC 3000 1//"Fire truck mission cancelled!"
  72. GOTO failed
  73. ENDIF
  74.  
  75. GET_CONTROLLER_MODE controlmode
  76.  
  77. IF NOT controlmode = 3
  78. IF IS_BUTTON_PRESSED PAD1 RIGHTSHOCK
  79. mission_end_button_ft = 1
  80. ENDIF
  81. ELSE
  82. IF IS_BUTTON_PRESSED PAD1 SQUARE
  83. mission_end_button_ft = 1
  84. ENDIF
  85. ENDIF
  86.  
  87. IF mission_end_button_ft = 1
  88. IF NOT controlmode = 3
  89. IF NOT IS_BUTTON_PRESSED PAD1 RIGHTSHOCK
  90. PRINT_NOW F_CANC 3000 1//"Fire truck mission cancelled!"
  91. GOTO failed
  92. ENDIF
  93. ELSE
  94. IF NOT IS_BUTTON_PRESSED PAD1 SQUARE
  95. PRINT_NOW F_CANC 3000 1//"Fire truck mission cancelled!"
  96. GOTO failed
  97. ENDIF
  98. ENDIF
  99. ENDIF
  100.  
  101. //IF IS_PLAYER_IN_AREA_2D player 778.0 -1110.0 1540.0 190.0 0 //INDUSTRIAL
  102. IF IS_COLLISION_IN_MEMORY LEVEL_INDUSTRIAL
  103. GENERATE_RANDOM_FLOAT_IN_RANGE 778.0 1540.0 random_fire_x
  104. GENERATE_RANDOM_FLOAT_IN_RANGE -1110.0 190.0 random_fire_y
  105. flag_got_range_mssg = 0
  106. player_in_range_fire = 1
  107. fire_location = 1
  108. time_divider = 13.0
  109. ENDIF
  110.  
  111. //IF IS_PLAYER_IN_AREA_2D player -192.0 -1626.0 545.0 98.0 0 //COMMERCIAL
  112. IF IS_COLLISION_IN_MEMORY LEVEL_COMMERCIAL
  113. GENERATE_RANDOM_FLOAT_IN_RANGE -192.0 545.0 random_fire_x
  114. GENERATE_RANDOM_FLOAT_IN_RANGE -1626.0 98.0 random_fire_y
  115. flag_got_range_mssg = 0
  116. player_in_range_fire = 1
  117. fire_location = 2
  118. time_divider = 14.0
  119. ENDIF
  120.  
  121. //IF IS_PLAYER_IN_AREA_2D player -1300.0 -608.8 -265.0 380.0 0 //SUBURBIA
  122. IF IS_COLLISION_IN_MEMORY LEVEL_SUBURBAN
  123. GENERATE_RANDOM_FLOAT_IN_RANGE -1300.0 -414.0 random_fire_x
  124. GENERATE_RANDOM_FLOAT_IN_RANGE -608.8 380.0 random_fire_y
  125. flag_got_range_mssg = 0
  126. player_in_range_fire = 1
  127. fire_location = 3
  128. time_divider = 11.0
  129. ENDIF
  130.  
  131. IF player_in_range_fire = 0
  132. AND flag_got_range_mssg = 0
  133. IF flag_got_range_mssg = 0
  134. PRINT_NOW F_RANGE 5000 1 //"The radio is out of range, get closer."
  135. flag_got_range_mssg = 1
  136. ENDIF
  137. GOTO failed
  138. ENDIF
  139.  
  140. GET_CLOSEST_CAR_NODE random_fire_x random_fire_y player1_z fire_coord_x fire_coord_y fire_coord_z
  141.  
  142. IF fire_coord_x > 670.0 //MIN_X // CALAHAN BRIDGE
  143. AND fire_coord_x < 1035.0 //MAX_X
  144. AND fire_coord_y > -953.0 //MIN_Y
  145. AND fire_coord_y < -912.0 //MAX_Y
  146. GOTO next_fire
  147. ENDIF
  148.  
  149. IF fire_coord_x > 649.0 //MIN_X // TUNNEL ENTRANCE INDUSTRIAL
  150. AND fire_coord_x < 1066.0 //MAX_X
  151. AND fire_coord_y > 25.0 //MIN_Y
  152. AND fire_coord_y < 217.0 //MAX_Y
  153. GOTO next_fire
  154. ENDIF
  155.  
  156. IF fire_coord_x > -1611.5 //MIN_X // AIRPORT SUBURBAN
  157. AND fire_coord_x < -745.3 //MAX_X
  158. AND fire_coord_y > -1001.9 //MIN_Y
  159. AND fire_coord_y < -371.2 //MAX_Y
  160. GOTO next_fire
  161. ENDIF
  162.  
  163. IF fire_coord_x > -1255.4 //MIN_X // BAIT WAREHOUSE CARPARK SUBURBIA
  164. AND fire_coord_x < -1187.9 //MAX_X
  165. AND fire_coord_y > 80.6 //MIN_Y
  166. AND fire_coord_y < 123.4 //MAX_Y
  167. GOTO next_fire
  168. ENDIF
  169.  
  170. IF fire_coord_x > 1386.4 //MIN_X // FRANKIES HOUSE
  171. AND fire_coord_x < 1475.8 //MAX_X
  172. AND fire_coord_y > -292.1 //MIN_Y
  173. AND fire_coord_y < -168.0 //MAX_Y
  174. GOTO next_fire
  175. ENDIF
  176.  
  177. IF fire_location = 1
  178. IF NOT fire_coord_x > 778.0 //MIN_X // INDUSTRIAL
  179. OR NOT fire_coord_x < 1540.0 //MAX_X
  180. OR NOT fire_coord_y > -1110.0 //MIN_Y
  181. OR NOT fire_coord_y < 190.0 //MAX_Y
  182. GOTO next_fire
  183. ENDIF
  184. ENDIF
  185.  
  186. IF fire_location = 2
  187. IF NOT fire_coord_x > -192.0 //MIN_X // COMMERCIAL
  188. OR NOT fire_coord_x < 545.0 //MAX_X
  189. OR NOT fire_coord_y > -1626.0 //MIN_Y
  190. OR NOT fire_coord_y < 98.0 //MAX_Y
  191. GOTO next_fire
  192. ENDIF
  193. ENDIF
  194.  
  195. IF fire_location = 3
  196. IF NOT fire_coord_x > -1300.0 //MIN_X // SUBURBIA
  197. OR NOT fire_coord_x < -414.0 //MAX_X
  198. OR NOT fire_coord_y > -608.8 //MIN_Y
  199. OR NOT fire_coord_y < 380.0 //MAX_Y
  200. GOTO next_fire
  201. ENDIF
  202. ENDIF
  203.  
  204. IF fire_coord_z < -1.0
  205. GOTO next_fire
  206. ENDIF
  207.  
  208. difference_x_float = player1_x - fire_coord_x
  209. difference_y_float = player1_y - fire_coord_y
  210. difference_x_float = difference_x_float * difference_x_float
  211. difference_y_float = difference_y_float * difference_y_float
  212. sum_difference_xy = difference_x_float + difference_y_float
  213. SQRT sum_difference_xy players_distance_from_fire
  214.  
  215. IF players_distance_from_fire < 200.0
  216. GOTO next_fire
  217. ENDIF
  218.  
  219. fire_time_limit_float = players_distance_from_fire / time_divider
  220.  
  221. time_divider += time_divider_divider
  222. time_divider_divider += 2.0
  223.  
  224. fire_time_limit_float = fire_time_limit_float * 1000.0
  225. intermediate_int =# fire_time_limit_float
  226. fire_time_limit += intermediate_int
  227.  
  228. IF fires_extinguished = 0
  229. IF fire_time_limit < 50000
  230. fire_time_limit = 50000
  231. ENDIF
  232. ENDIF
  233.  
  234. generate_model:
  235.  
  236. GENERATE_RANDOM_INT_IN_RANGE 90 140 random_car_model //INC 90 NOT INC 140
  237.  
  238. IF random_car_model > 113 // CAR_BUGGY CAR_CORPSE CAR_POLICE CAR_ENFORCER CAR_SECURICAR CAR_BANSHEE BOAT_PREDATOR CAR_BUS
  239. AND random_car_model < 128 // CAR_RHINO CAR_BARRACKS TRAIN_SUBWAY HELI_POLICE PLANE_DODO CAR_COACH
  240. GOTO generate_model
  241. ENDIF
  242.  
  243. IF random_car_model = 92 // CAR_BOXTER
  244. OR random_car_model = 97 // CAR_FIRETRUCK
  245. OR random_car_model = 101 // CAR_INFERNUS
  246. OR random_car_model = 105 // CAR_CHEETAH
  247. GOTO generate_model
  248. ENDIF
  249.  
  250. IF random_car_model = 106 // CAR_AMBULANCE
  251. OR random_car_model = 107 // CAR_FBI
  252. OR random_car_model = 131 // CAR_RCBANDIT
  253. OR random_car_model = 140 // PLANE_AIRTRAIN
  254. GOTO generate_model
  255. ENDIF
  256.  
  257. REQUEST_MODEL random_car_model
  258. {
  259. IF first_fire_flag = 1
  260. TIMERA = 0
  261. ELSE
  262. TIMERA = 3001
  263. first_fire_flag = 1
  264. ENDIF
  265.  
  266. WHILE NOT HAS_MODEL_LOADED random_car_model
  267. OR NOT TIMERA > 3000
  268. WAIT 0
  269.  
  270. IF fire_time_limit < 1
  271. PRINT_NOW F_FAIL2 5000 1
  272. GOTO failed
  273. ENDIF
  274.  
  275. IF NOT IS_PLAYER_IN_MODEL player CAR_FIRETRUCK
  276. PRINT_NOW F_CANC 3000 1//"Fire truck mission cancelled!"
  277. GOTO failed
  278. ENDIF
  279.  
  280. GET_CONTROLLER_MODE controlmode
  281.  
  282. IF NOT controlmode = 3
  283. IF IS_BUTTON_PRESSED PAD1 RIGHTSHOCK
  284. mission_end_button_ft = 1
  285. ENDIF
  286. ELSE
  287. IF IS_BUTTON_PRESSED PAD1 SQUARE
  288. mission_end_button_ft = 1
  289. ENDIF
  290. ENDIF
  291.  
  292. IF mission_end_button_ft = 1
  293. IF NOT controlmode = 3
  294. IF NOT IS_BUTTON_PRESSED PAD1 RIGHTSHOCK
  295. PRINT_NOW F_CANC 3000 1//"Fire truck mission cancelled!"
  296. GOTO failed
  297. ENDIF
  298. ELSE
  299. IF NOT IS_BUTTON_PRESSED PAD1 SQUARE
  300. PRINT_NOW F_CANC 3000 1//"Fire truck mission cancelled!"
  301. GOTO failed
  302. ENDIF
  303. ENDIF
  304. ENDIF
  305.  
  306. ENDWHILE
  307. }
  308. GENERATE_RANDOM_FLOAT_IN_RANGE 0.0 359.9 random_car_heading
  309.  
  310. IF car_on_fire_created = 0
  311. CREATE_CAR random_car_model fire_coord_x fire_coord_y fire_coord_z car_on_fire
  312. car_on_fire_created = 1
  313. ENDIF
  314.  
  315. CREATE_CHAR_INSIDE_CAR car_on_fire PEDTYPE_CIVMALE PED_MALE1 dummy_ped_for_zone
  316. MARK_MODEL_AS_NO_LONGER_NEEDED random_car_model
  317. SET_CAR_HEADING car_on_fire random_car_heading
  318. START_CAR_FIRE car_on_fire fire_to_extinguish
  319. ADD_BLIP_FOR_CAR car_on_fire fire_to_extinguish_blip
  320. CAR_SET_IDLE car_on_fire
  321. CHAR_SET_IDLE dummy_ped_for_zone
  322. SET_CAR_CRUISE_SPEED car_on_fire 0.0
  323. SET_CAR_ONLY_DAMAGED_BY_PLAYER car_on_fire TRUE
  324.  
  325. //PRINT_NOW F_START 3000 1
  326.  
  327. IF IS_CHAR_IN_ZONE dummy_ped_for_zone PORT_W
  328. PRINT_STRING_IN_STRING_NOW F_START PORT_W 5000 1 // The suspect is in the Callahan Point area.
  329. ENDIF
  330.  
  331. IF IS_CHAR_IN_ZONE dummy_ped_for_zone PORT_S
  332. PRINT_STRING_IN_STRING_NOW F_START PORT_S 5000 1 // The suspect is in the Atlantic Quays area.
  333. ENDIF
  334.  
  335. IF IS_CHAR_IN_ZONE dummy_ped_for_zone PORT_E
  336. PRINT_STRING_IN_STRING_NOW F_START PORT_E 5000 1 // The suspect is in the Portland Harbour area.
  337. ENDIF
  338.  
  339. IF IS_CHAR_IN_ZONE dummy_ped_for_zone PORT_I
  340. PRINT_STRING_IN_STRING_NOW F_START PORT_I 5000 1 // The suspect is in the Trenton area.
  341. ENDIF
  342.  
  343. IF IS_CHAR_IN_ZONE dummy_ped_for_zone S_VIEW
  344. PRINT_STRING_IN_STRING_NOW F_START S_VIEW 5000 1 // The suspect is in the Portland View area.
  345. ENDIF
  346.  
  347. IF IS_CHAR_IN_ZONE dummy_ped_for_zone CHINA
  348. PRINT_STRING_IN_STRING_NOW F_START CHINA 5000 1 // The dummy_ped_for_zone is proceeding south in Chinatown
  349. ENDIF
  350.  
  351. IF IS_CHAR_IN_ZONE dummy_ped_for_zone EASTBAY
  352. PRINT_STRING_IN_STRING_NOW F_START EASTBAY 5000 1 // The dummy_ped_for_zone is proceeding south in Portland Beach
  353. ENDIF
  354.  
  355. IF IS_CHAR_IN_ZONE dummy_ped_for_zone LITTLEI
  356. PRINT_STRING_IN_STRING_NOW F_START LITTLEI 5000 1 // The dummy_ped_for_zone is proceeding south in Saint Mark's
  357. ENDIF
  358.  
  359. IF IS_CHAR_IN_ZONE dummy_ped_for_zone REDLIGH
  360. PRINT_STRING_IN_STRING_NOW F_START REDLIGH 5000 1 // The dummy_ped_for_zone is proceeding south in Red Light District
  361. ENDIF
  362.  
  363. IF IS_CHAR_IN_ZONE dummy_ped_for_zone TOWERS
  364. PRINT_STRING_IN_STRING_NOW F_START TOWERS 5000 1 // The dummy_ped_for_zone is proceeding south in Hepburn Heights
  365. ENDIF
  366.  
  367. IF IS_CHAR_IN_ZONE dummy_ped_for_zone HARWOOD
  368. PRINT_STRING_IN_STRING_NOW F_START HARWOOD 5000 1 // The dummy_ped_for_zone is proceeding south in Harwood
  369. ENDIF
  370.  
  371. IF IS_CHAR_IN_ZONE dummy_ped_for_zone ROADBR1
  372. PRINT_STRING_IN_STRING_NOW F_START ROADBR1 5000 1 // The dummy_ped_for_zone is proceeding south in Callahan Bridge
  373. ENDIF
  374.  
  375. IF IS_CHAR_IN_ZONE dummy_ped_for_zone ROADBR2
  376. PRINT_STRING_IN_STRING_NOW F_START ROADBR2 5000 1 // The dummy_ped_for_zone is proceeding south in Callahan Bridge
  377. ENDIF
  378.  
  379. //IF IS_CHAR_IN_ZONE dummy_ped_for_zone TUNNELP
  380. // PRINT_STRING_IN_STRING_NOW F_START TUNNELP 5000 1 // The dummy_ped_for_zone is proceeding south in Porter Tunnel
  381. //ENDIF
  382.  
  383. IF IS_CHAR_IN_ZONE dummy_ped_for_zone STADIUM
  384. PRINT_STRING_IN_STRING_NOW F_START STADIUM 5000 1 // The dummy_ped_for_zone is proceeding south in Aspatria
  385. ENDIF
  386.  
  387. IF IS_CHAR_IN_ZONE dummy_ped_for_zone HOSPI_2
  388. PRINT_STRING_IN_STRING_NOW F_START HOSPI_2 5000 1 // The dummy_ped_for_zone is proceeding south in Rockford
  389. ENDIF
  390.  
  391. IF IS_CHAR_IN_ZONE dummy_ped_for_zone UNIVERS
  392. PRINT_STRING_IN_STRING_NOW F_START UNIVERS 5000 1 // The dummy_ped_for_zone is proceeding south in Liberty Campus
  393. ENDIF
  394.  
  395. IF IS_CHAR_IN_ZONE dummy_ped_for_zone CONSTRU
  396. PRINT_STRING_IN_STRING_NOW F_START CONSTRU 5000 1 // The dummy_ped_for_zone is proceeding south in Fort Staunton
  397. ENDIF
  398.  
  399. IF IS_CHAR_IN_ZONE dummy_ped_for_zone PARK
  400. PRINT_STRING_IN_STRING_NOW F_START PARK 5000 1 // The dummy_ped_for_zone is proceeding south in Belleville Park
  401. ENDIF
  402.  
  403. IF IS_CHAR_IN_ZONE dummy_ped_for_zone COM_EAS
  404. PRINT_STRING_IN_STRING_NOW F_START COM_EAS 5000 1 // The dummy_ped_for_zone is proceeding south in Newport
  405. ENDIF
  406.  
  407. IF IS_CHAR_IN_ZONE dummy_ped_for_zone SHOPING
  408. PRINT_STRING_IN_STRING_NOW F_START SHOPING 5000 1 // The dummy_ped_for_zone is proceeding south in Bedford Point
  409. ENDIF
  410.  
  411. IF IS_CHAR_IN_ZONE dummy_ped_for_zone YAKUSA
  412. PRINT_STRING_IN_STRING_NOW F_START YAKUSA 5000 1 // The dummy_ped_for_zone is proceeding south in Torrington
  413. ENDIF
  414.  
  415. IF IS_CHAR_IN_ZONE dummy_ped_for_zone AIRPORT
  416. PRINT_STRING_IN_STRING_NOW F_START AIRPORT 5000 1 // The dummy_ped_for_zone is proceeding south in Francis International Airport
  417. ENDIF
  418.  
  419. IF IS_CHAR_IN_ZONE dummy_ped_for_zone PROJECT
  420. PRINT_STRING_IN_STRING_NOW F_START PROJECT 5000 1 // The dummy_ped_for_zone is proceeding south in Wichita Gardens
  421. ENDIF
  422.  
  423. IF IS_CHAR_IN_ZONE dummy_ped_for_zone SUB_IND
  424. PRINT_STRING_IN_STRING_NOW F_START SUB_IND 5000 1 // The dummy_ped_for_zone is proceeding south in Pike Creek
  425. ENDIF
  426.  
  427. IF IS_CHAR_IN_ZONE dummy_ped_for_zone SWANKS
  428. PRINT_STRING_IN_STRING_NOW F_START SWANKS 5000 1 // The dummy_ped_for_zone is proceeding south in Cedar Grove
  429. ENDIF
  430.  
  431. IF IS_CHAR_IN_ZONE dummy_ped_for_zone BIG_DAM
  432. PRINT_STRING_IN_STRING_NOW F_START BIG_DAM 5000 1 // The dummy_ped_for_zone is proceeding south in Cochrane Dam
  433. ENDIF
  434.  
  435. DELETE_CHAR dummy_ped_for_zone
  436.  
  437. IF displayed_timer = 0
  438. DISPLAY_ONSCREEN_TIMER fire_time_limit
  439. displayed_timer = 1
  440. ENDIF
  441.  
  442. CLEAR_HELP
  443.  
  444. IF got_siren_help_before = 1
  445. GET_CONTROLLER_MODE controlmode
  446. IF controlmode = 0
  447. PRINT_HELP SIREN_1 //"To turn on this vehicles sirens tap the ~h~L1 button~w~."
  448. ENDIF
  449. IF controlmode = 1
  450. PRINT_HELP SIREN_2 //"To turn on this vehicles sirens tap the ~h~L1 button~w~."
  451. ENDIF
  452. IF controlmode = 2
  453. PRINT_HELP SIREN_3 //"To turn on this vehicles sirens tap the ~h~R1 button~w~."
  454. ENDIF
  455. IF controlmode = 3
  456. PRINT_HELP SIREN_4 //"To turn on this vehicles sirens tap the ~h~L3 button~w~."
  457. ENDIF
  458. got_siren_help_before = 2
  459. ENDIF
  460.  
  461. IF got_siren_help_before = 0
  462. GET_CONTROLLER_MODE controlmode
  463. IF controlmode = 0
  464. PRINT_HELP SPRAY_1 //"To turn on this vehicles sirens tap the ~h~L1 button~w~."
  465. ENDIF
  466. IF controlmode = 1
  467. PRINT_HELP SPRAY_1 //"To turn on this vehicles sirens tap the ~h~L1 button~w~."
  468. ENDIF
  469. IF controlmode = 2
  470. PRINT_HELP SPRAY_1 //"To turn on this vehicles sirens tap the ~h~R1 button~w~."
  471. ENDIF
  472. IF controlmode = 3
  473. PRINT_HELP SPRAY_4 //"To turn on this vehicles sirens tap the ~h~L3 button~w~."
  474. ENDIF
  475. got_siren_help_before = 1
  476. ENDIF
  477.  
  478. WHILE NOT IS_SCRIPT_FIRE_EXTINGUISHED fire_to_extinguish
  479. WAIT 0
  480.  
  481. IF IS_CAR_DEAD car_on_fire
  482. PRINT_NOW F_FAIL2 5000 1
  483. GOTO failed
  484. ENDIF
  485.  
  486. IF fire_time_limit < 1
  487. PRINT_NOW F_FAIL2 5000 1
  488. GOTO failed
  489. ENDIF
  490.  
  491. IF NOT IS_PLAYER_IN_MODEL player CAR_FIRETRUCK
  492. PRINT_NOW F_CANC 3000 1//"Fire truck mission cancelled!"
  493. GOTO failed
  494. ENDIF
  495.  
  496. GET_CAR_HEALTH car_on_fire car_on_fire_health
  497.  
  498. IF car_on_fire_health < 900
  499. EXPLODE_CAR car_on_fire
  500. ENDIF
  501.  
  502. GET_CONTROLLER_MODE controlmode
  503.  
  504. IF NOT controlmode = 3
  505. IF IS_BUTTON_PRESSED PAD1 RIGHTSHOCK
  506. mission_end_button_ft = 1
  507. ENDIF
  508. ELSE
  509. IF IS_BUTTON_PRESSED PAD1 SQUARE
  510. mission_end_button_ft = 1
  511. ENDIF
  512. ENDIF
  513.  
  514. IF mission_end_button_ft = 1
  515. IF NOT controlmode = 3
  516. IF NOT IS_BUTTON_PRESSED PAD1 RIGHTSHOCK
  517. PRINT_NOW F_CANC 3000 1//"Fire truck mission cancelled!"
  518. GOTO failed
  519. ENDIF
  520. ELSE
  521. IF NOT IS_BUTTON_PRESSED PAD1 SQUARE
  522. PRINT_NOW F_CANC 3000 1//"Fire truck mission cancelled!"
  523. GOTO failed
  524. ENDIF
  525. ENDIF
  526. ENDIF
  527.  
  528. ENDWHILE
  529.  
  530. GOTO passed
  531.  
  532.  
  533. /////////////////////////////////////////////////
  534. passed://////////////////////////////////////////
  535. /////////////////////////////////////////////////
  536.  
  537. ++ fires_extinguished
  538. PRINT_BIG F_PASS1 5000 5
  539. PRINT_WITH_NUMBER_BIG REWARD score_ft 6000 6
  540. REGISTER_FIRE_EXTINGUISHED
  541.  
  542. IF fire_location = 1
  543. ++ ind_fires_exting
  544. ENDIF
  545.  
  546. IF fire_location = 2
  547. ++ com_fires_exting
  548. ENDIF
  549.  
  550. IF fire_location = 3
  551. ++ sub_fires_exting
  552. ENDIF
  553.  
  554. IF earned_free_flamethrower = 0
  555. IF ind_fires_exting > 19
  556. AND com_fires_exting > 19
  557. AND sub_fires_exting > 19
  558. ADD_PAGER_MESSAGE PAGEB11 140 100 1 //"Flamethrower delivered to hideout"
  559. PLAYER_MADE_PROGRESS 1
  560. earned_free_flamethrower = 1
  561. ENDIF
  562. ENDIF
  563.  
  564. ADD_SCORE player score_ft
  565. total_score += score_ft
  566. score_ft += 250
  567. REMOVE_ALL_SCRIPT_FIRES
  568. REMOVE_BLIP fire_to_extinguish_blip
  569. ADD_ONE_OFF_SOUND 0.0 0.0 0.0 SOUND_PART_MISSION_COMPLETE
  570.  
  571. IF IS_PLAYER_IN_ANY_CAR player
  572. STORE_CAR_PLAYER_IS_IN player players_firetruck
  573. GET_CAR_HEALTH players_firetruck players_firetruck_health
  574. players_firetruck_health += 150
  575. SET_CAR_HEALTH players_firetruck players_firetruck_health
  576. ENDIF
  577.  
  578. //earned_free_flamethrower PAGEB11
  579.  
  580. IF displayed_counter = 0
  581. DISPLAY_ONSCREEN_COUNTER_WITH_STRING fires_extinguished COUNTER_DISPLAY_NUMBER F_EXTIN
  582. displayed_counter = 1
  583. ENDIF
  584.  
  585. IF car_on_fire_created = 1
  586. MARK_CAR_AS_NO_LONGER_NEEDED car_on_fire
  587. IF NOT IS_CAR_DEAD car_on_fire
  588. SET_CAR_ONLY_DAMAGED_BY_PLAYER car_on_fire FALSE
  589. ENDIF
  590. car_on_fire_created = 0
  591. ENDIF
  592.  
  593. MARK_MODEL_AS_NO_LONGER_NEEDED random_car_model
  594.  
  595. GOTO next_fire
  596.  
  597.  
  598. /////////////////////////////////////////////////
  599. failed://////////////////////////////////////////
  600. /////////////////////////////////////////////////
  601.  
  602. CLEAR_ONSCREEN_TIMER fire_time_limit
  603. CLEAR_ONSCREEN_COUNTER fires_extinguished
  604. PRINT_BIG F_FAIL1 5000 5
  605. PRINT_WITH_NUMBER_BIG TSCORE total_score 6000 6
  606. REMOVE_ALL_SCRIPT_FIRES
  607. REMOVE_BLIP fire_to_extinguish_blip
  608. CLEAR_HELP
  609. SET_WANTED_MULTIPLIER 1.0
  610.  
  611. IF car_on_fire_created = 1
  612. IF NOT IS_CAR_DEAD car_on_fire
  613. SET_CAR_ONLY_DAMAGED_BY_PLAYER car_on_fire FALSE
  614. EXPLODE_CAR car_on_fire
  615. ENDIF
  616. MARK_CAR_AS_NO_LONGER_NEEDED car_on_fire
  617. car_on_fire_created = 0
  618. ENDIF
  619. MARK_MODEL_AS_NO_LONGER_NEEDED random_car_model
  620.  
  621. flag_player_on_mission = 0
  622. flag_player_on_fire_mission = 0
  623. MISSION_HAS_FINISHED
  624. RETURN
Add Comment
Please, Sign In to add comment