Advertisement
Guest User

Weapons GTA SA

a guest
Jun 23rd, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.99 KB | None | 0 0
  1. {$CLEO}
  2. 0000:
  3.  
  4. REPEAT
  5. wait 250
  6. UNTIL 0256: player $PLAYER_CHAR defined
  7.  
  8. CONST
  9. AMMU_SELLER_WEAPON = 25 // WEAPON_PISTOL
  10. LAPD1_WEAPON = 22 // WEAPON_PISTOL
  11. SFPD1_WEAPON = 22 // WEAPON_PISTOL
  12. LVPD1_WEAPON = 22 // WEAPON_PISTOL
  13. CSHER_WEAPON = 22 // WEAPON_PISTOL
  14. LAPDM1_WEAPON = 22 // WEAPON_PISTOL
  15.  
  16. SWAT_WEAPON = 29 // WEAPON_MICRO_UZI
  17. FBI_WEAPON = 30 // WEAPON_MP5
  18. ARMY_WEAPON = 31 // WEAPON_M4
  19. NSA_WEAPON = 30 // WEAPON_AK47
  20. DSHER_WEAPON = 24 // WEAPON_PISTOL
  21. END
  22.  
  23. 0781: get_weapon_with_ID AMMU_SELLER_WEAPON model_to 4@
  24. 0781: get_weapon_with_ID LAPD1_WEAPON model_to 5@
  25. 0781: get_weapon_with_ID SFPD1_WEAPON model_to 6@
  26. 0781: get_weapon_with_ID LVPD1_WEAPON model_to 7@
  27. 0781: get_weapon_with_ID CSHER_WEAPON model_to 8@
  28. 0781: get_weapon_with_ID LAPDM1_WEAPON model_to 9@
  29. 0781: get_weapon_with_ID SWAT_WEAPON model_to 10@
  30. 0781: get_weapon_with_ID FBI_WEAPON model_to 11@
  31. 0781: get_weapon_with_ID ARMY_WEAPON model_to 12@
  32. 0781: get_weapon_with_ID NSA_WEAPON model_to 13@
  33. 0781: get_weapon_with_ID DSHER_WEAPON model_to 14@
  34.  
  35. 0247: load_model 4@
  36. 0247: load_model 5@
  37. 0247: load_model 6@
  38. 0247: load_model 7@
  39. 0247: load_model 8@
  40. 0247: load_model 9@
  41. 0247: load_model 10@
  42. 0247: load_model 11@
  43. 0247: load_model 12@
  44. 0247: load_model 13@
  45. 0247: load_model 14@
  46. 038B: load_requested_models
  47.  
  48. WHILE TRUE
  49. wait 0
  50. 00A0: store_actor $PLAYER_ACTOR position_to 0@ 1@ 2@
  51. IF 0AE1: 3@ = random_actor_near_point 0@ 1@ 2@ in_radius 750.0 find_next 0 pass_deads 1
  52. THEN
  53. REPEAT
  54. 0A96: 4@ = actor 3@ struct
  55. 4@ += 0x4A4
  56. 0A8D: 4@ = read_memory 4@ size 4 virtual_protect 0 // CPed.m_nCreatedBy 1 - game ; 2 - script
  57.  
  58. 0665: get_actor 3@ model_to 5@
  59. 0470: 6@ = actor 3@ current_weapon
  60. IF 5@ == #WMYAMMO //
  61. THEN
  62. IF OR
  63. 0457: player $PLAYER_CHAR aiming_at_actor 3@
  64. 02E0: actor $PLAYER_ACTOR firing_weapon
  65. 031D: actor $AMMU_SELLER hit_by_weapon 57
  66. THEN
  67. IF 6@ <> AMMU_SELLER_WEAPON
  68. THEN
  69. 0781: get_weapon_with_ID AMMU_SELLER_WEAPON model_to 7@
  70. IF 0248: model 7@ available
  71. THEN
  72. 048F: actor 3@ remove_weapons
  73. 01B2: give_actor 3@ weapon AMMU_SELLER_WEAPON ammo 9999
  74. // 0249: release_model 7@
  75. END
  76. END
  77. ELSE
  78. IF 5@ == #LAPD1
  79. THEN
  80. IF 6@ <> LAPD1_WEAPON
  81. THEN
  82. 0781: get_weapon_with_ID LAPD1_WEAPON model_to 7@
  83. IF 0248: model 7@ available
  84. THEN
  85. 048F: actor 3@ remove_weapons
  86. 01B2: give_actor 3@ weapon LAPD1_WEAPON ammo 9999
  87. // 0249: release_model 7@
  88. END
  89. END
  90. ELSE
  91. IF 5@ == #SFPD1
  92. THEN
  93. IF 6@ <> SFPD1_WEAPON
  94. THEN
  95. 0781: get_weapon_with_ID SFPD1_WEAPON model_to 7@
  96. IF 0248: model 7@ available
  97. THEN
  98. 048F: actor 3@ remove_weapons
  99. 01B2: give_actor 3@ weapon SFPD1_WEAPON ammo 9999
  100. // 0249: release_model 7@
  101. END
  102. END
  103. ELSE
  104. IF 5@ == #LVPD1
  105. THEN
  106. IF 6@ <> LVPD1_WEAPON
  107. THEN
  108. 0781: get_weapon_with_ID LVPD1_WEAPON model_to 7@
  109. IF 0248: model 7@ available
  110. THEN
  111. 048F: actor 3@ remove_weapons
  112. 01B2: give_actor 3@ weapon LVPD1_WEAPON ammo 9999
  113. // 0249: release_model 7@
  114. END
  115. END
  116. ELSE
  117. IF 5@ == #CSHER
  118. THEN
  119. IF 6@ <> CSHER_WEAPON
  120. THEN
  121. 0781: get_weapon_with_ID CSHER_WEAPON model_to 7@
  122. IF 0248: model 7@ available
  123. THEN
  124. 048F: actor 3@ remove_weapons
  125. 01B2: give_actor 3@ weapon CSHER_WEAPON ammo 9999
  126. // 0249: release_model 7@
  127. END
  128. END
  129. ELSE
  130. IF 5@ == #LAPDM1
  131. THEN
  132. IF 6@ <> LAPDM1_WEAPON
  133. THEN
  134. 0781: get_weapon_with_ID LAPDM1_WEAPON model_to 7@
  135. IF 0248: model 7@ available
  136. THEN
  137. 048F: actor 3@ remove_weapons
  138. 01B2: give_actor 3@ weapon LAPDM1_WEAPON ammo 9999
  139. // 0249: release_model 7@
  140. END
  141. END
  142. ELSE
  143. IF 5@ == #SWAT
  144. THEN
  145. IF 6@ <> SWAT_WEAPON
  146. THEN
  147. 0781: get_weapon_with_ID SWAT_WEAPON model_to 7@
  148. IF 0248: model 7@ available
  149. THEN
  150. 048F: actor 3@ remove_weapons
  151. 01B2: give_actor 3@ weapon SWAT_WEAPON ammo 9999
  152. // 0249: release_model 7@
  153. END
  154. END
  155. ELSE
  156. IF 5@ == #FBI
  157. THEN
  158. IF 6@ <> FBI_WEAPON
  159. THEN
  160. 0781: get_weapon_with_ID FBI_WEAPON model_to 7@
  161. IF 0248: model 7@ available
  162. THEN
  163. 048F: actor 3@ remove_weapons
  164. 01B2: give_actor 3@ weapon FBI_WEAPON ammo 9999
  165. // 0249: release_model 7@
  166. END
  167. END
  168. ELSE
  169. IF 5@ == #ARMY
  170. THEN
  171. IF 6@ <> ARMY_WEAPON
  172. THEN
  173. 0781: get_weapon_with_ID ARMY_WEAPON model_to 7@
  174. IF 0248: model 7@ available
  175. THEN
  176. 048F: actor 3@ remove_weapons
  177. 01B2: give_actor 3@ weapon ARMY_WEAPON ammo 9999
  178. // 0249: release_model 7@
  179. END
  180. END
  181. ELSE
  182. IF 5@ == #DSHER
  183. THEN
  184. IF 6@ <> DSHER_WEAPON
  185. THEN
  186. 0781: get_weapon_with_ID DSHER_WEAPON model_to 7@
  187. IF 0248: model 7@ available
  188. THEN
  189. 048F: actor 3@ remove_weapons
  190. 01B2: give_actor 3@ weapon DSHER_WEAPON ammo 9999
  191. // 0249: release_model 7@
  192. END
  193. END
  194. ELSE
  195. IF OR
  196. 5@ == #WMOMIB // NSA
  197. 5@ == #BMYMIB // NSA
  198. THEN
  199. IF 6@ <> LAPD1_WEAPON
  200. THEN
  201. 0781: get_weapon_with_ID LAPD1_WEAPON model_to 7@
  202. IF 0248: model 7@ available
  203. THEN
  204. 048F: actor 3@ remove_weapons
  205. 01B2: give_actor 3@ weapon LAPD1_WEAPON ammo 9999
  206. // 0249: release_model 7@
  207. END
  208. END
  209. END
  210. END
  211. END
  212. END
  213. END
  214. END
  215. END
  216. END
  217. END
  218. END
  219. END
  220. UNTIL 8AE1: NOT 3@ = random_actor_near_point 0@ 1@ 2@ in_radius 750.0 find_next 1 pass_deads 1
  221. END
  222. END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement