bad_boy__

example merge

Jun 16th, 2012
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.55 KB | None | 0 0
  1. :ACTOR1
  2. thread "ACTOR1"
  3.  
  4. 0247: load_model #LAPD1
  5. 0247: load_model #SILENCED
  6. 038B: load_requested_models
  7. 5@ = 32000
  8.  
  9. :MAIN
  10. wait 5@
  11. 077E: get_active_interior_to 0@
  12. if and
  13. 0256: player $PLAYER_CHAR defined
  14. 0@ == 0
  15. then
  16. 00A0: store_actor $PLAYER_ACTOR position_to 1@ 2@ 3@
  17. 1@ += 10.0
  18. 2@ += 2.0
  19. 009A: 4@ = create_actor_pedtype 6 model #LAPD1 at 1@ 2@ 3@
  20. 01B2: give_actor 4@ weapon 23 ammo 120
  21. 07A5: AS_actor 4@ attack_actor $PLAYER_ACTOR -1 ms
  22.  
  23. while true
  24. wait 0
  25. if or
  26. 8118: not actor 4@ dead
  27. 8256: not player $PLAYER_CHAR defined
  28. then
  29. 01C2: remove_references_to_actor 4@
  30.  
  31. if
  32. 5@ == 32000
  33. then
  34. 5@ = 52000
  35. end
  36.  
  37. if
  38. 5@ == 52000
  39. then
  40. 5@ = 32000
  41. end
  42. end
  43. end
  44. end
  45.  
  46. jump @MAIN
  47.  
  48.  
  49. :ACTOR2
  50. thread "ACTOR2"
  51.  
  52. 0247: load_model #SWAT
  53. 0247: load_model #SWATVAN
  54. 9@ = 12000
  55.  
  56. :MAIN2
  57. wait 9@
  58. 077E: get_active_interior_to 0@
  59. if and
  60. 0256: player $PLAYER_CHAR defined
  61. 0@ == 0
  62. then
  63. 00A0: store_actor $PLAYER_ACTOR position_to 1@ 2@ 3@
  64. 1@ += 15.0
  65. 2@ += 12.0
  66. 085A: spawn_emergency_vehicle_model #SWATVAN on_street_nearest_to 1@ 2@ 3@
  67. 009A: 4@ = create_actor_pedtype 6 model #SWAT at 1@ 2@ 3@
  68. for 10@ = 0 to 35584 step 256
  69. 0085: 11@ = 10@
  70. for 12@ = 0 to 127
  71. if and
  72. 056E: car 11@ defined
  73. 0137: car 11@ model == #SWATVAN
  74. then
  75. 05CB: AS_actor 4@ enter_car 11@ as_driver 10000 ms
  76. 00A7: car 11@ drive_to 0.0 0.0 0.0
  77. break
  78. end
  79. 000A: 11@ += 1
  80. end
  81. end
  82.  
  83. repeat
  84. wait 0
  85. 00A0: store_actor $PLAYER_ACTOR position_to 1@ 2@ 3@
  86. until 81AD: not car 11@ sphere 0 near_point 1@ 2@ radius 50.0 50.0
  87.  
  88. 01C2: remove_references_to_actor 4@
  89. 01C3: remove_references_to_car 11@
  90.  
  91. if
  92. 5@ == 12000
  93. then
  94. 5@ = 22000
  95. end
  96.  
  97. if
  98. 5@ == 22000
  99. then
  100. 5@ = 12000
  101. end
  102. end
  103.  
  104. jump @MAIN2
  105.  
  106.  
  107. :ACTOR12
  108. thread "ACTOR12"
  109.  
  110. // First the things that need to be loaded
  111. 0247: load_model #SWAT
  112. 0247: load_model #SWATVAN
  113. 0247: load_model #LAPD1
  114. 0247: load_model #SILENCED
  115.  
  116. // Then the integers that are going to be waits
  117. 1@ = 32000
  118. 2@ = 12000
  119.  
  120. // Extra flags we need to add
  121. 3@ = 0
  122. 4@ = 0
  123.  
  124. // Special gosub flag
  125. 5@ = 0
  126.  
  127. // We are going to need timers, because we can't use 2 waits at the same time
  128. 32@ = 0
  129. 33@ = 0
  130.  
  131. :MAIN
  132. // The flags function checks if enough time has passed
  133. gosub @FLAGS
  134. 077E: get_active_interior_to 0@
  135.  
  136. if and
  137. 0256: player $PLAYER_CHAR defined
  138. 0@ == 0
  139. then
  140. if
  141. 3@ == 1
  142. then
  143. jump @ACTOR1
  144. end
  145.  
  146. if
  147. 4@ == 1
  148. then
  149. jump @ACTOR2
  150. end
  151. end
  152.  
  153. :ACTOR1
  154. 00A0: store_actor $PLAYER_ACTOR position_to 6@ 7@ 8@
  155. 6@ += 10.0
  156. 7@ += 2.0
  157. 009A: 9@ = create_actor_pedtype 6 model #LAPD1 at 6@ 7@ 8@
  158. 01B2: give_actor 9@ weapon 23 ammo 120
  159. 07A5: AS_actor 9@ attack_actor $PLAYER_ACTOR -1 ms
  160.  
  161. if
  162. 5@ == 0
  163. then
  164. if
  165. 4@ == 1
  166. then
  167. 5@ = 1
  168. gosub @ACTOR2
  169.  
  170. :LOOP1
  171. wait 0
  172. 00A0: store_actor $PLAYER_ACTOR position_to 6@ 7@ 8@
  173. if or
  174. 8256: not player $PLAYER_CHAR defined
  175. 81AD: not car 12@ sphere 0 near_point 1@ 2@ radius 50.0 50.0
  176. then
  177. 01C2: remove_references_to_actor 10@
  178. 01C3: remove_references_to_car 12@
  179. jump @NEXT1
  180. end
  181.  
  182. if or
  183. 8256: not player $PLAYER_CHAR defined
  184. 0118: not actor 9@ dead
  185. then
  186. 01C2: remove_references_to_actor 9@
  187. jump @NEXT11
  188. end
  189. jump @LOOP1
  190.  
  191. :NEXT1
  192. wait 0
  193. if or
  194. 8256: not player $PLAYER_CHAR defined
  195. 0118: not actor 9@ dead
  196. jf @NEXT1
  197. 01C2: remove_references_to_actor 9@
  198. jump @NEXT111
  199.  
  200. :NEXT11
  201. 00A0: store_actor $PLAYER_ACTOR position_to 6@ 7@ 8@
  202. if or
  203. 8256: not player $PLAYER_CHAR defined
  204. 81AD: not car 12@ sphere 0 near_point 1@ 2@ radius 50.0 50.0
  205. jf @NEXT11
  206. 01C2: remove_references_to_actor 10@
  207. 01C3: remove_references_to_car 12@
  208. jump @NEXT111
  209.  
  210. :NEXT111
  211. if
  212. 2@ == 12000
  213. then
  214. 2@ = 22000
  215. end
  216.  
  217. if
  218. 2@ == 22000
  219. then
  220. 2@ = 12000
  221. end
  222.  
  223. if
  224. 1@ == 32000
  225. then
  226. 1@ = 52000
  227. end
  228.  
  229. if
  230. 1@ == 52000
  231. then
  232. 1@ = 32000
  233. end
  234.  
  235. 32@ = 0
  236. 33@ = 0
  237. else
  238. :LOOP11
  239. wait 0
  240. if or
  241. 8256: not player $PLAYER_CHAR defined
  242. 0118: not actor 9@ dead
  243. then
  244. 01C2: remove_references_to_actor 9@
  245. jump @NEXT1111
  246. end
  247.  
  248. gosub @FLAGS
  249. if
  250. 4@ == 1
  251. then
  252. gosub @ACTOR2
  253. jump @LOOP1
  254. end
  255.  
  256. :NEXT1111
  257. if
  258. 1@ == 32000
  259. then
  260. 1@ = 52000
  261. end
  262.  
  263. if
  264. 1@ == 52000
  265. then
  266. 1@ = 32000
  267. end
  268.  
  269. 32@ = 0
  270. 33@ = 0
  271. end
  272. else
  273. return
  274. end
  275. jump @MAIN
  276.  
  277. :ACTOR2
  278. 00A0: store_actor $PLAYER_ACTOR position_to 6@ 7@ 8@
  279. 6@ += 15.0
  280. 7@ += 12.0
  281. 085A: spawn_emergency_vehicle_model #SWATVAN on_street_nearest_to 6@ 7@ 8@
  282. 009A: 10@ = create_actor_pedtype 6 model #SWAT at 6@ 7@ 8@
  283. for 11@ = 0 to 35584 step 256
  284. 0085: 12@ = 11@
  285. for 13@ = 0 to 127
  286. if and
  287. 056E: car 12@ defined
  288. 0137: car 12@ model == #SWATVAN
  289. then
  290. 05CB: AS_actor 10@ enter_car 12@ as_driver 10000 ms
  291. 00A7: car 12@ drive_to 0.0 0.0 0.0
  292. break
  293. end
  294. 000A: 12@ += 1
  295. end
  296. end
  297.  
  298. if
  299. 5@ == 0
  300. then
  301. // Basically the same as @ACTOR1 but the other way around
  302.  
  303.  
  304. :FLAGS
  305. if
  306. 001D: 32@ > 1@
  307. then
  308. 3@ = 1
  309. end
  310.  
  311. if
  312. 001D: 33@ > 2@
  313. then
  314. 4@ = 1
  315. end
  316. return
Advertisement
Add Comment
Please, Sign In to add comment