Advertisement
Guest User

Untitled

a guest
Jul 18th, 2018
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 4.15 KB | None | 0 0
  1. {$CLEO .cs}
  2.  
  3. //-------------MAIN---------------
  4. 0662: printstring "RASTAFTW"
  5. 03A4: name_thread "mdc"
  6. 0001: wait 2000 ms
  7. 0006: 23@ = -1
  8. 0006: 22@ = -1
  9. 0006: 21@ = -1
  10. 0006: 20@ = -1
  11. 0B34: samp register_client_command "restartmdc" to_label @mdc_1148
  12. 0001: wait 5000 ms
  13. 0050: gosub @mdc_406
  14. 0050: gosub @mdc_464
  15. 0050: gosub @mdc_911
  16. 0050: gosub @mdc_874
  17. 0050: gosub @mdc_406
  18.  
  19. :mdc_111
  20. 0001: wait 0 ms
  21. 00D6: if and
  22. 0AB0:   key_pressed 2
  23. 0256:   player $PLAYER_ACTOR defined
  24. 004D: jump_if_false @mdc_317
  25. 00D6: if
  26. 0AB1: call_scm_func @mdc_504 0 0@  
  27. 004D: jump_if_false @mdc_317
  28. 00D6: if
  29. 8039:   not  0@ == -1
  30. 004D: jump_if_false @mdc_317
  31. 00D6: if
  32. 0AB1: call_scm_func @mdc_324 1 0@  
  33. 004D: jump_if_false @mdc_317
  34. 0B2B: samp 19@ = get_player_id_by_actor_handle 0@
  35. 0B37: samp 2@ = get_player_color 19@
  36. 00D6: if and
  37. 0039:   2@ == -1887379
  38. 803B:   not  19@ == 20@ // (int)
  39. 803B:   not  19@ == 21@ // (int)
  40. 803B:   not  19@ == 22@ // (int)
  41. 803B:   not  19@ == 23@ // (int)
  42. 004D: jump_if_false @mdc_317
  43. 0AF9: samp say_msg "/mdc %d" 19@  
  44. 0085: 23@ = 22@ // (int)
  45. 0085: 22@ = 21@ // (int)
  46. 0085: 21@ = 20@ // (int)
  47. 0085: 20@ = 19@ // (int)
  48.  
  49. :mdc_317
  50. 0002: jump @mdc_111
  51.  
  52. :mdc_324
  53. 00A0: store_actor 0@ position_to 1@ 2@ 3@
  54. 00A0: store_actor $PLAYER_ACTOR position_to 4@ 5@ 6@
  55. 0509: 7@ = distance_between_XY 1@ 2@ and_XY 4@ 5@
  56. 00D6: if
  57. 0021:   7@ > 50.0
  58. 004D: jump_if_false @mdc_399
  59. 059A:   return_false
  60. 0002: jump @mdc_401
  61.  
  62. :mdc_399
  63. 0485:   return_true
  64.  
  65. :mdc_401
  66. 0AB2: ret 0
  67.  
  68. :mdc_406
  69. 0AF8: samp add_message_to_chat "{00ff00}> ================================== <" color 16777215  
  70. 0051: return
  71.  
  72. :mdc_464
  73. 0AF8: samp add_message_to_chat "{00ff00}> Target /mdc (auto)" color 16777215  
  74. 0051: return
  75.  
  76. :mdc_504
  77. 0007: 28@ = 200.0
  78. 0A8D: 29@ = read_memory 12010640 size 4 virtual_protect 0
  79. 000A: 29@ += 4
  80. 0A8D: 29@ = read_memory 29@ size 4 virtual_protect 0
  81. 0006: 30@ = 0
  82.  
  83. :mdc_554
  84. 0A8D: 31@ = read_memory 29@ size 1 virtual_protect 0
  85. 000A: 29@ += 1
  86. 00D6: if and
  87. 0029:   31@ >= 0
  88. 001B:   128 > 31@
  89. 004D: jump_if_false @mdc_809
  90. 005A: 31@ += 30@ // (int)
  91. 00D6: if
  92. 056D:   actor 31@ defined
  93. 004D: jump_if_false @mdc_809
  94. 00D6: if
  95. 803C:   not  $PLAYER_ACTOR == 31@ // (int)
  96. 004D: jump_if_false @mdc_809
  97. 04C4: store_coords_to 27@ 26@ 25@ from_actor 31@ with_offset 0.0 0.0 0.0
  98. 068D: get_camera_position_to 24@ 23@ 22@
  99. 00D6: if and
  100. 02CB:   actor 31@ bounding_sphere_visible
  101. 06BD:   no_obstacles_between 27@ 26@ 25@ and 24@ 23@ 22@ solid 1 car 0 actor 0 object 0 particle 0
  102. 004D: jump_if_false @mdc_809
  103. 0AB1: call_scm_func @mdc_948 3 27@ 26@ 25@ 24@ 23@  
  104. 0509: 22@ = distance_between_XY 339.0 179.0 and_XY 24@ 23@
  105. 00D6: if
  106. 0035:   28@ >= 22@ // (float)
  107. 004D: jump_if_false @mdc_809
  108. 0087: 28@ = 22@ // (float)
  109. 0087: 15@ = 31@ // (float)
  110.  
  111. :mdc_809
  112. 000A: 30@ += 256
  113. 0019:   30@ > 35584
  114. 004D: jump_if_false @mdc_554
  115. 00D6: if and
  116. 056D:   actor 15@ defined
  117. 8118:   not actor 15@ dead
  118. 004D: jump_if_false @mdc_864
  119. 0485:   return_true
  120. 0002: jump @mdc_866
  121.  
  122. :mdc_864
  123. 059A:   return_false
  124.  
  125. :mdc_866
  126. 0AB2: ret 1 15@
  127.  
  128. :mdc_874
  129. 0AC6: 0@ = label @mdc_1115 offset
  130. 0AF8: samp add_message_to_chat "{00ff00}> %s" color 16777215 0@  
  131. 0051: return
  132.  
  133. :mdc_911
  134. 0AC6: 0@ = label @mdc_1134 offset
  135. 0AF8: samp add_message_to_chat "{00ff00}> %s" color 16777215 0@  
  136. 0051: return
  137.  
  138. :mdc_948
  139. 0AC7: 14@ = var 0@ offset
  140. 0AC7: 15@ = var 3@ offset
  141. 0AC7: 16@ = var 6@ offset
  142. 0AC7: 17@ = var 9@ offset
  143. 0AA5: call 7392816 num_params 6 pop 6 0 0 17@ 16@ 15@ 14@  
  144. 0007: 12@ = 640.0
  145. 0007: 13@ = 448.0
  146. 0A8D: 14@ = read_memory 12677188 size 4 virtual_protect 0
  147. 0A8D: 15@ = read_memory 12677192 size 4 virtual_protect 0
  148. 0093: 14@ = integer 14@ to_float
  149. 0093: 15@ = integer 15@ to_float
  150. 0073: 12@ /= 14@ // (float)
  151. 0073: 13@ /= 15@ // (float)
  152. 006B: 3@ *= 12@ // (float)
  153. 006B: 4@ *= 13@ // (float)
  154. 0AB2: ret 2 3@ 4@
  155.  
  156. :mdc_1115
  157. hex
  158.  4D 61 64 65 20 66 6F 72 20 62 75 67 67 65 64 2E
  159.  72 6F 00 4D 61 64 65 20 62 79 20 52 61 73 74 61
  160. end
  161. 0100:   actor in_car
  162. hex
  163.  04 00
  164. end
  165. 0A92: create_custom_thread "target_mdc_auto.cs"  
  166. 004E: end_thread
  167. 0B43: samp cmd_ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement