Advertisement
Guest User

Untitled

a guest
Dec 15th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.84 KB | None | 0 0
  1. {$CLEO}
  2. 0000:
  3.  
  4. repeat
  5. wait 0
  6. until Samp.Available()
  7. 0B60: convert_game_screen_coords 500.0 375.0 to_window_screen_coords 0@ 1@
  8. if 0AAB: not file_exists "CLEO\HUDset.ini"
  9. then
  10. 0AF1: 0@ "CLEO\HUDset.ini" "POSITION" "POSX"
  11. 0AF1: 1@ "CLEO\HUDset.ini" "POSITION" "POSY"
  12. end
  13.  
  14. 0B34: "chudpos" @chudpos
  15.  
  16. 03F0: enable_text_draw 1
  17. 0B6D: render 31@ = create_font "DS Crystal" height 9 flags 5
  18.  
  19. alloc 10@ 64
  20.  
  21. while true
  22. wait 0
  23. if and
  24. 8BD5: samp is_scoreboard_opened // IF and SET
  25. 0BDB: samp is_chat_visible // IF and SET
  26. then
  27. 0AF0: 0@ "CLEO\HUDset.ini" "POSITION" "POSX"
  28. 0AF0: 1@ "CLEO\HUDset.ini" "POSITION" "POSY"
  29. call @convert_X_size_G_to_W 1 150.0 3@
  30. call @convert_Y_size_G_to_W 1 15.0 4@
  31. call @convert_Y_size_G_to_W 1 5.0 9@
  32. 0470: 2@ = actor $PLAYER_ACTOR current_weapon
  33. call @get_weapon_name_by_id 1 id 2@ to 2@
  34. 0AD3: 10@ = format "%s" 2@
  35. //0B60: convert_game_screen_coords 0@ 1@ to_window_screen_coords 2@ 3@ // Ïåðåâîäèì ýòè êîîðäèíàòû
  36. 0A8E: 17@ = 1@ + -10 // int
  37. 0B6F: render font 31@ draw_text 10@ pos 0@ 17@ color 0xFFFFFFFF
  38. 0470: 2@ = actor $PLAYER_ACTOR current_weapon
  39. if 2@ > 0
  40. then
  41. call @get_CWeapon_m_dwAmmoInClip 0 return: 5@
  42. call @get_CWeapon_m_dwTotalAmmo 0 return: 6@
  43. 000E: 6@ -= 5@
  44. 0AD3: 10@ = format "%d/%d" 5@ 6@
  45. 0B6B: render 7@ = font 31@ draw_text 10@ length
  46. 000A: 0@ += 3@
  47. 000E: 0@ -= 7@
  48. 000E: 0@ -= 2
  49. 0B6F: render font 31@ draw_text 10@ pos 0@ 17@ color 0xFFFFFFFF
  50. 000A: 0@ += 2
  51. 000A: 0@ += 7@
  52. 000E: 0@ -= 3@
  53. end
  54. 1@ += 15
  55. 2@ = Actor.Health($PLAYER_ACTOR)
  56. 0A8E: 18@ = 0@ + -5 // int
  57. if 2@ > 160
  58. then 2@ = 160
  59. end
  60. call @NewHB 6 pos_X 0@ pos_Y 1@ value 2@ size_X 3@ size_Y 4@ thickness 2
  61. 0AD3: 10@ = format "%d" 2@
  62. 000A: 1@ += 9@
  63. 000E: 18@ -= 3
  64. 0B6C: render 8@ = font 31@ draw_height
  65. 0B6B: render 7@ = font 31@ draw_text 10@ length
  66. 8@ /= 2
  67. 000E: 1@ -= 8@
  68. 000E: 18@ -= 7@
  69. 0B6F: render font 31@ draw_text 10@ pos 18@ 1@ color 0xFFFFFFFF
  70. 000A: 18@ += 7@
  71. 000A: 18@ += 3
  72. 000E: 1@ -= 9@
  73. 000A: 1@ += 8@
  74. 1@ -= 15
  75. 000A: 1@ += 4@
  76. 000A: 1@ += 4@
  77. 04DD: 2@ = actor $PLAYER_ACTOR armour
  78. if 2@ > 100
  79. then 2@ = 100
  80. end
  81. call @NewAB 6 pos_X 0@ pos_Y 1@ value 2@ size_X 3@ size_Y 4@ thickness 2
  82. 0AD3: 10@ = format "%d" 2@
  83. 000A: 1@ += 9@
  84. 000E: 18@ -= 3
  85. 0B6C: render 8@ = font 31@ draw_height
  86. 0B6B: render 7@ = font 31@ draw_text 10@ length
  87. 8@ /= 2
  88. 000E: 1@ -= 8@
  89. 000E: 18@ -= 7@
  90. 0B6F: render font 31@ draw_text 10@ pos 18@ 1@ color 0xFFFFFFFF
  91. 000A: 18@ += 7@
  92. 000A: 18@ += 3
  93. 000E: 1@ -= 9@
  94. 000A: 1@ += 8@
  95. 010B: 2@ = player $PLAYER_CHAR money
  96. 0AD3: 10@ = format "$%d" 2@
  97. 0B6B: render 7@ = font 31@ draw_text 10@ length
  98. 000A: 18@ += 3@
  99. 000E: 18@ -= 7@
  100. 000E: 18@ -= 2
  101. 000A: 1@ += 4@
  102. 000A: 1@ -= 2
  103. 0B6F: render font 31@ draw_text 10@ pos 18@ 1@ color 0xFFFFFFFF
  104.  
  105. if 29@ == 1
  106. then
  107. 0B8D: samp set_cursor_mode 1
  108. 0B5E: get_cursor_pos 27@ 28@
  109. 0AF1: write_int 27@ to_ini_file "CLEO\HUDset.ini" "POSITION" "POSX"
  110. 0AF1: write_int 28@ to_ini_file "CLEO\HUDset.ini" "POSITION" "POSY"
  111. if key_down 1
  112. then 29@ = 0
  113. 0B8D: samp set_cursor_mode 0
  114. end
  115. end
  116. end
  117. end
  118.  
  119. :chudpos
  120. 29@ = 1
  121. cmdret
  122.  
  123. :NewHB
  124. var
  125. 0@:int
  126. 1@:int
  127. //2@:int
  128. //3@:int
  129. 4@:int
  130. 5@:int
  131. end
  132. 0B6A: render draw_box_with_border_pos 0@ 1@ size 3@ 4@ color 0xBF6d2121 border_size 5@ border_color 0xBF000000
  133. 008F: 3@ = integer 3@ to_float
  134. 008F: 2@ = integer 2@ to_float
  135. //msg "%.2f %.2f" -1 3@ 2@
  136. 3@ /= 160.0
  137. 0013: 3@ *= 2@
  138. //msg "%.2f %.2f" -1 3@ 2@
  139. 0@ += 5@
  140. 1@ += 5@
  141. 5@ *= 2
  142. 4@ -= 5@
  143. //4@ -= 5@
  144. 0092: 3@ = float 3@ to_integer
  145. 000E: 3@ -= 5@
  146. //000E: 3@ -= 5@
  147. 0B69: render draw_box_pos 0@ 1@ size 3@ 4@ color 0xBFd45151
  148. ret 0
  149. 0884: 0 -762621
  150.  
  151. :NewAB
  152. var
  153. 0@:int
  154. 1@:int
  155. //2@:int
  156. //3@:int
  157. 4@:int
  158. 5@:int
  159. end
  160. 0B6A: render draw_box_with_border_pos 0@ 1@ size 3@ 4@ color 0xBF00738b border_size 5@ border_color 0xBF000000
  161. 008F: 3@ = integer 3@ to_float
  162. 008F: 2@ = integer 2@ to_float
  163. //msg "%.2f %.2f" -1 3@ 2@
  164. 3@ /= 100.0
  165. 0013: 3@ *= 2@
  166. //msg "%.2f %.2f" -1 3@ 2@
  167. 0@ += 5@
  168. 1@ += 5@
  169. 5@ *= 2
  170. 4@ -= 5@
  171. //4@ -= 5@
  172. 0092: 3@ = float 3@ to_integer
  173. 000E: 3@ -= 5@
  174. //000E: 3@ -= 5@
  175. 0B69: render draw_box_pos 0@ 1@ size 3@ 4@ color 0xBF00d3ff
  176. ret 0
  177.  
  178.  
  179. :get_weapon_name_by_id
  180. {
  181. Params:
  182. In: 0@ - WeaponID
  183. Out: 1@ - weaponName
  184. Example: call @get_weapon_name_by_id 1 id 0@ to 1@
  185. }
  186. 0AC6: 1@ = label @weapons offset
  187. 0@ *= 19
  188. 005A: 1@ += 0@ // (int)
  189. ret 1 1@
  190. :weapons
  191. hex
  192. "Fist" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 0 }
  193. "Brass" 20 "Knuckles" 00 00 00 00 00 { 1 }
  194. "Golf" 20 "Club" 00 00 00 00 00 00 00 00 00 00 { 2 }
  195. "Nite" 20 "Stick" 00 00 00 00 00 00 00 00 00 { 3 }
  196. "Knife" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 4 }
  197. "Baseball" 00 00 00 00 00 00 00 00 00 00 00 { 5 }
  198. "Shovel" 00 00 00 00 00 00 00 00 00 00 00 00 00 { 6 }
  199. "Pool" 20 "Cue" 00 00 00 00 00 00 00 00 00 00 00 { 7 }
  200. "Katana" 00 00 00 00 00 00 00 00 00 00 00 00 00 { 8 }
  201. "Chainsaw" 00 00 00 00 00 00 00 00 00 00 00 { 9 }
  202. "Dildo" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 10 }
  203. "Dildo" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 11 }
  204. "Dildo" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 12 }
  205. "Dildo" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 13 }
  206. "Flowers" 00 00 00 00 00 00 00 00 00 00 00 00 { 14 }
  207. "Cane" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 15 }
  208. "Grenade" 00 00 00 00 00 00 00 00 00 00 00 00 { 16 }
  209. "Tear" 20 "Gas" 00 00 00 00 00 00 00 00 00 00 00 { 17 }
  210. "Molotov" 00 00 00 00 00 00 00 00 00 00 00 00 { 18 }
  211. 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 19 }
  212. 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 20 }
  213. 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 21 }
  214. "Pistol" 00 00 00 00 00 00 00 00 00 00 00 00 00 { 22 }
  215. "Silencer" 00 00 00 00 00 00 00 00 00 00 00 { 23 }
  216. "Desert" 20 "Eagle" 00 00 00 00 00 00 00 { 24 }
  217. "Shotgun" 00 00 00 00 00 00 00 00 00 00 00 00 { 25 }
  218. "SawnOff" 00 00 00 00 00 00 00 00 00 00 00 00 { 26 }
  219. "Spas12" 00 00 00 00 00 00 00 00 00 00 00 00 00 { 27 }
  220. "Tec9" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 28 }
  221. "MP5" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 29 }
  222. "AK-47" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 30 }
  223. "M4" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 31 }
  224. "Mac10" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 32 }
  225. "Rifle" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 33 }
  226. "Sniper" 00 00 00 00 00 00 00 00 00 00 00 00 00 { 34 }
  227. "Rocket" 20 "Launcher" 00 00 00 00 { 35 }
  228. "HS" 20 "Rocket" 20 "Launcher" 00 { 36 }
  229. "Flamethrower" 00 00 00 00 00 00 00 { 37 }
  230. "Minigun" 00 00 00 00 00 00 00 00 00 00 00 00 { 38 }
  231. "C4" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 39 }
  232. "Detonator" 00 00 00 00 00 00 00 00 00 00 { 40 }
  233. "Spray" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 41 }
  234. "Fire" 20 "Extinguisher" 00 00 { 42 }
  235. "Camera" 00 00 00 00 00 00 00 00 00 00 00 00 00 { 43 }
  236. "Nightvision" 00 00 00 00 00 00 00 00 { 44 }
  237. "Infrared" 20 "Vision" 00 00 00 00 { 45 }
  238. "Parachute" 00 00 00 00 00 00 00 00 00 00 { 46 }
  239. end
  240.  
  241. :convert_X_size_G_to_W
  242. // 0@ - X game
  243. 0B60: convert_game_screen_coords 100.0 0 to_window_screen_coords 1@ 0
  244. 0@ += 100.0
  245. 0B60: convert_game_screen_coords 0@ 0 to_window_screen_coords 2@ 0
  246. 000E: 2@ -= 1@
  247. ret 1 2@
  248.  
  249. :convert_Y_size_G_to_W
  250. // 0@ - Y game
  251. 0B60: convert_game_screen_coords 0 100.0 to_window_screen_coords 0 1@
  252. 0@ += 100.0
  253. 0B60: convert_game_screen_coords 0 0@ to_window_screen_coords 0 2@
  254. 000E: 2@ -= 1@
  255. ret 1 2@
  256.  
  257.  
  258. :convert_X_size_W_to_G
  259. // 0 - X windows
  260. 0B5F: convert_window_screen_coords 100 0 to_game_screen_coords 1@ 0
  261. 0@ += 100
  262. 0B5F: convert_window_screen_coords 0@ 0 to_game_screen_coords 2@ 0
  263. 000E: 2@ -= 1@
  264. ret 1 2@
  265.  
  266. :convert_Y_size_W_to_G
  267. // 0@ - Y windows
  268. 0B5F: convert_window_screen_coords 0 100 to_game_screen_coords 0 1@
  269. 0@ += 100
  270. 0B5F: convert_window_screen_coords 0 0@ to_game_screen_coords 0 2@
  271. 000E: 2@ -= 1@
  272. ret 1 2@
  273.  
  274. :get_CWeapon_m_dwAmmoInClip
  275. 0A96: 0@ = actor $PLAYER_ACTOR struct
  276. 0A8E: 1@ = 0@ + 0x0718 // CPed.m_cWeaponSlot
  277. 0A8D: 1@ = read_memory 1@ size 1 virtual_protect 0
  278. 1@ *= 0x1C // sizeof(cWeaponSlot)
  279. 0A8E: 2@ = 0@ + 0x5A0 // CPed.m_aclWeaponSlots
  280. 005a: 2@ += 1@
  281. 2@ += 0x8 // CWeapon.m_dwState
  282. 0A8D: 2@ = read_memory 2@ size 4 virtual_protect 0
  283. ret 1 2@
  284.  
  285. :get_CWeapon_m_dwTotalAmmo
  286. 0A96: 0@ = actor $PLAYER_ACTOR struct
  287. 0A8E: 1@ = 0@ + 0x0718 // CPed.m_cWeaponSlot
  288. 0A8D: 1@ = read_memory 1@ size 1 virtual_protect 0
  289. 1@ *= 0x1C // sizeof(cWeaponSlot)
  290. 0A8E: 2@ = 0@ + 0x5A0 // CPed.m_aclWeaponSlots
  291. 005a: 2@ += 1@
  292. 2@ += 0xc // CWeapon.m_dwState
  293. 0A8D: 2@ = read_memory 2@ size 4 virtual_protect 0
  294. ret 1 2@
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement