Advertisement
Guest User

objectFinder.cs 1.2

a guest
Feb 1st, 2015
806
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.50 KB | None | 0 0
  1. {$CLEO}
  2. 0000: NOP
  3. repeat
  4. wait 50
  5. until 0AFA: is_samp_available
  6. 0B34: samp register_client_command "oy" to_label @ofyellow
  7. 0B34: samp register_client_command "or" to_label @ofred
  8. 0B34: samp register_client_command "ob" to_label @ofblue
  9. 0B34: samp register_client_command "ov" to_label @ofviolet
  10. 0B34: samp register_client_command "og" to_label @ofgreen
  11. 0B34: samp register_client_command "ow" to_label @ofwhite
  12. 0B34: samp register_client_command "oreset" to_label @oreset
  13. 0B34: samp register_client_command "otog" to_label @otog
  14. 0B34: samp register_client_command "ohelp" to_label @ohelp
  15. 7@ = 0
  16. 9@ = 0
  17.  
  18.  
  19.  
  20. :First
  21. wait 0
  22. if
  23. 0118: actor $PLAYER_ACTOR dead
  24. then
  25. jump @First
  26. end
  27.  
  28. if
  29. 056D: actor $PLAYER_ACTOR defined
  30. jf @First
  31. 30@ = 0
  32. 0B12: 9@ = 9@ XOR 1
  33. 0085: 8@ = 9@
  34.  
  35. if
  36. 7@ == 1
  37. then
  38. jump @First
  39. end
  40.  
  41. if 1@ == 1
  42. then
  43. 0AB1: @Find_object 4 Object number 11@ Display_offset 30@ Color 0xF7F694 blinkingStatus 8@ _returnedBlinking 8@
  44. 30@ += 43
  45. end
  46.  
  47. if 2@ == 1
  48. then
  49. 0AB1: @Find_object 4 Object number 12@ Display_offset 30@ Color 0xFF4800 blinkingStatus 8@ _returnedBlinking 8@
  50. 30@ += 43
  51. end
  52.  
  53. if 3@ == 1
  54. then
  55. 0AB1: @Find_object 4 Object number 13@ Display_offset 30@ Color 0x00C8FF blinkingStatus 8@ _returnedBlinking 8@
  56. 30@ += 43
  57. end
  58.  
  59. if 4@ == 1
  60. then
  61. 0AB1: @Find_object 4 Object number 14@ Display_offset 30@ Color 0xD900FF blinkingStatus 8@ _returnedBlinking 8@
  62. 30@ += 43
  63. end
  64.  
  65. if 5@ == 1
  66. then
  67. 0AB1: @Find_object 4 Object number 15@ Display_offset 30@ Color 0x1EFF00 blinkingStatus 8@ _returnedBlinking 8@
  68. 30@ += 43
  69. end
  70.  
  71. if 6@ == 1
  72. then
  73. 0AB1: @Find_object 4 Object number 16@ Display_offset 30@ Color 0xFFFFFF blinkingStatus 8@ _returnedBlinking 8@
  74. 30@ += 43
  75. end
  76. jump @First
  77.  
  78.  
  79.  
  80.  
  81. :ofyellow
  82. wait 0
  83. 0B35: samp 29@ = get_last_command_params //
  84. if 0AD4: 31@ = scan_string 29@ format "%d" 11@
  85. then
  86. 1@ = 1
  87. else
  88. 1@ = 0
  89. end
  90. samp.CmdRet
  91.  
  92. :ofred
  93. wait 0
  94. 0B35: samp 29@ = get_last_command_params //
  95. if 0AD4: 31@ = scan_string 29@ format "%d" 12@
  96. then
  97. 2@ = 1
  98. else
  99. 2@ = 0
  100. end
  101. samp.CmdRet
  102.  
  103. :ofblue
  104. wait 0
  105. 0B35: samp 29@ = get_last_command_params //
  106. if 0AD4: 31@ = scan_string 29@ format "%d" 13@
  107. then
  108. 3@ = 1
  109. else
  110. 3@ = 0
  111. end
  112. samp.CmdRet
  113.  
  114. :ofviolet
  115. wait 0
  116. 0B35: samp 29@ = get_last_command_params //
  117. if 0AD4: 31@ = scan_string 29@ format "%d" 14@
  118. then
  119. 4@ = 1
  120. else
  121. 4@ = 0
  122. end
  123. samp.CmdRet
  124.  
  125. :ofgreen
  126. wait 0
  127. 0B35: samp 29@ = get_last_command_params //
  128. if 0AD4: 31@ = scan_string 29@ format "%d" 15@
  129. then
  130. 5@ = 1
  131. else
  132. 5@ = 0
  133. end
  134. samp.CmdRet
  135.  
  136. :ofwhite
  137. wait 0
  138. 0B35: samp 29@ = get_last_command_params //
  139. if 0AD4: 31@ = scan_string 29@ format "%d" 16@
  140. then
  141. 6@ = 1
  142. else
  143. 6@ = 0
  144. end
  145. samp.CmdRet
  146.  
  147. :oreset
  148. wait 0
  149. 1@ = 0
  150. 2@ = 0
  151. 3@ = 0
  152. 4@ = 0
  153. 5@ = 0
  154. 6@ = 0
  155. samp.CmdRet
  156.  
  157. :otog
  158. wait 0
  159. 0B12: 7@ = 7@ XOR 1
  160. samp.CmdRet
  161.  
  162. :ohelp
  163. wait 0
  164. 0AF8: samp add_message_to_chat "{F7F694}o{FF4800}b{00C8FF}j{D900FF}e{1EFF00}c{FFFFFF}t{F7F694}Finder commands:" color 0xFFFFFFFF
  165. 0AF8: samp add_message_to_chat "{FFFFFF}/oy <modelID> {F7F694}(yellow markers)" color 0xFFFFFFFF
  166. 0AF8: samp add_message_to_chat "{FFFFFF}/or <modelID> {FF4800}(red markers)" color 0xFFFFFFFF
  167. 0AF8: samp add_message_to_chat "{FFFFFF}/ob <modelID> {00C8FF}(blue markers)" color 0xFFFFFFFF
  168. 0AF8: samp add_message_to_chat "{FFFFFF}/ov <modelID> {D900FF}(violet markers)" color 0xFFFFFFFF
  169. 0AF8: samp add_message_to_chat "{FFFFFF}/og <modelID> {1EFF00}(green markers)" color 0xFFFFFFFF
  170. 0AF8: samp add_message_to_chat "{FFFFFF}/ow <modelID> {FFFFFF}(white markers)" color 0xFFFFFFFF
  171. 0AF8: samp add_message_to_chat "{FFFFFF}/oreset {F7F694}(reset current searches)" color 0xFFFFFFFF
  172. 0AF8: samp add_message_to_chat "{FFFFFF}/otog {F7F694}(tog current searches)" color 0xFFFFFFFF
  173. samp.CmdRet
  174.  
  175. //0AB1: @Find_object 4 Object number 0@ Display_offset y@ Color 2@ blinkingStatus _returnedBlinking 8@
  176. :Find_object
  177. 0085: 30@ = 3@ // blinking status
  178. 06AC: 21@ = actor $PLAYER_ACTOR movement_speed
  179. if 0021: 21@ > 50.0
  180. then
  181. 21@ = 50.0
  182. end
  183. 006B: 21@ *= 21@
  184. 17@ = -0.514
  185. 0017: 17@ /= 2500.0
  186. 006B: 17@ *= 21@
  187. 000B: 17@ += 1.0
  188.  
  189. 0B5A: get_screen_resolution 29@ 31@ //int
  190. 29@ /= 10
  191. 29@ *= 8
  192. //31@ /= 2
  193. 31@ /= 10
  194. 31@ *= 7
  195. 005A: 31@ += 1@
  196. 28@ = 0
  197. 21@ = 400.0
  198. 2@ += 0xFF000000
  199.  
  200. 0A8D: 16@ = read_memory 0xB7449C size 4 virtual_protect 0
  201. 000A: 16@ += 0x4
  202. 0A8D: 16@ = read_memory 16@ size 4 virtual_protect 0
  203. for 23@ = 0 to 355840 step 0x100 //35584
  204. 0A8D: 10@ = read_memory 16@ size 1 virtual_protect 0
  205. 000A: 16@ += 0x1
  206. if and
  207. 0029: 10@ >= 0x00
  208. 001B: 0x80 > 10@
  209. then
  210. 005A: 10@ += 23@
  211. 0984: 11@ = object 10@ model
  212. if 003B: 11@ == 0@ // (int)
  213. then
  214. 03F0: enable_text_draw 1
  215. 28@ += 1
  216. if
  217. 02CC: object 10@ bounding_sphere_visible
  218. then
  219. 0B66: render argb 2@ to_a 3@ r 4@ g 5@ b 6@
  220. 0AB1: @Box_object 6 Object_handle 10@ Red 4@ Green 5@ Blue 6@ Alpha 255 Thickness 90.0
  221. end
  222. 0AB1: @DistanceObject 1 Object_handle 10@ _returnedDistance 20@
  223. if 0025: 21@ > 20@ // (float)
  224. then
  225. 0087: 21@ = 20@ // (float)
  226. 0085: 22@ = 10@ // (int) 22@ = closest object
  227. end
  228.  
  229. 01BB: store_object 10@ position_to 3@ 4@ 5@
  230. 0B60: convert_game_screen_coords 86.0 383.0 to_window_screen_coords 6@ 7@
  231. 0AB1: @POSITION_TO_RADAR 7 XYZ 3@ 4@ 5@ RADAR_POS 6@ 7@ DISTANCE_MULTIPLIER 17@ MAX_DISTANCE 130.0 _STORE_TO 3@ 4@
  232. 0B70: draw_polygon_pos 3@ 4@ size 20 20 corners 50 rotation 0 color 2@
  233. end
  234. end
  235. if 28@ > 14
  236. then break
  237. end
  238. end
  239. 2@ -= 0xFF000000
  240. 0AD3: 8@v = format "Model: %d" 0@
  241. 0AD3: 12@v = format "Number: %d" 28@
  242. if
  243. 28@ == 0
  244. then
  245. 0D94: draw_text 8@v pos_xy 29@ 31@ align_xy 0.0 0.0 color 0x575757 shadow 1
  246. 31@ += 19
  247. 0D94: draw_text 12@v pos_xy 29@ 31@ align_xy 0.0 0.0 color 0x575757 shadow 1
  248. else
  249. 0D94: draw_text 8@v pos_xy 29@ 31@ align_xy 0.0 0.0 color 2@ shadow 1
  250. 31@ += 19
  251. 0D94: draw_text 12@v pos_xy 29@ 31@ align_xy 0.0 0.0 color 2@ shadow 1
  252. 31@ -= 10
  253. 29@ -= 30
  254. 01BB: store_object 22@ position_to 3@ 4@ 5@
  255. 0B60: convert_game_screen_coords 86.0 383.0 to_window_screen_coords 6@ 7@
  256. 0AB1: @POSITION_TO_RADAR 7 XYZ 3@ 4@ 5@ RADAR_POS 6@ 7@ DISTANCE_MULTIPLIER 17@ MAX_DISTANCE 130.0 _STORE_TO 3@ 4@
  257. 2@ += 0xFF000000
  258. if 30@ == 1
  259. then
  260. 0B70: draw_polygon_pos 3@ 4@ size 20 20 corners 50 rotation 0 color 0xFFFF3A1C
  261. else
  262. 0B70: draw_polygon_pos 3@ 4@ size 20 20 corners 50 rotation 0 color 2@
  263. end
  264. end
  265. 0B12: 30@ = 30@ XOR 1
  266. 0AB2: ret 1 30@
  267.  
  268. //0AB1: @DistanceObject 1 Object_handle 10@
  269. :DistanceObject
  270. 00A0: store_actor $PLAYER_ACTOR position_to 1@ 2@ 3@
  271. 01BB: store_object 0@ position_to 4@ 5@ 6@
  272. 050A: 7@ = distance_between_XYZ 1@ 2@ 3@ and_XYZ 4@ 5@ 6@
  273. 0AB2: ret 1 7@
  274.  
  275.  
  276.  
  277. //0AB1: @Box_object 6 Object_handle 1@ Red 2@ Green 3@ Blue 4@ Alpha 5@ Thickness 6@
  278. :Box_object
  279. 01BB: store_object 0@ position_to 11@ 12@ 13@
  280. 068D: get_camera_position_to 21@ 22@ 23@
  281. 050A: 24@ = distance_between_XYZ 11@ 12@ 13@ and_XYZ 21@ 22@ 23@
  282. if 0021: 24@ > 90.0 //to avoid too small, unnoticable boxes
  283. then
  284. 24@ = 90.0
  285. end
  286. 25@ = 800.0
  287. 26@ = 800.0
  288. 0073: 25@ /= 24@ // (float)
  289. 0073: 26@ /= 24@
  290. 0073: 5@ /= 24@
  291. 0AB1: call_scm_func @getScreenXYFrom3DCoords 3 3D_coords_X 11@ Y 12@ Z 13@ store_screen_X_to 14@ Y_to 15@
  292. 0AB1: @DRAW_OUTLINED_BOX 9 POS 14@ 15@ SIZE 25@ 26@ RGBA 1@ 2@ 3@ 4@ THICKNESS 5@
  293. 0AB2: ret 0
  294.  
  295. //0AB1: @DRAW_OUTLINED_BOX 9 POS 300.0 300.0 SIZE 50.0 50.0 RGBA 255 0 0 255 THICKNESS 0.5
  296. :DRAW_OUTLINED_BOX
  297. 0087: 14@ = 8@ // (float)
  298. 0087: 12@ = 2@ // (float)
  299. 0087: 13@ = 3@ // (float)
  300. 12@ /= 2.0 // (float)
  301. 13@ /= 2.0 // (float)
  302. 0087: 8@ = 0@ // (float)
  303. 005B: 8@ += 2@ // (float)
  304. 0063: 8@ -= 12@ // (float)
  305. 0087: 9@ = 0@ // (float)
  306. 0063: 9@ -= 2@ // (float)
  307. 005B: 9@ += 12@ // (float)
  308. 0087: 10@ = 1@ // (float)
  309. 005B: 10@ += 3@ // (float)
  310. 0063: 10@ -= 13@ // (float)
  311. 0087: 11@ = 1@ // (float) by OpcodeXe
  312. 0063: 11@ -= 3@ // (float)
  313. 005B: 11@ += 13@ // (float)
  314. 03F0: enable_text_draw 1
  315. 038E: draw_box_position 8@ 1@ size 14@ 3@ RGBA 4@ 5@ 6@ 7@ // links
  316. 038E: draw_box_position 9@ 1@ size 14@ 3@ RGBA 4@ 5@ 6@ 7@ // rechts
  317. 038E: draw_box_position 0@ 10@ size 2@ 14@ RGBA 4@ 5@ 6@ 7@ // oben
  318. 038E: draw_box_position 0@ 11@ size 2@ 14@ RGBA 4@ 5@ 6@ 7@ // unten
  319. 0AB2: ret 0
  320.  
  321. //0AB1: call_scm_func @getScreenXYFrom3DCoords 3 3D_coords_X 0@ Y 1@ Z 2@ store_screen_X_to 3@ Y_to 4@
  322. :getScreenXYFrom3DCoords
  323. 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@
  324. 0073: 2@ /= 6@
  325. 0073: 2@ /= 4@
  326. 0073: 3@ /= 7@
  327. 0073: 3@ /= 4@
  328. 2@ *= 640.0
  329. 3@ *= 448.0
  330. 0AB2: ret 2 2@ 3@
  331.  
  332. //0AB1: @POSITION_TO_RADAR 7 XYZ 0.0 0.0 0.0 RADAR_POS 400 400 DISTANCE_MULTIPLIER 1.5 MAX_DISTANCE 300.0 _STORE_TO 1@ 2@
  333. :POSITION_TO_RADAR
  334. 04C4: 10@ 11@ 12@ = XYZ $PLAYER_ACTOR 0.0 0.0 0.0
  335. 050A: 13@ = distance_between_XYZ 0@ 1@ 2@ and_XYZ 10@ 11@ 12@
  336. IF
  337. 0025: 13@ > 6@
  338. THEN
  339. 0087: 13@ = 6@ // (float)
  340. END
  341. 006B: 13@ *= 5@
  342. 0AB1: @getZAngleBetweenPoints 4 from_XY 10@ 11@ and_XY 0@ 1@ store_to 14@
  343. 14@ *= -1.0
  344. 0AB1: @getCameraFacingAngle 0 15@
  345. 005B: 14@ += 15@
  346. 0093: 3@ = integer 3@ to_float
  347. 0093: 4@ = integer 4@ to_float
  348. 0AB1: @makeCordinate 4 posXY 3@ 4@ Z_Angle 14@ Distance 13@ STORE_TO 16@ 17@
  349. 0092: 16@ = float 16@ to_integer
  350. 0092: 17@ = float 17@ to_integer
  351. 0AB2: 2 16@ 17@
  352.  
  353. :makeCordinate
  354. //0@ = radar pos X
  355. //1@ = radar pos Y
  356. //2@ = z_angle
  357. //3@ = Distance
  358. //10@ = new variable
  359. 2@ *= -1.0
  360. //x adjustment
  361. 02F6: 10@ = sine 2@
  362. 006B: 10@ *= 3@
  363. 005B: 0@ += 10@
  364.  
  365. //y adjustment
  366. 02F7: 10@ = cosine 2@
  367. 006B: 10@ *= 3@
  368. 0017: 10@ /= 640.0
  369. 0013: 10@ *= 480.0
  370. 005B: 1@ += 10@
  371.  
  372. 0AB2: 2 0@ 1@
  373.  
  374. :getCameraFacingAngle
  375. 00A0: store_actor $PLAYER_ACTOR position_to 1@ 2@ 3@
  376. 0AA6: call_method 0x514970 struct 0xB6F028 num_params 6 pop 0 0xA49994 0xA499A0 3@ 2@ 1@ 20.0
  377. 0AB1: call_scm_func @getZAngleBetweenPoints 4 from_XY $13 $14 and_XY 1@ 2@ store_to 4@
  378. 0AB2: 1 4@
  379.  
  380. :getZAngleBetweenPoints
  381. 0063: 0@ -= 2@
  382. 0063: 1@ -= 3@
  383. 0604: get_Z_angle_for_point 0@ 1@ store_to 4@
  384. 0AB2: 1 4@
  385.  
  386. //0AB1: @VersionType 0 _returnedValue 1@
  387. :VersionType
  388. 0A8D: 0@ = read_memory 5794971 size 4 virtual_protect 0
  389. if 0@ == 180.0
  390. then
  391. 1@ = 1
  392. else
  393. 1@ = 0
  394. end
  395. 0AB2: 1 1@
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement