Advertisement
Guest User

Untitled

a guest
Dec 10th, 2016
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.01 KB | None | 0 0
  1. script_name("Player info")
  2. script_version_number(1)
  3. script_version("1.1")
  4. script_author("RollUp")
  5.  
  6.  
  7. function main()
  8. while not isSampAvailable() do wait(200) end
  9. x, y = getScreenResolution()
  10. font = renderCreateFont("Arial", 9, 12)
  11. while true do
  12. wait(0)
  13. res, handle = getCharPlayerIsTargeting(playerHandle)
  14. if res and not isKeyDown(119) then
  15. resid, id = sampGetPlayerIdByCharHandle(handle)
  16. color = sampGetPlayerColor(id)
  17. name = sampGetPlayerNickname(id)
  18. weapon = getCurrentCharWeapon(handle)
  19. weap = getweaponname(weapon)
  20. health = sampGetPlayerHealth(id)
  21. armor = sampGetPlayerArmor(id)
  22. ping = sampGetPlayerPing(id)
  23. score = sampGetPlayerScore(id)
  24. renderFontDrawText(font,string.format("Nickname: %s[%d]\nHealth: %d \nArmor: %d\nScore: %d\nPing: %d\nWeapon: %s", name, id, health, armor, score, ping, weap) ,x/35, y/3, color)
  25. end
  26. end
  27. end
  28.  
  29.  
  30. function getweaponname(weapon)
  31. local names = {
  32. [0] = "Fist",
  33. [1] = "Brass Knuckles",
  34. [2] = "Golf Club",
  35. [3] = "Nightstick",
  36. [4] = "Knife",
  37. [5] = "Baseball Bat",
  38. [6] = "Shovel",
  39. [7] = "Pool Cue",
  40. [8] = "Katana",
  41. [9] = "Chainsaw",
  42. [10] = "Purple Dildo",
  43. [11] = "Dildo",
  44. [12] = "Vibrator",
  45. [13] = "Silver Vibrator",
  46. [14] = "Flowers",
  47. [15] = "Cane",
  48. [16] = "Grenade",
  49. [17] = "Tear Gas",
  50. [18] = "Molotov Cocktail",
  51. [22] = "9mm",
  52. [23] = "Silenced 9mm",
  53. [24] = "Desert Eagle",
  54. [25] = "Shotgun",
  55. [26] = "Sawnoff Shotgun",
  56. [27] = "Combat Shotgun",
  57. [28] = "Micro SMG/Uzi",
  58. [29] = "MP5",
  59. [30] = "AK-47",
  60. [31] = "M4",
  61. [32] = "Tec-9",
  62. [33] = "Country Rifle",
  63. [34] = "Sniper Rifle",
  64. [35] = "RPG",
  65. [36] = "HS Rocket",
  66. [37] = "Flamethrower",
  67. [38] = "Minigun",
  68. [39] = "Satchel Charge",
  69. [40] = "Detonator",
  70. [41] = "Spraycan",
  71. [42] = "Fire Extinguisher",
  72. [43] = "Camera",
  73. [44] = "Night Vis Goggles",
  74. [45] = "Thermal Goggles",
  75. [46] = "Parachute" }
  76. return names[weapon]
  77. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement