Advertisement
Guest User

Main.scm

a guest
Jul 3rd, 2014
333
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 24.29 KB | None | 0 0
  1.  
  2. DEFINE MISSIONS 0
  3. //DEFINE MISSION {ID} 0 AT {LABEL} @
  4. DEFINE MISSION 0 AT @SHOOTTT
  5.  
  6. DEFINE EXTERNAL_SCRIPTS 0 // Use -1 in order not to compile AAA script
  7. //DEFINE SCRIPT POLICE AT @POLICE // 0
  8. //DEFINE SCRIPT {NAME} AT {LABEL} @
  9.  
  10. DEFINE UNKNOWN_EMPTY_SEGMENT 0
  11.  
  12. DEFINE UNKNOWN_THREADS_MEMORY 0
  13.  
  14. var
  15. $PLAYER_CHAR: Player
  16. end // var
  17. 03A4: name_thread 'MAIN'
  18. 01F0: set_max_wanted_level_to 0
  19. 0111: toggle_wasted_busted_check 0
  20. 00C0: set_current_time_hours_to 10 minutes_to 0
  21. 04E4: unknown_refresh_game_renderer_at 2488.56 -1666.84
  22. 03CB: set_rendering_origin_at 2488.56 -1666.84 13.38
  23. 0053: $PLAYER_CHAR = create_player #NULL at 2488.56 -1666.84 13.38
  24. 01F5: $PLAYER_ACTOR = create_player_actor $PLAYER_CHAR
  25. 07AF: $PLAYER_GROUP = player $PLAYER_CHAR group
  26. 0373: set_camera_directly_behind_player
  27. 01B6: set_weather 0
  28. 0001: wait 0 ms
  29. 087B: set_player $PLAYER_CHAR clothes_texture "PLAYER_FACE" model "HEAD" body_part 1
  30. 087B: set_player $PLAYER_CHAR clothes_texture "JEANSDENIM" model "JEANS" body_part 2
  31. 087B: set_player $PLAYER_CHAR clothes_texture "SNEAKERBINCBLK" model "SNEAKER" body_part 3
  32. 087B: set_player $PLAYER_CHAR clothes_texture "VEST" model "VEST" body_part 0
  33. 070D: rebuild_player $PLAYER_CHAR
  34. 01B4: toggle_player $PLAYER_CHAR can_move 1
  35. 016A: fade 1 time 0
  36. 04BB: select_interior 0
  37. 0629: change_integer_stat 181 to 4
  38. 016C: restart_if_wasted_at 2027.77 -1420.52 15.99 angle 137.0 town_number 0
  39. 016D: restart_if_busted_at 1550.68 -1675.49 14.51 angle 90.0 town_number 0
  40. 0180: set_on_mission_flag_to $ONMISSION // Note: your missions have to use the variable defined here
  41. 0004: $DEFAULT_WAIT_TIME = 250
  42. 03E6: remove_text_box
  43. $SUSPECT_1 = -1
  44. $SUSPECT_1M = -1
  45. $SUSPECT_2 = -1
  46. $SUSPECT_2M = -1
  47. $SUSPECT_3 = -1
  48. $SUSPECT_3M = -1
  49. $SUSPECT_4 = -1
  50. $SUSPECT_4M = -1
  51. $SUSPECT_5 = -1
  52. $SUSPECT_5M = -1
  53. $SUSPECT_6 = -1
  54. $SUSPECT_6M = -1
  55. $SUSPECT_7 = -1
  56. $SUSPECT_7M = -1
  57. $SUSPECT_8 = -1
  58. $SUSPECT_8M = -1
  59. $SUSPECT_9 = -1
  60. $SUSPECT_9M = -1
  61. $NUM_SUSPECTS = -1
  62. $Are_All_Suspects_Dead = false
  63. $Is_All_Sus_Created = false
  64. $Callout_Num = -1
  65. wait 30000 // crash occurs before this command
  66.  
  67. //0914: register_streamed_script_internal 0 // nop
  68. //0928: allocate_streamed_script_to_random_ped 0 (POLICE) model #LAPD1 priority 100
  69. //0928: allocate_streamed_script_to_random_ped 0 (POLICE) model #SFPD1 priority 100
  70. //0928: allocate_streamed_script_to_random_ped 0 (POLICE) model #LVPD1 priority 100
  71. //0928: allocate_streamed_script_to_random_ped 0 (POLICE) model #LAPDM1 priority 100
  72. //0928: allocate_streamed_script_to_random_ped 0 (POLICE) model #DSHER priority 100
  73. //0928: allocate_streamed_script_to_random_ped 0 (POLICE) model #CSHER priority 100
  74.  
  75. // put your create_thread commands here
  76. 004F: start_new_script @SUSDCHK
  77. 004F: start_new_script @SUSSPOT
  78.  
  79. :MAIN_LOOP
  80. wait $DEFAULT_WAIT_TIME
  81. 00BF: $TIME_HOURS = current_time_hours, $TIME_MINS = current_time_minutes
  82. 00A0: get_char_coordinates $PLAYER_ACTOR store_to $TempX $TempY $TempZ
  83. if and
  84. $ONMISSION == 0
  85. 0AB0: is_key_pressed 52
  86. then
  87. if
  88. $Callout_Num == -1
  89. then
  90. 0417: load_and_launch_mission 0
  91. end
  92. end
  93. goto @MAIN_LOOP
  94.  
  95. :SUSDCHK // Creates suspect array; Checks if suspect dead (global)
  96. 03A4: script_name 'SUSDCHK'
  97. 0@ = 0
  98. while true
  99. wait 0
  100. if
  101. 0256: is_player_playing $PLAYER_CHAR
  102. then
  103. if and
  104. $ONMISSION == 1
  105. $Are_All_Suspects_Dead == false
  106. $Is_All_Sus_Created == true
  107. then
  108. if
  109. $SUSPECT_1 <> -1
  110. then
  111. if
  112. 0118: is_char_dead $SUSPECT_1
  113. then
  114. 0@ += 1
  115. 01C2: mark_char_as_no_longer_needed $SUSPECT_1
  116. $SUSPECT_1 = -1
  117. if
  118. 075C: does_blip_exist $SUSPECT_1M
  119. then
  120. 0164: remove_blip $SUSPECT_1M
  121. end
  122. end
  123. end
  124. if
  125. $SUSPECT_2 <> -1
  126. then
  127. if
  128. 0118: is_char_dead $SUSPECT_2
  129. then
  130. 0@ += 1
  131. 01C2: mark_char_as_no_longer_needed $SUSPECT_2
  132. $SUSPECT_2 = -1
  133. if
  134. 075C: does_blip_exist $SUSPECT_2M
  135. then
  136. 0164: remove_blip $SUSPECT_2M
  137. end
  138. end
  139. end
  140. if
  141. $SUSPECT_3 <> -1
  142. then
  143. if
  144. 0118: is_char_dead $SUSPECT_3
  145. then
  146. 0@ += 1
  147. 01C2: mark_char_as_no_longer_needed $SUSPECT_3
  148. $SUSPECT_3 = -1
  149. if
  150. 075C: does_blip_exist $SUSPECT_3M
  151. then
  152. 0164: remove_blip $SUSPECT_3M
  153. end
  154. end
  155. end
  156. if
  157. $SUSPECT_4 <> -1
  158. then
  159. if
  160. 0118: is_char_dead $SUSPECT_4
  161. then
  162. 0@ += 1
  163. 01C2: mark_char_as_no_longer_needed $SUSPECT_4
  164. $SUSPECT_4 = -1
  165. if
  166. 075C: does_blip_exist $SUSPECT_4M
  167. then
  168. 0164: remove_blip $SUSPECT_4M
  169. end
  170. end
  171. end
  172. if
  173. $SUSPECT_5 <> -1
  174. then
  175. if
  176. 0118: is_char_dead $SUSPECT_5
  177. then
  178. 0@ += 1
  179. 01C2: mark_char_as_no_longer_needed $SUSPECT_5
  180. $SUSPECT_5 = -1
  181. if
  182. 075C: does_blip_exist $SUSPECT_5M
  183. then
  184. 0164: remove_blip $SUSPECT_5M
  185. end
  186. end
  187. end
  188. if
  189. $SUSPECT_6 <> -1
  190. then
  191. if
  192. 0118: is_char_dead $SUSPECT_6
  193. then
  194. 0@ += 1
  195. 01C2: mark_char_as_no_longer_needed $SUSPECT_6
  196. $SUSPECT_6 = -1
  197. if
  198. 075C: does_blip_exist $SUSPECT_6M
  199. then
  200. 0164: remove_blip $SUSPECT_6M
  201. end
  202. end
  203. end
  204. if
  205. $SUSPECT_7 <> -1
  206. then
  207. if
  208. 0118: is_char_dead $SUSPECT_7
  209. then
  210. 0@ += 1
  211. 01C2: mark_char_as_no_longer_needed $SUSPECT_7
  212. $SUSPECT_7 = -1
  213. if
  214. 075C: does_blip_exist $SUSPECT_7M
  215. then
  216. 0164: remove_blip $SUSPECT_7M
  217. end
  218. end
  219. end
  220. if
  221. $SUSPECT_8 <> -1
  222. then
  223. if
  224. 0118: is_char_dead $SUSPECT_8
  225. then
  226. 0@ += 1
  227. 01C2: mark_char_as_no_longer_needed $SUSPECT_8
  228. $SUSPECT_8 = -1
  229. if
  230. 075C: does_blip_exist $SUSPECT_8M
  231. then
  232. 0164: remove_blip $SUSPECT_8M
  233. end
  234. end
  235. end
  236. if
  237. $SUSPECT_9 <> -1
  238. then
  239. if
  240. 0118: is_char_dead $SUSPECT_9
  241. then
  242. 0@ += 1
  243. 01C2: mark_char_as_no_longer_needed $SUSPECT_9
  244. $SUSPECT_9 = -1
  245. if
  246. 075C: does_blip_exist $SUSPECT_9M
  247. then
  248. 0164: remove_blip $SUSPECT_9M
  249. end
  250. end
  251. end
  252. if
  253. 003C: $NUM_SUSPECTS == 0@
  254. then
  255. 0@ = 0
  256. $NUM_SUSPECTS = -1
  257. $Are_All_Suspects_Dead = true
  258. end
  259. end
  260. end
  261. end
  262.  
  263. :SUSSPOT // Creates marker if suspects spotted
  264. 03A4: script_name 'SUSSPOT'
  265. 0@ = false
  266. while true
  267. wait 0
  268. if
  269. 0256: is_player_playing $PLAYER_CHAR
  270. then
  271. if
  272. $ONMISSION == 1
  273. then
  274. if and
  275. $Is_All_Sus_Created == true
  276. $Are_All_Suspects_Dead == false
  277. then
  278. if and
  279. 0@ == false
  280. 0364: has_char_spotted_char $PLAYER_ACTOR char $SUSPECT_1
  281. then
  282. 0@ = true
  283. 0187: add_blip_for_char $SUSPECT_1 store_to $SUSPECT_1M
  284. 0168: change_blip_scale $SUSPECT_1M to 2
  285. 07E0: set_blip_as_friendly $SUSPECT_1M to 0
  286. if
  287. $SUSPECT_2 <> -1
  288. then
  289. 0187: add_blip_for_char $SUSPECT_2 store_to $SUSPECT_2M
  290. 0168: change_blip_scale $SUSPECT_2M to 2
  291. 07E0: set_blip_as_friendly $SUSPECT_2M to 0
  292. if
  293. $SUSPECT_3 <> -1
  294. then
  295. 0187: add_blip_for_char $SUSPECT_3 store_to $SUSPECT_3M
  296. 0168: change_blip_scale $SUSPECT_3M to 2
  297. 07E0: set_blip_as_friendly $SUSPECT_3M to 0
  298. if
  299. $SUSPECT_4 <> -1
  300. then
  301. 0187: add_blip_for_char $SUSPECT_4 store_to $SUSPECT_4M
  302. 0168: change_blip_scale $SUSPECT_4M to 2
  303. 07E0: set_blip_as_friendly $SUSPECT_4M to 0
  304. if
  305. $SUSPECT_5 <> -1
  306. then
  307. 0187: add_blip_for_char $SUSPECT_5 store_to $SUSPECT_5M
  308. 0168: change_blip_scale $SUSPECT_5M to 2
  309. 07E0: set_blip_as_friendly $SUSPECT_5M to 0
  310. if
  311. $SUSPECT_6 <> -1
  312. then
  313. 0187: add_blip_for_char $SUSPECT_6 store_to $SUSPECT_6M
  314. 0168: change_blip_scale $SUSPECT_6M to 2
  315. 07E0: set_blip_as_friendly $SUSPECT_6M to 0
  316. if
  317. $SUSPECT_7 <> -1
  318. then
  319. 0187: add_blip_for_char $SUSPECT_7 store_to $SUSPECT_7M
  320. 0168: change_blip_scale $SUSPECT_7M to 2
  321. 07E0: set_blip_as_friendly $SUSPECT_7M to 0
  322. if
  323. $SUSPECT_8 <> -1
  324. then
  325. 0187: add_blip_for_char $SUSPECT_8 store_to $SUSPECT_8M
  326. 0168: change_blip_scale $SUSPECT_8M to 2
  327. 07E0: set_blip_as_friendly $SUSPECT_8M to 0
  328. if
  329. $SUSPECT_9 <> -1
  330. then
  331. 0187: add_blip_for_char $SUSPECT_9 store_to $SUSPECT_9M
  332. 0168: change_blip_scale $SUSPECT_9M to 2
  333. 07E0: set_blip_as_friendly $SUSPECT_9M to 0
  334. end
  335. end
  336. end
  337. end
  338. end
  339. end
  340. end
  341. end
  342. end
  343. else
  344. if and
  345. $Is_All_Sus_Created == false
  346. $Are_All_Suspects_Dead == true
  347. then
  348. 0@ = false
  349. end
  350. end
  351. end
  352. end
  353. end
  354.  
  355.  
  356. //-------------Mission 0---------------
  357. // put your missions here
  358.  
  359. :SHOOTTT
  360. 03A4: script_name 'SHOOTTT'
  361. gosub @SHOOTTT_MAIN
  362. if
  363. 0112: has_deatharrest_been_executed
  364. then
  365. gosub @SHOOTTT_FAIL
  366. end
  367. gosub @SHOOTTT_CLEANUP
  368. 004E: terminate_this_script
  369. :SHOOTTT_MAIN
  370. 0317: register_mission_given
  371. repeat
  372. 0208: generate_random_float_in_range -80.0 80.0 store_to 0@
  373. 0208: generate_random_float_in_range -80.0 80.0 store_to 1@
  374. 04C4: get_offset_from_char_in_world_coords $PLAYER_ACTOR offset 0@ 1@ 1.0 store_to $Temp_X $Temp_Y $Temp_Z
  375. wait 0
  376. until 80C2: NOT is_point_on_screen $Temp_X $Temp_Y $Temp_Z radius 5.0
  377. 0209: generate_random_int_in_range 2 10 store_to $NUM_SUSPECTS // number of suspects
  378. 02C0: get_closest_char_node $Temp_X $Temp_Y $Temp_Z store_to $Temp_X $Temp_Y $Temp_Z
  379. if
  380. $NUM_SUSPECTS > 0
  381. then
  382. 0376: create_random_char $Temp_X $Temp_Y $Temp_Z store_to $SUSPECT_1
  383. end
  384. if
  385. $NUM_SUSPECTS > 1
  386. then
  387. 0376: create_random_char $Temp_X $Temp_Y $Temp_Z store_to $SUSPECT_2
  388. end
  389. if
  390. $NUM_SUSPECTS > 2
  391. then
  392. 0376: create_random_char $Temp_X $Temp_Y $Temp_Z store_to $SUSPECT_3
  393. end
  394. if
  395. $NUM_SUSPECTS > 3
  396. then
  397. 0376: create_random_char $Temp_X $Temp_Y $Temp_Z store_to $SUSPECT_4
  398. end
  399. if
  400. $NUM_SUSPECTS > 4
  401. then
  402. 0376: create_random_char $Temp_X $Temp_Y $Temp_Z store_to $SUSPECT_5
  403. end
  404. if
  405. $NUM_SUSPECTS > 5
  406. then
  407. 0376: create_random_char $Temp_X $Temp_Y $Temp_Z store_to $SUSPECT_6
  408. end
  409. if
  410. $NUM_SUSPECTS > 6
  411. then
  412. 0376: create_random_char $Temp_X $Temp_Y $Temp_Z store_to $SUSPECT_7
  413. end
  414. if
  415. $NUM_SUSPECTS > 7
  416. then
  417. 0376: create_random_char $Temp_X $Temp_Y $Temp_Z store_to $SUSPECT_8
  418. end
  419. if
  420. $NUM_SUSPECTS > 8
  421. then
  422. 0376: create_random_char $Temp_X $Temp_Y $Temp_Z store_to $SUSPECT_9
  423. end
  424. 0247: request_model #COLT45
  425. 0247: request_model #SILENCED
  426. 0247: request_model #DESERT_EAGLE
  427. 0247: request_model #CHROMEGUN
  428. 0247: request_model #SAWNOFF
  429. 0247: request_model #SHOTGSPA
  430. 0247: request_model #MICRO_UZI
  431. 0247: request_model #MP5LNG
  432. 0247: request_model #AK47
  433. 038B: load_all_models_now
  434. // Weapon and behavior
  435. if
  436. $NUM_SUSPECTS > 0
  437. then
  438. 0209: generate_random_int_in_range 22 31 store_to 0@
  439. 01B2: give_weapon_to_char $SUSPECT_1 weapon 0@ ammo 200
  440. 0433: set_char_is_chris_criminal $SUSPECT_1 to 1
  441. 07DD: set_char_shoot_rate $SUSPECT_1 to 80
  442. 081A: set_char_weapon_skill $SUSPECT_1 to 1
  443. 077A: set_char_relationship $SUSPECT_1 relationship 4 to_ped_type 0
  444. 077A: set_char_relationship $SUSPECT_1 relationship 4 to_ped_type 4
  445. 077A: set_char_relationship $SUSPECT_1 relationship 4 to_ped_type 5
  446. 077A: set_char_relationship $SUSPECT_1 relationship 4 to_ped_type 6
  447. end
  448. if
  449. $NUM_SUSPECTS > 1
  450. then
  451. 0209: generate_random_int_in_range 22 31 store_to 0@
  452. 01B2: give_weapon_to_char $SUSPECT_2 weapon 0@ ammo 200
  453. 0433: set_char_is_chris_criminal $SUSPECT_2 to 1
  454. 07DD: set_char_shoot_rate $SUSPECT_2 to 80
  455. 081A: set_char_weapon_skill $SUSPECT_2 to 1
  456. 077A: set_char_relationship $SUSPECT_2 relationship 4 to_ped_type 0
  457. 077A: set_char_relationship $SUSPECT_2 relationship 4 to_ped_type 4
  458. 077A: set_char_relationship $SUSPECT_2 relationship 4 to_ped_type 5
  459. 077A: set_char_relationship $SUSPECT_2 relationship 4 to_ped_type 6
  460. end
  461. if
  462. $NUM_SUSPECTS > 2
  463. then
  464. 0209: generate_random_int_in_range 22 31 store_to 0@
  465. 01B2: give_weapon_to_char $SUSPECT_3 weapon 0@ ammo 200
  466. 0433: set_char_is_chris_criminal $SUSPECT_3 to 1
  467. 07DD: set_char_shoot_rate $SUSPECT_3 to 80
  468. 081A: set_char_weapon_skill $SUSPECT_3 to 1
  469. 077A: set_char_relationship $SUSPECT_3 relationship 4 to_ped_type 0
  470. 077A: set_char_relationship $SUSPECT_3 relationship 4 to_ped_type 4
  471. 077A: set_char_relationship $SUSPECT_3 relationship 4 to_ped_type 5
  472. 077A: set_char_relationship $SUSPECT_3 relationship 4 to_ped_type 6
  473. end
  474. if
  475. $NUM_SUSPECTS > 3
  476. then
  477. 0209: generate_random_int_in_range 22 31 store_to 0@
  478. 01B2: give_weapon_to_char $SUSPECT_4 weapon 0@ ammo 200
  479. 0433: set_char_is_chris_criminal $SUSPECT_4 to 1
  480. 07DD: set_char_shoot_rate $SUSPECT_4 to 80
  481. 081A: set_char_weapon_skill $SUSPECT_4 to 1
  482. 077A: set_char_relationship $SUSPECT_4 relationship 4 to_ped_type 0
  483. 077A: set_char_relationship $SUSPECT_4 relationship 4 to_ped_type 4
  484. 077A: set_char_relationship $SUSPECT_4 relationship 4 to_ped_type 5
  485. 077A: set_char_relationship $SUSPECT_4 relationship 4 to_ped_type 6
  486. end
  487. if
  488. $NUM_SUSPECTS > 4
  489. then
  490. 0209: generate_random_int_in_range 22 31 store_to 0@
  491. 01B2: give_weapon_to_char $SUSPECT_5 weapon 0@ ammo 200
  492. 0433: set_char_is_chris_criminal $SUSPECT_5 to 1
  493. 07DD: set_char_shoot_rate $SUSPECT_5 to 80
  494. 081A: set_char_weapon_skill $SUSPECT_5 to 1
  495. 077A: set_char_relationship $SUSPECT_5 relationship 4 to_ped_type 0
  496. 077A: set_char_relationship $SUSPECT_5 relationship 4 to_ped_type 4
  497. 077A: set_char_relationship $SUSPECT_5 relationship 4 to_ped_type 5
  498. 077A: set_char_relationship $SUSPECT_5 relationship 4 to_ped_type 6
  499. end
  500. if
  501. $NUM_SUSPECTS > 5
  502. then
  503. 0209: generate_random_int_in_range 22 31 store_to 0@
  504. 01B2: give_weapon_to_char $SUSPECT_6 weapon 0@ ammo 200
  505. 0433: set_char_is_chris_criminal $SUSPECT_6 to 1
  506. 07DD: set_char_shoot_rate $SUSPECT_6 to 80
  507. 081A: set_char_weapon_skill $SUSPECT_6 to 1
  508. 077A: set_char_relationship $SUSPECT_6 relationship 4 to_ped_type 0
  509. 077A: set_char_relationship $SUSPECT_6 relationship 4 to_ped_type 4
  510. 077A: set_char_relationship $SUSPECT_6 relationship 4 to_ped_type 5
  511. 077A: set_char_relationship $SUSPECT_6 relationship 4 to_ped_type 6
  512. end
  513. if
  514. $NUM_SUSPECTS > 6
  515. then
  516. 0209: generate_random_int_in_range 22 31 store_to 0@
  517. 01B2: give_weapon_to_char $SUSPECT_7 weapon 0@ ammo 200
  518. 0433: set_char_is_chris_criminal $SUSPECT_7 to 1
  519. 07DD: set_char_shoot_rate $SUSPECT_7 to 80
  520. 081A: set_char_weapon_skill $SUSPECT_7 to 1
  521. 077A: set_char_relationship $SUSPECT_7 relationship 4 to_ped_type 0
  522. 077A: set_char_relationship $SUSPECT_7 relationship 4 to_ped_type 4
  523. 077A: set_char_relationship $SUSPECT_7 relationship 4 to_ped_type 5
  524. 077A: set_char_relationship $SUSPECT_7 relationship 4 to_ped_type 6
  525. end
  526. if
  527. $NUM_SUSPECTS > 7
  528. then
  529. 0209: generate_random_int_in_range 22 31 store_to 0@
  530. 01B2: give_weapon_to_char $SUSPECT_8 weapon 0@ ammo 200
  531. 0433: set_char_is_chris_criminal $SUSPECT_8 to 1
  532. 07DD: set_char_shoot_rate $SUSPECT_8 to 80
  533. 081A: set_char_weapon_skill $SUSPECT_8 to 1
  534. 077A: set_char_relationship $SUSPECT_8 relationship 4 to_ped_type 0
  535. 077A: set_char_relationship $SUSPECT_8 relationship 4 to_ped_type 4
  536. 077A: set_char_relationship $SUSPECT_8 relationship 4 to_ped_type 5
  537. 077A: set_char_relationship $SUSPECT_8 relationship 4 to_ped_type 6
  538. end
  539. if
  540. $NUM_SUSPECTS > 8
  541. then
  542. 0209: generate_random_int_in_range 22 31 store_to 0@
  543. 01B2: give_weapon_to_char $SUSPECT_9 weapon 0@ ammo 200
  544. 0433: set_char_is_chris_criminal $SUSPECT_9 to 1
  545. 07DD: set_char_shoot_rate $SUSPECT_9 to 80
  546. 081A: set_char_weapon_skill $SUSPECT_9 to 1
  547. 077A: set_char_relationship $SUSPECT_9 relationship 4 to_ped_type 0
  548. 077A: set_char_relationship $SUSPECT_9 relationship 4 to_ped_type 4
  549. 077A: set_char_relationship $SUSPECT_9 relationship 4 to_ped_type 5
  550. 077A: set_char_relationship $SUSPECT_9 relationship 4 to_ped_type 6
  551. end
  552. 018A: add_blip_for_coord $Temp_X $Temp_Y $Temp_Z store_to 1@
  553. 08FB: set_coord_blip_appearance 1@ to 2
  554. 0AD1: print_formatted_now "Get to the ~r~crime scene" time 3000
  555. $Is_All_Sus_Created = true
  556. $Are_All_Suspects_Dead = false
  557. while true
  558. wait 0
  559. if
  560. 0256: is_player_playing $PLAYER_CHAR
  561. then
  562. if
  563. 00FE: locate_char_any_means_3d $PLAYER_ACTOR coord $Temp_X $Temp_Y $Temp_Z radius 185.0 185.0 70.0 sphere 0
  564. then
  565. if
  566. 00FE: locate_char_any_means_3d $PLAYER_ACTOR coord $Temp_X $Temp_Y $Temp_Z radius 150.0 150.0 70.0 sphere 0
  567. then
  568. if
  569. $Are_All_Suspects_Dead == true
  570. then
  571. goto @SHOOTTT_PASSED
  572. end
  573. else
  574. 0AD1: print_formatted_now "~r~Any further and you will leave the scene." time 100
  575. end
  576. else
  577. goto @SHOOTTT_FAIL
  578. end
  579. else
  580. goto @SHOOTTT_FAIL
  581. end
  582. end
  583.  
  584. :SHOOTTT_PASSED
  585. 0394: play_mission_passed_tune 2
  586. 0209: generate_random_int_in_range 500 5000 store_to 0@
  587. Player.Money($PLAYER_CHAR) += 0@
  588. 01E3: show_text_1number_styled GXT 'M_PASS' number 0@ time 5000 style 1 // MISSION PASSED!~n~~w~$~1~
  589. // This subroutine is executed when the mission is passed.
  590. // Give the rewards, and make new missions available if needed.
  591. return
  592.  
  593. :SHOOTTT_FAIL
  594. 00BA: show_text_styled GXT 'M_FAIL' time 5000 style 1 // ~r~MISSION FAILED!
  595. // This subroutine is executed when the mission fails.
  596. return
  597.  
  598. :SHOOTTT_CLEANUP
  599. $ONMISSION = 0
  600. $Is_All_Sus_Created = false
  601. $Are_All_Suspects_Dead = false
  602. 0249: mark_model_as_no_longer_needed #COLT45
  603. 0249: mark_model_as_no_longer_needed #SILENCED
  604. 0249: mark_model_as_no_longer_needed #DESERT_EAGLE
  605. 0249: mark_model_as_no_longer_needed #CHROMEGUN
  606. 0249: mark_model_as_no_longer_needed #SAWNOFF
  607. 0249: mark_model_as_no_longer_needed #SHOTGSPA
  608. 0249: mark_model_as_no_longer_needed #MICRO_UZI
  609. 0249: mark_model_as_no_longer_needed #MP5LNG
  610. 0249: mark_model_as_no_longer_needed #AK47
  611. 0164: remove_blip 1@
  612. // This subroutine is always executed at the end of the mission, regardless the outcome.
  613. // This is the place to unload models etc.
  614. 00D8: mission_has_finished
  615. return
  616.  
  617.  
  618. //-------------External script 0---------------
  619. // put your external scripts here
  620.  
  621. //:POLICE
  622. //if
  623. // 0256: is_player_playing $PLAYER_CHAR
  624. //then
  625. // if
  626. // 00DF: is_char_in_any_car 0@
  627. // then
  628. // 00D9: store_car_char_is_in 0@ store_to 1@
  629. // if
  630. // 00DB: is_char_in_car 0@ car 1@
  631. // then
  632. //
  633. // while 00DB: is_char_in_car 0@ car 1@
  634. // wait 0
  635. // if or
  636. // 0117: is_player_dead $PLAYER_CHAR
  637. // 0118: is_char_dead 0@
  638. // then
  639. // continue
  640. // end
  641. // if
  642. // 0038: $PURSUIT_Mode == true
  643. // then
  644. // 0397: switch_car_siren 1@ to 1
  645. // 00AD: set_car_cruise_speed 1@ to 38.0
  646. // 0704: car_goto_coordinates_racing 1@ coords $TempX $TempY $TempZ
  647. // end
  648. // end
  649. // goto @POLICE
  650. //
  651. // end
  652. // end
  653. //end
  654. //034F: remove_char_elegantly 0@
  655. //004E: terminate_this_script
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement