Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- script_name('Wallhack')
- script_author('DovaRage')
- script_description('Wallhack by DovaRage ( WH on keyboard )')
- require "lib.moonloader"
- --0xff0000 - red
- --0x00ff1e - green
- --0xfe1b60 - pink
- turn = false
- function main()
- if not isSampLoaded() or not isSampfuncsLoaded() then return end
- while not isSampAvailable() do wait(100) end
- sampAddChatMessage("Wallhack ( WH on keyboard )", 0xfe1b60)
- while true do
- wait(0)
- if isKeyJustPressed(VK_W) then
- if isKeyJustPressed(VK_H) then
- if turn == false then
- turn = true
- sampAddChatMessage('Wallhack by DovaRage Activated', 0x00ff1e)
- else
- turn=false
- sampAddChatMessage('Wallhack by DovaRage Deactivated', 0xff0000)
- end
- end
- end
- if not turn then
- for i = 0, sampGetMaxPlayerId() do
- if sampIsPlayerConnected(i) then
- _,pped=sampGetCharHandleBySampPlayerId(i)
- if (doesCharExist(pped) and isCharOnScreen(pped)) then
- -----------------------------------------------------------Cords---------------------------------------------------------------------------------
- otherPlayer3D_X,otherPlayer3D_Y,otherPlayer3D_Z=getCharCoordinates(pped)--3D cords of other players
- otherPlayer2D_X,otherPlayer2D_Y,otherPlayer2D_Z=convert3DCoordsToScreen(otherPlayer3D_X, otherPlayer3D_Y, otherPlayer3D_Z)--2D cords other players
- my3D_X,my3D_Y,my3D_Z=getCharCoordinates(playerPed)--My 3D cords
- my2D_X,my2D_Y,my2D_Z=convert3DCoordsToScreen(my3D_X, my3D_Y, my3D_Z)--My 2D cords
- -----------------------------------------------------------Distance---------------------------------------------------------------------------------
- distance= math.sqrt( ((otherPlayer3D_X-my3D_X)^2) + ((otherPlayer3D_Y-my3D_Y)^2)+((otherPlayer3D_Z-my3D_Z)^2))
- -----------------------------------------------------------Tracer---------------------------------------------------------------------------------
- renderDrawLine(otherPlayer2D_X, otherPlayer2D_Y, my2D_X, my2D_Y, 2.0, 0xFFD00000)
- -----------------------------------------------------------Box---------------------------------------------------------------------------------
- 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))
- -----------------------------------------------------------health---------------------------------------------------------------------------------
- local font_flag = require('moonloader').font_flag
- local font = renderCreateFont('Calibri', 12, 0)
- renderFontDrawText(font, 'пример текста', otherPlayer2D_X, otherPlayer2D_Y, 0xFFD00000, false)
- -- sampCreate3dText(sampGetPlayerHealth(i), 0xFFD00000, otherPlayer3D_X, otherPlayer3D_Y, otherPlayer3D_Z, 300, true, -1, -1)
- --sampDestroy3dText(i)
- --sampCreate3dText(text, color, posX, posY, posZ, distance, ignoreWalls, playerId, vehicleId)
- -----------------------------------------------------------Armor---------------------------------------------------------------------------------
- end
- end
- end
- end
- end
- end
- function DrawBox (x1,y1,x2,y2)
- renderDrawLine(x1, y1, x2, y1, 3, 0xFFD00000)
- renderDrawLine(x2, y1, x2, y2, 3, 0xFFD00000)
- renderDrawLine(x2, y2, x1, y2, 3, 0xFFD00000)
- renderDrawLine(x1, y2, x1, y1, 3, 0xFFD00000)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement