Advertisement
Guest User

Untitled

a guest
Dec 25th, 2019
1,307
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.32 KB | None | 0 0
  1. script_name('Wallhack')
  2. script_author('DovaRage')
  3. script_description('Wallhack by DovaRage ( WH on keyboard )')
  4. require "lib.moonloader"
  5. --0xff0000 - red
  6. --0x00ff1e - green
  7. --0xfe1b60 - pink
  8. turn = false
  9. function main()
  10. if not isSampLoaded() or not isSampfuncsLoaded() then return end
  11. while not isSampAvailable() do wait(100) end
  12. sampAddChatMessage("Wallhack ( WH on keyboard )", 0xfe1b60)
  13. while true do
  14. wait(0)
  15. if isKeyJustPressed(VK_W) then
  16. if isKeyJustPressed(VK_H) then
  17. if turn == false then
  18. turn = true
  19. sampAddChatMessage('Wallhack by DovaRage Activated', 0x00ff1e)
  20. else
  21. turn=false
  22. sampAddChatMessage('Wallhack by DovaRage Deactivated', 0xff0000)
  23. end
  24. end
  25. end
  26.  
  27. if not turn then
  28. for i = 0, sampGetMaxPlayerId() do
  29. if sampIsPlayerConnected(i) then
  30. _,pped=sampGetCharHandleBySampPlayerId(i)
  31. if (doesCharExist(pped) and isCharOnScreen(pped)) then
  32. -----------------------------------------------------------Cords---------------------------------------------------------------------------------
  33. otherPlayer3D_X,otherPlayer3D_Y,otherPlayer3D_Z=getCharCoordinates(pped)--3D cords of other players
  34. otherPlayer2D_X,otherPlayer2D_Y,otherPlayer2D_Z=convert3DCoordsToScreen(otherPlayer3D_X, otherPlayer3D_Y, otherPlayer3D_Z)--2D cords other players
  35. my3D_X,my3D_Y,my3D_Z=getCharCoordinates(playerPed)--My 3D cords
  36. my2D_X,my2D_Y,my2D_Z=convert3DCoordsToScreen(my3D_X, my3D_Y, my3D_Z)--My 2D cords
  37. -----------------------------------------------------------Distance---------------------------------------------------------------------------------
  38. distance= math.sqrt( ((otherPlayer3D_X-my3D_X)^2) + ((otherPlayer3D_Y-my3D_Y)^2)+((otherPlayer3D_Z-my3D_Z)^2))
  39. -----------------------------------------------------------Tracer---------------------------------------------------------------------------------
  40. renderDrawLine(otherPlayer2D_X, otherPlayer2D_Y, my2D_X, my2D_Y, 2.0, 0xFFD00000)
  41. -----------------------------------------------------------Box---------------------------------------------------------------------------------
  42. DrawBox(otherPlayer2D_X+30/math.sqrt(distance/5), otherPlayer2D_Y+90/math.sqrt(distance/5), otherPlayer2D_X-30/math.sqrt(distance/5), otherPlayer2D_Y-90/math.sqrt(distance/5))
  43. -----------------------------------------------------------health---------------------------------------------------------------------------------
  44. local font_flag = require('moonloader').font_flag
  45. local font = renderCreateFont('Calibri', 12, 0)
  46. renderFontDrawText(font, 'пример текста', otherPlayer2D_X, otherPlayer2D_Y, 0xFFD00000, false)
  47.  
  48.  
  49. -- sampCreate3dText(sampGetPlayerHealth(i), 0xFFD00000, otherPlayer3D_X, otherPlayer3D_Y, otherPlayer3D_Z, 300, true, -1, -1)
  50. --sampDestroy3dText(i)
  51. --sampCreate3dText(text, color, posX, posY, posZ, distance, ignoreWalls, playerId, vehicleId)
  52. -----------------------------------------------------------Armor---------------------------------------------------------------------------------
  53. end
  54. end
  55. end
  56. end
  57. end
  58. end
  59.  
  60.  
  61.  
  62. function DrawBox (x1,y1,x2,y2)
  63. renderDrawLine(x1, y1, x2, y1, 3, 0xFFD00000)
  64. renderDrawLine(x2, y1, x2, y2, 3, 0xFFD00000)
  65. renderDrawLine(x2, y2, x1, y2, 3, 0xFFD00000)
  66. renderDrawLine(x1, y2, x1, y1, 3, 0xFFD00000)
  67. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement