Advertisement
Guest User

Untitled

a guest
Apr 24th, 2017
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.41 KB | None | 0 0
  1. {$CLEO .cs}
  2.  
  3. 0662: "by woksonal blasthack.net"
  4. 0662: "offsets - 0B36"
  5.  
  6. if not 0@ = SAMP.Base()
  7. then 0A93: end_custom_thread
  8. end
  9.  
  10. while not SAMP.Available()
  11. wait 100
  12. end
  13.  
  14. 0B34: samp register_client_command "cc" to_label @fp
  15. 0B34: samp register_client_command "gp" to_label @gp
  16. 0B34: samp register_client_command "rcc" to_label @rfp
  17. 0B34: samp register_client_command "rgp" to_label @rgp
  18.  
  19. 0BDE: pause_thread 0
  20.  
  21. :fp
  22. if call @is_cp_active 0
  23. then
  24. call @get_cp_pos 0 X 1@ Y 2@ Z 3@
  25. 0AD1: show_formatted_text_highpriority "%f %f %f" time 1448 1@ 2@ 3@
  26. if Actor.Driving($PLAYER_ACTOR)
  27. then
  28. call @incar 3 X 1@ Y 2@ Z 3@
  29. else
  30. call @onfoot 3 X 1@ Y 2@ Z 3@
  31. end
  32. else
  33. 0AD1: show_formatted_text_highpriority "Acum scrie /rcc" time 1448
  34. end
  35. samp.CmdRet()
  36.  
  37. :gp
  38. if call @is_cp_active 0
  39. then
  40. call @get_cp_pos 0 X 1@ Y 2@ Z 3@
  41. 0AD1: show_formatted_text_highpriority "%f %f %f" time 1448 1@ 2@ 3@
  42. if Actor.Driving($PLAYER_ACTOR)
  43. then
  44. Actor.PutAt($PLAYER_ACTOR, 1@, 2@, 3@)
  45. else
  46. call @actor_teleport 3 X 1@ Y 2@ Z 3@
  47. end
  48. else
  49. 0AD1: show_formatted_text_highpriority "checkpoint not found" time 1448
  50. end
  51. samp.CmdRet()
  52.  
  53. :rfp
  54. if call @is_racecp_active 0
  55. then
  56. call @get_racecp_pos 0 X 1@ Y 2@ Z 3@
  57. 0AD1: show_formatted_text_highpriority "%f %f %f" time 1448 1@ 2@ 3@
  58. if Actor.Driving($PLAYER_ACTOR)
  59. then
  60. call @incar 3 X 1@ Y 2@ Z 3@
  61. else
  62. call @onfoot 3 X 1@ Y 2@ Z 3@
  63. end
  64. else
  65. 0AD1: show_formatted_text_highpriority "race checkpoint not found" time 1448
  66. end
  67. samp.CmdRet()
  68.  
  69. :rgp
  70. if call @is_racecp_active 0
  71. then
  72. call @get_racecp_pos 0 X 1@ Y 2@ Z 3@
  73. 0AD1: show_formatted_text_highpriority "%f %f %f" time 1448 1@ 2@ 3@
  74. if Actor.Driving($PLAYER_ACTOR)
  75. then
  76. Actor.PutAt($PLAYER_ACTOR, 1@, 2@, 3@)
  77. else
  78. call @actor_teleport 3 X 1@ Y 2@ Z 3@
  79. end
  80. else
  81. 0AD1: show_formatted_text_highpriority "race checkpoint not found" time 1448
  82. end
  83. samp.CmdRet()
  84.  
  85. :onfoot
  86. 0B2B: samp 9@ = get_player_id_by_actor_handle $PLAYER_ACTOR
  87. 0AC8: 10@ = allocate_memory_size 68
  88. 0BBA: samp store_player 9@ onfoot_data 10@
  89. 0C0D: struct 10@ offset 6 size 4 = 0@
  90. 0C0D: struct 10@ offset 10 size 4 = 1@
  91. 0C0D: struct 10@ offset 14 size 4 = 2@
  92. 0BC0: samp send_onfoot_data 10@
  93. 0AC9: free_allocated_memory 10@
  94. 0AB2: ret 0
  95.  
  96. :incar
  97. 0B2B: samp 13@ = get_player_id_by_actor_handle $PLAYER_ACTOR
  98. 0AC8: 14@ = allocate_memory_size 63
  99. 0BBB: samp store_player 13@ incar_data 14@
  100. 0C0D: struct 14@ offset 24 size 4 = 0@
  101. 0C0D: struct 14@ offset 28 size 4 = 1@
  102. 0C0D: struct 14@ offset 32 size 4 = 2@
  103. 0C0D: struct 14@ offset 36 size 4 = 0.0
  104. 0C0D: struct 14@ offset 40 size 4 = 0.0
  105. 0C0D: struct 14@ offset 44 size 4 = 0.0
  106. 0BC1: samp send_incar_data 14@
  107. 0AC9: free_allocated_memory 14@
  108. 0AB2: ret 0
  109.  
  110. :is_cp_active
  111. if 0AA2: 0@ = loadlib "samp.dll"
  112. then 0A8E: 1@ = 0@ + 0x21A10C
  113. 0A8D: 1@ = readMem 1@ sz 4 vp 0
  114. 1@ += 0x24
  115. 0A8D: 1@ = readMem 1@ sz 4 vp 0
  116. if 1@ == true
  117. then 0485: return_true
  118. else 059A: return_false
  119. end
  120. 0AA3: freelib 0@
  121. end
  122. 0AB2: ret 0
  123.  
  124. :get_cp_pos
  125. if 0AA2: 0@ = loadlib "samp.dll"
  126. then 0A8E: 1@ = 0@ + 0x21A10C
  127. 0A8D: 1@ = readMem 1@ sz 4 vp 0
  128. 1@ += 0xC
  129. 0A8D: 2@ = readMem 1@ sz 4 vp 0
  130. 1@ += 0x4
  131. 0A8D: 3@ = readMem 1@ sz 4 vp 0
  132. 1@ += 0x4
  133. 0A8D: 4@ = readMem 1@ sz 4 vp 0
  134. 0AA3: freelib 0@
  135. end
  136. 0AB2: ret 3 2@ 3@ 4@
  137.  
  138. :is_racecp_active
  139. if 0AA2: 0@ = loadlib "samp.dll"
  140. then 0A8E: 1@ = 0@ + 0x21A10C
  141. 0A8D: 1@ = readMem 1@ sz 4 vp 0
  142. 1@ += 0x49
  143. 0A8D: 1@ = readMem 1@ sz 4 vp 0
  144. if 1@ == true
  145. then 0485: return_true
  146. else 059A: return_false
  147. end
  148. 0AA3: freelib 0@
  149. end
  150. 0AB2: ret 0
  151.  
  152. :get_racecp_pos
  153. if 0AA2: 0@ = loadlib "samp.dll"
  154. then 0A8E: 1@ = 0@ + 0x21A10C
  155. 0A8D: 1@ = readMem 1@ sz 4 vp 0
  156. 1@ += 0x2C
  157. 0A8D: 2@ = readMem 1@ sz 4 vp 0
  158. 1@ += 0x4
  159. 0A8D: 3@ = readMem 1@ sz 4 vp 0
  160. 1@ += 0x4
  161. 0A8D: 4@ = readMem 1@ sz 4 vp 0
  162. 0AA3: freelib 0@
  163. end
  164. 0AB2: ret 3 2@ 3@ 4@
  165.  
  166. :actor_teleport
  167. 0A96: 4@ = actor $PLAYER_ACTOR struct
  168. 4@ += 20
  169. 0A8D: 4@ = read_memory 4@ size 4 virtual_protect 0
  170. 4@ += 48
  171. 0A8C: write_memory 4@ size 4 value 0@ virtual_protect 0
  172. 4@ += 4
  173. 0A8C: write_memory 4@ size 4 value 1@ virtual_protect 0
  174. 4@ += 4
  175. 0A8C: write_memory 4@ size 4 value 2@ virtual_protect 0
  176. ret 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement