- 6
- 1
У меня есть скрипт для взлома экрана Wallhack, но возникает проблема, когда камера направлена в сторону от персонажа: появляются полосы, как на картинке. Возможно, кто-то сталкивался с подобной проблемой.
the script:
local ffi = require "ffi"
local getBonePosition = ffi.cast("int (__thiscall*)(void*, float*, int, bool)", 0x5E4280)
local playerid = true
local allm = true
local line2 = false
local box3d = false
local playerss = true
local vxkosti = false
local font = renderCreateFont("Century Gothic", 9, 5)
function main()
repeat wait(0) until isSampAvailable()
sampAddChatMessage("[{B8FCFF}WallHack{FFFFFF}] | Loaded!", -1)
sampAddChatMessage("[{B8FCFF}WallHack{FFFFFF}] | /wh bones | /wh box | /wh line", -1)
sampRegisterChatCommand('wh', function(arg)
if arg == 'bones' then
vxkosti = not vxkosti
Boneschat()
elseif arg == 'box' then
box3d = not box3d
box3dchat()
elseif arg == 'line' then
line2 = not line2
linechat()
else
sampAddChatMessage("[{B8FCFF}WH{FFFFFF}] /wh bones | /wh box | /wh line", -1)
end
end)
while true do
wait(0)
if allm then
if playerid then
for _, p_handle in pairs(getAllChars()) do
if isCharOnScreen(p_handle) and p_handle ~= PLAYER_PED then
if playerss then
local x, y, z = getCharCoordinates(p_handle)
local x1, y2 = convert3DCoordsToScreen(x, y, z)
local x4, y4, z4 = getCharCoordinates(PLAYER_PED)
local x3, y3 = convert3DCoordsToScreen(x4, y4, z4)
if line2 then
renderDrawLine(x1, y2, x3, y3, 2, 0xB8B8FCFF)
end
if box3d then
local model = getCharModel(p_handle)
local x1, y1, z1 = getModelDimensions(model)
local lx, ly, lz = getOffsetFromCharInWorldCoords(p_handle, x1, -y1, z1)
local scx1, scy1 = convert3DCoordsToScreen(lx, ly, lz)
local lx, ly, lz = getOffsetFromCharInWorldCoords(p_handle, -x1, -y1, z1)
local scx2, scy2 = convert3DCoordsToScreen(lx, ly, lz)
renderDrawLine(scx1, scy1, scx2, scy2, 2, 0xB8B8FCFF)
local lx, ly, lz = getOffsetFromCharInWorldCoords(p_handle, x1, y1, z1 + 1.8)
local scx1, scy1 = convert3DCoordsToScreen(lx, ly, lz)
local lx, ly, lz = getOffsetFromCharInWorldCoords(p_handle, -x1, y1, z1 + 1.8)
local scx2, scy2 = convert3DCoordsToScreen(lx, ly, lz)
renderDrawLine(scx1, scy1, scx2, scy2, 2, 0xB8B8FCFF)
local lx, ly, lz = getOffsetFromCharInWorldCoords(p_handle, x1, -y1, z1 + 1.8)
local scx1, scy1 = convert3DCoordsToScreen(lx, ly, lz)
local lx, ly, lz = getOffsetFromCharInWorldCoords(p_handle, -x1, -y1, z1 + 1.8)
local scx2, scy2 = convert3DCoordsToScreen(lx, ly, lz)
renderDrawLine(scx1, scy1, scx2, scy2, 2, 0xB8B8FCFF)
local lx, ly, lz = getOffsetFromCharInWorldCoords(p_handle, -x1, -y1, z1 + 1.8)
local scx1, scy1 = convert3DCoordsToScreen(lx, ly, lz)
local lx, ly, lz = getOffsetFromCharInWorldCoords(p_handle, -x1, y1, z1 + 1.8)
local scx2, scy2 = convert3DCoordsToScreen(lx, ly, lz)
renderDrawLine(scx1, scy1, scx2, scy2, 2, 0xB8B8FCFF)
local lx, ly, lz = getOffsetFromCharInWorldCoords(p_handle, x1, y1, z1 + 1.8)
local scx1, scy1 = convert3DCoordsToScreen(lx, ly, lz)
local lx, ly, lz = getOffsetFromCharInWorldCoords(p_handle, x1, -y1, z1 + 1.8)
local scx2, scy2 = convert3DCoordsToScreen(lx, ly, lz)
renderDrawLine(scx1, scy1, scx2, scy2, 2, 0xB8B8FCFF)
local lx, ly, lz = getOffsetFromCharInWorldCoords(p_handle, -x1, -y1, z1)
local scx1, scy1 = convert3DCoordsToScreen(lx, ly, lz)
local lx, ly, lz = getOffsetFromCharInWorldCoords(p_handle, -x1, y1, z1)
local scx2, scy2 = convert3DCoordsToScreen(lx, ly, lz)
renderDrawLine(scx1, scy1, scx2, scy2, 2, 0xB8B8FCFF)
local lx, ly, lz = getOffsetFromCharInWorldCoords(p_handle, -x1, y1, z1)
local scx1, scy1 = convert3DCoordsToScreen(lx, ly, lz)
local lx, ly, lz = getOffsetFromCharInWorldCoords(p_handle, x1, y1, z1)
local scx2, scy2 = convert3DCoordsToScreen(lx, ly, lz)
renderDrawLine(scx1, scy1, scx2, scy2, 2, 0xB8B8FCFF)
local lx, ly, lz = getOffsetFromCharInWorldCoords(p_handle, x1, y1, z1)
local scx1, scy1 = convert3DCoordsToScreen(lx, ly, lz)
local lx, ly, lz = getOffsetFromCharInWorldCoords(p_handle, x1, -y1, z1)
local scx2, scy2 = convert3DCoordsToScreen(lx, ly, lz)
renderDrawLine(scx1, scy1, scx2, scy2, 2, 0xB8B8FCFF)
local lx, ly, lz = getOffsetFromCharInWorldCoords(p_handle, x1, y1, z1 + 1.8)
local scx1, scy1 = convert3DCoordsToScreen(lx, ly, lz)
local lx, ly, lz = getOffsetFromCharInWorldCoords(p_handle, x1, y1, z1)
local scx2, scy2 = convert3DCoordsToScreen(lx, ly, lz)
renderDrawLine(scx1, scy1, scx2, scy2, 2, 0xB8B8FCFF)
local lx, ly, lz = getOffsetFromCharInWorldCoords(p_handle, x1, -y1, z1 + 1.8)
local scx1, scy1 = convert3DCoordsToScreen(lx, ly, lz)
local lx, ly, lz = getOffsetFromCharInWorldCoords(p_handle, x1, -y1, z1)
local scx2, scy2 = convert3DCoordsToScreen(lx, ly, lz)
renderDrawLine(scx1, scy1, scx2, scy2, 2, 0xB8B8FCFF)
local lx, ly, lz = getOffsetFromCharInWorldCoords(p_handle, -x1, -y1, z1 + 1.8)
local scx1, scy1 = convert3DCoordsToScreen(lx, ly, lz)
local lx, ly, lz = getOffsetFromCharInWorldCoords(p_handle, -x1, -y1, z1)
local scx2, scy2 = convert3DCoordsToScreen(lx, ly, lz)
renderDrawLine(scx1, scy1, scx2, scy2, 2, 0xB8B8FCFF)
local lx, ly, lz = getOffsetFromCharInWorldCoords(p_handle, -x1, y1, z1 + 1.8)
local scx1, scy1 = convert3DCoordsToScreen(lx, ly, lz)
local lx, ly, lz = getOffsetFromCharInWorldCoords(p_handle, -x1, y1, z1)
local scx2, scy2 = convert3DCoordsToScreen(lx, ly, lz)
renderDrawLine(scx1, scy1, scx2, scy2, 2, 0xB8B8FCFF)
end
end
end
end
end
end
if vxkosti then
for i = 0, sampGetMaxPlayerId() do
if sampIsPlayerConnected(i) then
local result, cped = sampGetCharHandleBySampPlayerId(i)
if result then
if doesCharExist(cped) and isCharOnScreen(cped) then
local t = {3, 4, 5, 51, 52, 41, 42, 31, 32, 33, 21, 22, 23, 2}
for v = 1, #t do
pos1X, pos1Y, pos1Z = getBodyPartCoordinates(t[v], cped)
pos2X, pos2Y, pos2Z = getBodyPartCoordinates(t[v] + 1, cped)
pos1, pos2 = convert3DCoordsToScreen(pos1X, pos1Y, pos1Z)
pos3, pos4 = convert3DCoordsToScreen(pos2X, pos2Y, pos2Z)
renderDrawLine(pos1, pos2, pos3, pos4, 2, 0xB8B8FCFF)
end
for v = 4, 5 do
pos2X, pos2Y, pos2Z = getBodyPartCoordinates(v * 10 + 1, cped)
pos3, pos4 = convert3DCoordsToScreen(pos2X, pos2Y, pos2Z)
renderDrawLine(pos1, pos2, pos3, pos4, 2, 0xB8B8FCFF)
end
local t = {53, 43, 24, 34, 6}
for v = 1, #t do
posX, posY, posZ = getBodyPartCoordinates(t[v], cped)
pos1, pos2 = convert3DCoordsToScreen(posX, posY, posZ)
end
end
end
end
end
end
end
end
function getBodyPartCoordinates(id, handle)
local pedptr = getCharPointer(handle)
local vec = ffi.new("float[3]")
getBonePosition(ffi.cast("void*", pedptr), vec, id, true)
return vec[0], vec[1], vec[2]
end
function linechat()
if line2 then
printStringNow("[~b~WH~w~] Line On", 500)
else
printStringNow("[~b~WH~w~] Line Off", 500)
end
end
function box3dchat()
if box3d then
printStringNow("[~b~WH~w~] Box On", 500)
else
printStringNow("[~b~WH~w~] Box Off", 50
0)
end
end
function Boneschat()
if vxkosti then
printStringNow("[~b~WH~w~] Bone On", 500)
else
printStringNow("[~b~WH~w~] Bone Off", 500)
end
end