Advertisement
Guest User

objectFinder.cs

a guest
Nov 25th, 2014
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.54 KB | None | 0 0
  1. {$CLEO}
  2. 0000: NOP
  3. 0B34: samp register_client_command "oy" to_label @ofyellow
  4. 0B34: samp register_client_command "or" to_label @ofred
  5. 0B34: samp register_client_command "ob" to_label @ofblue
  6. 0B34: samp register_client_command "ov" to_label @ofviolet
  7. 0B34: samp register_client_command "og" to_label @ofgreen
  8. 0B34: samp register_client_command "ow" to_label @ofwhite
  9. 0B34: samp register_client_command "oreset" to_label @oreset
  10. 0B34: samp register_client_command "otog" to_label @otog
  11. 0B34: samp register_client_command "ohelp" to_label @ohelp
  12. 7@ = 0
  13.  
  14. :First
  15. wait 0
  16. if
  17. 0118: actor $PLAYER_ACTOR dead
  18. then
  19. jump @First
  20. end
  21.  
  22. if
  23. 056D: actor $PLAYER_ACTOR defined
  24. jf @First
  25. 30@ = 0
  26.  
  27. if
  28. 7@ == 1
  29. then
  30. jump @First
  31. end
  32.  
  33. if 1@ == 1
  34. then
  35. 0AB1: @Find_object 3 Object number 11@ Display_offset 30@ Color 0xF7F694
  36. 30@ += 43
  37. end
  38.  
  39. if 2@ == 1
  40. then
  41. 0AB1: @Find_object 3 Object number 12@ Display_offset 30@ Color 0xFF4800
  42. 30@ += 43
  43. end
  44.  
  45. if 3@ == 1
  46. then
  47. 0AB1: @Find_object 3 Object number 13@ Display_offset 30@ Color 0x00C8FF
  48. 30@ += 43
  49. end
  50.  
  51. if 4@ == 1
  52. then
  53. 0AB1: @Find_object 3 Object number 14@ Display_offset 30@ Color 0xD900FF
  54. 30@ += 43
  55. end
  56.  
  57. if 5@ == 1
  58. then
  59. 0AB1: @Find_object 3 Object number 15@ Display_offset 30@ Color 0x1EFF00
  60. 30@ += 43
  61. end
  62.  
  63. if 6@ == 1
  64. then
  65. 0AB1: @Find_object 3 Object number 16@ Display_offset 30@ Color 0xFFFFFF
  66. 30@ += 43
  67. end
  68. jump @First
  69.  
  70.  
  71.  
  72.  
  73. :ofyellow
  74. wait 0
  75. 0B35: samp 29@ = get_last_command_params //
  76. if 0AD4: 31@ = scan_string 29@ format "%d" 11@
  77. then
  78. 1@ = 1
  79. else
  80. 1@ = 0
  81. end
  82. samp.CmdRet
  83.  
  84. :ofred
  85. wait 0
  86. 0B35: samp 29@ = get_last_command_params //
  87. if 0AD4: 31@ = scan_string 29@ format "%d" 12@
  88. then
  89. 2@ = 1
  90. else
  91. 2@ = 0
  92. end
  93. samp.CmdRet
  94.  
  95. :ofblue
  96. wait 0
  97. 0B35: samp 29@ = get_last_command_params //
  98. if 0AD4: 31@ = scan_string 29@ format "%d" 13@
  99. then
  100. 3@ = 1
  101. else
  102. 3@ = 0
  103. end
  104. samp.CmdRet
  105.  
  106. :ofviolet
  107. wait 0
  108. 0B35: samp 29@ = get_last_command_params //
  109. if 0AD4: 31@ = scan_string 29@ format "%d" 14@
  110. then
  111. 4@ = 1
  112. else
  113. 4@ = 0
  114. end
  115. samp.CmdRet
  116.  
  117. :ofgreen
  118. wait 0
  119. 0B35: samp 29@ = get_last_command_params //
  120. if 0AD4: 31@ = scan_string 29@ format "%d" 15@
  121. then
  122. 5@ = 1
  123. else
  124. 5@ = 0
  125. end
  126. samp.CmdRet
  127.  
  128. :ofwhite
  129. wait 0
  130. 0B35: samp 29@ = get_last_command_params //
  131. if 0AD4: 31@ = scan_string 29@ format "%d" 16@
  132. then
  133. 6@ = 1
  134. else
  135. 6@ = 0
  136. end
  137. samp.CmdRet
  138.  
  139. :oreset
  140. wait 0
  141. 1@ = 0
  142. 2@ = 0
  143. 3@ = 0
  144. 4@ = 0
  145. 5@ = 0
  146. 6@ = 0
  147. samp.CmdRet
  148.  
  149. :otog
  150. wait 0
  151. 0B12: 7@ = 7@ XOR 1
  152. samp.CmdRet
  153.  
  154. :ohelp
  155. wait 0
  156. 0AF8: samp add_message_to_chat "{F7F694}o{FF4800}b{00C8FF}j{D900FF}e{1EFF00}c{FFFFFF}t{F7F694}Finder commands:" color 0xFFFFFFFF
  157. 0AF8: samp add_message_to_chat "{FFFFFF}/oy <modelID> {F7F694}(yellow markers)" color 0xFFFFFFFF
  158. 0AF8: samp add_message_to_chat "{FFFFFF}/or <modelID> {FF4800}(red markers)" color 0xFFFFFFFF
  159. 0AF8: samp add_message_to_chat "{FFFFFF}/ob <modelID> {00C8FF}(blue markers)" color 0xFFFFFFFF
  160. 0AF8: samp add_message_to_chat "{FFFFFF}/ov <modelID> {D900FF}(violet markers)" color 0xFFFFFFFF
  161. 0AF8: samp add_message_to_chat "{FFFFFF}/og <modelID> {1EFF00}(green markers)" color 0xFFFFFFFF
  162. 0AF8: samp add_message_to_chat "{FFFFFF}/ow <modelID> {FFFFFF}(white markers)" color 0xFFFFFFFF
  163. 0AF8: samp add_message_to_chat "{FFFFFF}/oreset {F7F694}(reset current searches)" color 0xFFFFFFFF
  164. 0AF8: samp add_message_to_chat "{FFFFFF}/otog {F7F694}(tog current searches)" color 0xFFFFFFFF
  165. samp.CmdRet
  166.  
  167. //0AB1: @Find_object 2 Object number 0@ Display_offset y@ Color 2@
  168. :Find_object
  169. 0B5A: get_screen_resolution 29@ 31@ //int
  170. 29@ /= 10
  171. 29@ *= 8
  172. //31@ /= 2
  173. 31@ /= 10
  174. 31@ *= 7
  175. 005A: 31@ += 1@
  176. 28@ = 0
  177. for 16@ = 0 to 10000
  178. if 0B50: samp 10@ = object_handle_by_id 16@
  179. then
  180. 0984: 11@ = object 10@ model
  181. if 003B: 11@ == 0@ // (int)
  182. then
  183. 03F0: enable_text_draw 1
  184. 28@ += 1
  185. if
  186. 02CC: object 10@ bounding_sphere_visible
  187. then
  188. 0B66: render argb 2@ to_a 3@ r 4@ g 5@ b 6@
  189. 0AB1: @Box_object 6 Object_handle 10@ Red 4@ Green 5@ Blue 6@ Alpha 255 Thickness 90.0
  190. end
  191. end
  192. end
  193. if 28@ > 14
  194. then break
  195. end
  196. end
  197. 0AD3: 8@v = format "Model: %d" 0@
  198. 0AD3: 12@v = format "Number: %d" 28@
  199. if
  200. 28@ == 0
  201. then
  202. 0D94: draw_text 8@v pos_xy 29@ 31@ align_xy 0.0 0.0 color 0x575757 shadow 1
  203. 31@ += 19
  204. 0D94: draw_text 12@v pos_xy 29@ 31@ align_xy 0.0 0.0 color 0x575757 shadow 1
  205. else
  206. 0D94: draw_text 8@v pos_xy 29@ 31@ align_xy 0.0 0.0 color 2@ shadow 1
  207. 31@ += 19
  208. 0D94: draw_text 12@v pos_xy 29@ 31@ align_xy 0.0 0.0 color 2@ shadow 1
  209. end
  210. 0AB2: ret 0
  211.  
  212.  
  213. //0AB1: @Box_object 6 Object_handle 1@ Red 2@ Green 3@ Blue 4@ Alpha 5@ Thickness 6@
  214. :Box_object
  215. 01BB: store_object 0@ position_to 11@ 12@ 13@
  216. 068D: get_camera_position_to 21@ 22@ 23@
  217. 050A: 24@ = distance_between_XYZ 11@ 12@ 13@ and_XYZ 21@ 22@ 23@
  218. 25@ = 800.0
  219. 26@ = 800.0
  220. 0073: 25@ /= 24@ // (float)
  221. 0073: 26@ /= 24@
  222. 0073: 5@ /= 24@
  223. 0AB1: call_scm_func @getScreenXYFrom3DCoords 3 3D_coords_X 11@ Y 12@ Z 13@ store_screen_X_to 14@ Y_to 15@
  224. 0AB1: @DRAW_OUTLINED_BOX 9 POS 14@ 15@ SIZE 25@ 26@ RGBA 1@ 2@ 3@ 4@ THICKNESS 5@
  225. 0AB2: ret 0
  226.  
  227. //0AB1: @DRAW_OUTLINED_BOX 9 POS 300.0 300.0 SIZE 50.0 50.0 RGBA 255 0 0 255 THICKNESS 0.5
  228. :DRAW_OUTLINED_BOX
  229. 0087: 14@ = 8@ // (float)
  230. 0087: 12@ = 2@ // (float)
  231. 0087: 13@ = 3@ // (float)
  232. 12@ /= 2.0 // (float)
  233. 13@ /= 2.0 // (float)
  234. 0087: 8@ = 0@ // (float)
  235. 005B: 8@ += 2@ // (float)
  236. 0063: 8@ -= 12@ // (float)
  237. 0087: 9@ = 0@ // (float)
  238. 0063: 9@ -= 2@ // (float)
  239. 005B: 9@ += 12@ // (float)
  240. 0087: 10@ = 1@ // (float)
  241. 005B: 10@ += 3@ // (float)
  242. 0063: 10@ -= 13@ // (float)
  243. 0087: 11@ = 1@ // (float) by OpcodeXe
  244. 0063: 11@ -= 3@ // (float)
  245. 005B: 11@ += 13@ // (float)
  246. 03F0: enable_text_draw 1
  247. 038E: draw_box_position 8@ 1@ size 14@ 3@ RGBA 4@ 5@ 6@ 7@ // links
  248. 038E: draw_box_position 9@ 1@ size 14@ 3@ RGBA 4@ 5@ 6@ 7@ // rechts
  249. 038E: draw_box_position 0@ 10@ size 2@ 14@ RGBA 4@ 5@ 6@ 7@ // oben
  250. 038E: draw_box_position 0@ 11@ size 2@ 14@ RGBA 4@ 5@ 6@ 7@ // unten
  251. 0AB2: ret 0
  252.  
  253. //0AB1: call_scm_func @getScreenXYFrom3DCoords 3 3D_coords_X 0@ Y 1@ Z 2@ store_screen_X_to 3@ Y_to 4@
  254. :getScreenXYFrom3DCoords
  255. 0AA7: call_function 0x70CE30 num_params 6 pop 6 clipNear 1 clipFar 1 yMult 7@s xMult 6@s outVector 2@s inVector 0@s result 29@
  256. 0073: 2@ /= 6@
  257. 0073: 2@ /= 4@
  258. 0073: 3@ /= 7@
  259. 0073: 3@ /= 4@
  260. 2@ *= 640.0
  261. 3@ *= 448.0
  262. 0AB2: ret 2 2@ 3@
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement