Advertisement
Guest User

[PMT] Player List

a guest
Aug 12th, 2015
507
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.47 KB | None | 0 0
  1. {$CLEO .cs}
  2. 0000: NOP
  3. 0662: "PopandauL"
  4.  
  5. thread '$PopandauL'
  6.  
  7. if
  8. 8AF7: get_samp_base_to 33@
  9. then
  10. 0A93: end_custom_thread
  11. end
  12. repeat
  13. wait 400
  14. until 0AFA: is_samp_structures_available
  15.  
  16. wait 0
  17. 26@ = 0
  18. 0B6D: render 0@ = create_font "Arial" height 9 flags 0x04
  19. 0AB1: call_scm_func @getNameTagDistance 0 28@
  20. 0B34: samp register_client_command "togplist" to_label @toggle
  21. 0B34: samp register_client_command "fstop" to_label @endthread
  22.  
  23. while true
  24. wait 0
  25. if and
  26. 26@ == 1
  27. Player.Defined($PLAYER_ACTOR)
  28. 02CB: actor $PLAYER_ACTOR bounding_sphere_visible
  29. then
  30. 1@ = 225
  31. 16@ = 0
  32. 0A8D: 29@ = read_memory 0xB74490 size 4 virtual_protect 0
  33. 000A: 29@ += 0x4
  34. 0A8D: 29@ = read_memory 29@ size 4 virtual_protect 0
  35. for 30@ = 0 to 35584 step 0x100
  36. 0A8D: 31@ = read_memory 29@ size 1 virtual_protect 0
  37. 000A: 29@ += 0x1
  38. if and
  39. 0029: 31@ >= 0x00
  40. 001B: 0x80 > 31@
  41. then
  42. 005A: 31@ += 30@
  43. 16@ += 1
  44. 15@ = 45
  45.  
  46. 0085: 17@ = 16@
  47. 17@ /= 20
  48. 17@ *= 140
  49. 005A: 15@ += 17@
  50. if or
  51. 16@ == 20
  52. 16@ == 40
  53. 16@ == 60
  54. 16@ == 80
  55. then
  56. 1@ = 225
  57. end
  58.  
  59. 0AB1: call_scm_func @distanceBetweenPeds 1 31@ 5@
  60. 00A0: store_actor $PLAYER_ACTOR position_to 9@ 10@ 11@
  61. 00A0: store_actor 31@ position_to 12@ 13@ 14@
  62. 0B55: convert_3D_coords 9@ 10@ 11@ to_screen 5@ 6@
  63. 0B55: convert_3D_coords 12@ 13@ 14@ to_screen 7@ 8@
  64. if
  65. 0035: 28@ >= 5@
  66. then
  67. 1@ += 14
  68. 0B2B: samp 2@ = get_player_id_by_actor_handle 31@
  69. 0B36: samp 3@ = get_player_nickname 2@
  70. 0B37: samp 4@ = get_player_color 2@
  71. 0B6F: render font 0@ draw_text 3@ pos 15@ 1@ color 4@
  72. if and
  73. 02CB: actor 31@ bounding_sphere_visible
  74. 803C: $PLAYER_ACTOR == 31@
  75. 8118: actor 31@ dead
  76. 06BD: no_obstacles_between 9@ 10@ 11@ and 12@ 13@ 14@ solid 1 car 0 actor 0 object 1 particle 0
  77. then
  78. 0B68: render draw_line_point1 5@ 6@ point2 7@ 8@ width 1 color 4@
  79. end
  80. end
  81. end
  82. end
  83. end
  84. end
  85.  
  86. :getNameTagDistance
  87. 0AA2: 0@ = load_library "samp.dll" // IF and SET
  88. 0@ += 2173568
  89. 0A8D: 0@ = read_memory 0@ size 4 virtual_protect 0
  90. 0@ += 981
  91. 0A8D: 0@ = read_memory 0@ size 4 virtual_protect 0
  92. 0A8E: 1@ = 0@ + 47
  93. 0A8C: write_memory 1@ size 1 value 0 virtual_protect 0
  94. 0A8E: 1@ = 0@ + 39
  95. 0A8D: 2@ = read_memory 1@ size 4 virtual_protect 0
  96. 0AB2: ret 1 2@
  97.  
  98. :distanceBetweenPeds
  99. 00A0: store_actor 0@ position_to 1@ 2@ 3@
  100. 00A0: store_actor $PLAYER_ACTOR position_to 4@ 5@ 6@
  101. 050A: 7@ = distance_between_XYZ 1@ 2@ 3@ and_XYZ 4@ 5@ 6@
  102. 0AB2: ret 1 7@
  103.  
  104. :toggle
  105. wait 0
  106. 0B12: 26@ = 26@ XOR 1
  107. if 26@ == 1
  108. then
  109. 0AD1: show_formatted_text_highpriority "~w~Player List ~g~Activated~w~" time 1200
  110. else
  111. 0AD1: show_formatted_text_highpriority "~w~Player List ~r~Deactivated~w~" time 1200
  112. end
  113. Samp.CmdRet()
  114.  
  115. :endthread
  116. wait 0
  117. 0A93: end_custom_thread
  118. Samp.CmdRet()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement