Advertisement
Guest User

Untitled

a guest
Oct 9th, 2022
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.91 KB | None | 0 0
  1. {$CLEO}
  2. 0000: NOP
  3. thread "awalk"
  4. wait 2000
  5.  
  6. 0B34: samp register_client_command "awalk" to_label @awalk
  7. 19@ = 2150
  8. 20@ = 2150
  9. chatmsg "awalk by {28afe0} [TwentyOne]{ffffff}, pentru detalii /ahelp" -1
  10.  
  11. :awalk
  12. if 22@ == 0
  13. then
  14. 22@ = 1
  15. else
  16. if 22@ == 1
  17. then
  18. 22@ = 0
  19. end
  20. end
  21. samp.CmdRet()
  22.  
  23. if 22@ == 1
  24. then
  25. call @cpexists 0 23@
  26. if and
  27. 24@ == 0
  28. 23@ == 1
  29. then
  30. 24@ = 1
  31. end
  32. if 23@ == 1
  33. then
  34.  
  35.  
  36. call @get_cp_pos 0 X 28@ Y 29@ Z 30@
  37. 00A0: store_actor $PLAYER_ACTOR position_to $px $py $pz
  38. 0509: 27@ = distance_between_XY $px $py and_XY 28@ 29@
  39. if 27@ < 100.0
  40. then
  41. //0A8C: write_memory 0xB7345B size 1 value 255 virtual_protect 0 // cod de mers
  42. 0B56: set_game_key 1 state -255
  43. 0B56: set_game_key 16 state 255
  44. call @camatpos 5 _XYZ 28@ 29@ 30@ _withCamOffsetAngleX 0.0 _andCamOffsetAngleZ 0.0
  45. end
  46. end
  47. if 23@ == 0
  48. then
  49. 22@ = 0
  50. wait 250
  51. say "/stopanim"
  52. if 24@ ==1
  53. then
  54. 24@ = 0
  55. 22@ = 1
  56. wait 1000
  57. end
  58. end
  59. if 22@ == 0
  60. then
  61. chatmsg "Job done!" -1
  62. 18@ = 0
  63. end
  64. end
  65.  
  66. wait 0
  67.  
  68. :get_cp_pos
  69. if
  70. 0AA2: 0@ = load_library "samp.dll" // IF and SET
  71. then
  72. 0A8E: 1@ = 0@ + 2203916 // int
  73. 0A8D: 1@ = read_memory 1@ size 4 virtual_protect 0
  74. 1@ += 12
  75. 0A8D: 15@ = read_memory 1@ size 4 virtual_protect 0
  76. 1@ += 4
  77. 0A8D: 16@ = read_memory 1@ size 4 virtual_protect 0
  78. 1@ += 4
  79. 0A8D: 17@ = read_memory 1@ size 4 virtual_protect 0
  80. 0AA3: free_library 0@
  81. end
  82. 0AB2: ret 3 15@ 16@ 17@
  83.  
  84. :cpexists
  85. if 0AA2: 0@ = load_library "samp.dll" // IF and SET
  86. then
  87. 0A8E: 1@ = 0@ + 2203916 // int
  88. 0A8D: 1@ = read_memory 1@ size 4 virtual_protect 0
  89. 1@ += 36
  90. 0A8D: 1@ = read_memory 1@ size 4 virtual_protect 0
  91. 0AA3: free_library 0@
  92. end
  93. 0AB2: ret 1 1@
  94.  
  95. :camatpos
  96. // ~~~~~~~~~~anti auto-vehicle cam movement
  97. if and
  98. TIMER = 400
  99. Actor.Driving($PLAYER_ACTOR)
  100. then
  101. 0A8C: write_memory 0xB70118 size 4 value 50.0 virtual_protect 0 // reset camera stabalizer timer, credit to Parazitas
  102. TIMER = 0
  103. end
  104. // ~~~~~~~~~~
  105.  
  106. 068D: get_camera_position_to 31@ 30@ 29@
  107.  
  108. // ~~~~~~~~~~Camera Z-Angle from our camera towards the target
  109. 0087: 28@ = 1@ // y2
  110. 0063: 28@ -= 30@ // y1
  111. 0087: 27@ = 0@ // x2
  112. 0063: 27@ -= 31@ // x1
  113. 0AA5: atan2 | 0x4207C0 2 2 | _X 27@ _Y 28@
  114. 0AE9: pop_float 28@ // store result from above operation
  115. 28@ += 3.1415926535897981710616733832795 // Camera Angle Leads 180 degrees respect to Z world coordinats
  116. 005B: 28@ += 4@ // use the defined camz offset to move the camera leftwards or rightwards
  117. // ~~~~~~~~~~
  118.  
  119. // ~~~~~~~~~~Camera X-Angle from our camera towards the target
  120. 0087: 27@ = 2@ // z2
  121. 0063: 27@ -= 29@ // z1
  122. 0509: 26@ = distance_between_XY 31@ 30@ and_XY 0@ 1@ // adjacent side
  123. 0AA5: atan2 | 0x4207C0 2 2 | _X 26@ _Y 27@
  124. 0AE9: pop_float 27@ // store result from above operation
  125. 005B: 27@ += 3@ // use the defined camx offset to move the camera downwards or upwards
  126. // ~~~~~~~~~~
  127.  
  128. 0A25: set_camera_on_players_X_angle 27@ Z_angle 28@
  129. ret 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement