помогите с созданием вх

Kegwineye.

Участник
Автор темы
478
20
как сделать вх на подобие такого ?


Код уже подготовил


Lua:
function imgui.OnDrawFrame() -- РЅРµ Flame Р° Frame!!
     imgui.Begin("Start imgui", main_window_state)
     if imgui.CollapsingHeader('Wall Hack Settings') then
     imgui.Checkbox(u8"Линия к игрокам", checkline)
     imgui.Checkbox(u8"Информация об игроках", checkstatsplayer)
     imgui.Checkbox(u8"Инфобар", checkinfobar)
     imgui.Checkbox(u8"Дополнение к инфобару", checkdopinfobar)
     end
     imgui.End()
    end

@chapo @Cosmo @Rice.
 
Решение
Lua:
local imgui = require('imgui')
local encoding = require 'encoding'
encoding.default = 'CP1251'
u8 = encoding.UTF8

local window = imgui.ImBool(false)
local settings = {
    enabled = imgui.ImBool(true),
    line = imgui.ImBool(true),
    info = imgui.ImBool(true),
}
local font = renderCreateFont('Tahoma', 10, 5)

function main()
    while not isSampAvailable() do wait(200) end
    imgui.Process = false
    window.v = true  --show window
    while true do
        wait(0)
        imgui.Process = window.v
        if settings.enabled.v then
            for k, v in pairs(getAllChars()) do
                local myX, myY, myZ = getCharCoordinates(PLAYER_PED)
                local x, y, z = getCharCoordinates(v)
                local r_myX...

chapo

🫡 В армии с 17.10.2023. В ЛС НЕ ОТВЕЧАЮ
Друг
8,776
11,226
Lua:
local imgui = require('imgui')
local encoding = require 'encoding'
encoding.default = 'CP1251'
u8 = encoding.UTF8

local window = imgui.ImBool(false)
local settings = {
    enabled = imgui.ImBool(true),
    line = imgui.ImBool(true),
    info = imgui.ImBool(true),
}
local font = renderCreateFont('Tahoma', 10, 5)

function main()
    while not isSampAvailable() do wait(200) end
    imgui.Process = false
    window.v = true  --show window
    while true do
        wait(0)
        imgui.Process = window.v
        if settings.enabled.v then
            for k, v in pairs(getAllChars()) do
                local myX, myY, myZ = getCharCoordinates(PLAYER_PED)
                local x, y, z = getCharCoordinates(v)
                local r_myX, r_myY = convert3DCoordsToScreen(myX, myY, myZ)
                local r_X, r_Y = convert3DCoordsToScreen(x, y, z)
                if settings.line.v then
                    if v ~= PLAYER_PED and isCharOnScreen(v) then
                        renderDrawLine(r_myX, r_myY, r_X, r_Y, 3, 0xFFff004d)
                    end
                end
                if settings.info.v then
                    if v ~= PLAYER_PED and isCharOnScreen(v) then
                        _, id = sampGetPlayerIdByCharHandle(v)
                        renderFontDrawText(font, 'ID: '..id..'\nNick: '..sampGetPlayerNickname(id)..'\nHP: '..getCharHealth(v)..'\nARM: '..getCharArmour(v), r_X, r_Y, 0xFFFFFFFF, 0x90000000)
                    end
                end
            end
        end
    end
end

function imgui.OnDrawFrame()
    if window.v then
        imgui.SetNextWindowPos(imgui.ImVec2(650.0, 250.0), imgui.Cond.FirstUseEver)
        imgui.SetNextWindowSize(imgui.ImVec2(280.0, 70.0), imgui.Cond.FirstUseEver)
        imgui.Begin('Window Title', window)

        imgui.Checkbox('Enable wh', settings.enabled)
        imgui.Separator()
        imgui.Checkbox('Draw lines to peds', settings.line)
        imgui.Checkbox('Draw ped info', settings.info)
        imgui.End()
    end
end

1637407399300.png
 
  • Нравится
Реакции: Rice.

Kegwineye.

Участник
Автор темы
478
20
Lua:
local imgui = require('imgui')
local encoding = require 'encoding'
encoding.default = 'CP1251'
u8 = encoding.UTF8

local window = imgui.ImBool(false)
local settings = {
    enabled = imgui.ImBool(true),
    line = imgui.ImBool(true),
    info = imgui.ImBool(true),
}
local font = renderCreateFont('Tahoma', 10, 5)

function main()
    while not isSampAvailable() do wait(200) end
    imgui.Process = false
    window.v = true  --show window
    while true do
        wait(0)
        imgui.Process = window.v
        if settings.enabled.v then
            for k, v in pairs(getAllChars()) do
                local myX, myY, myZ = getCharCoordinates(PLAYER_PED)
                local x, y, z = getCharCoordinates(v)
                local r_myX, r_myY = convert3DCoordsToScreen(myX, myY, myZ)
                local r_X, r_Y = convert3DCoordsToScreen(x, y, z)
                if settings.line.v then
                    if v ~= PLAYER_PED and isCharOnScreen(v) then
                        renderDrawLine(r_myX, r_myY, r_X, r_Y, 3, 0xFFff004d)
                    end
                end
                if settings.info.v then
                    if v ~= PLAYER_PED and isCharOnScreen(v) then
                        _, id = sampGetPlayerIdByCharHandle(v)
                        renderFontDrawText(font, 'ID: '..id..'\nNick: '..sampGetPlayerNickname(id)..'\nHP: '..getCharHealth(v)..'\nARM: '..getCharArmour(v), r_X, r_Y, 0xFFFFFFFF, 0x90000000)
                    end
                end
            end
        end
    end
end

function imgui.OnDrawFrame()
    if window.v then
        imgui.SetNextWindowPos(imgui.ImVec2(650.0, 250.0), imgui.Cond.FirstUseEver)
        imgui.SetNextWindowSize(imgui.ImVec2(280.0, 70.0), imgui.Cond.FirstUseEver)
        imgui.Begin('Window Title', window)

        imgui.Checkbox('Enable wh', settings.enabled)
        imgui.Separator()
        imgui.Checkbox('Draw lines to peds', settings.line)
        imgui.Checkbox('Draw ped info', settings.info)
        imgui.End()
    end
end

Посмотреть вложение 123166
enable типо включает сам ВХ ?
 

Kegwineye.

Участник
Автор темы
478
20
у меня оно после Ctrl + R отображается на миллисеку и пропадает

а все, конфликтовали два скрипта

@chapo как сделать активацию по команде ?

Lua:
local imgui = require('imgui')
local encoding = require 'encoding'
encoding.default = 'CP1251'
u8 = encoding.UTF8

local themes = import "resource/imgui_themes.lua"

local window = imgui.ImBool(false)
local settings = {
    enabled = imgui.ImBool(true),
    line = imgui.ImBool(true),
    info = imgui.ImBool(true),
}
local font = renderCreateFont('Tahoma', 10, 5)

function main()
    if not isSampLoaded() or not isSampfuncsLoaded() then return end
    while not isSampAvailable() do wait(100) end
    sampRegisterChatCommand("eh", cmdimgui)
    imgui.Process = false
    window.v = true  --show window
    while true do
        wait(0)
        imgui.Process = window.v
        if settings.enabled.v then
            for k, v in pairs(getAllChars()) do
                local myX, myY, myZ = getCharCoordinates(PLAYER_PED)
                local x, y, z = getCharCoordinates(v)
                local r_myX, r_myY = convert3DCoordsToScreen(myX, myY, myZ)
                local r_X, r_Y = convert3DCoordsToScreen(x, y, z)
                if settings.line.v then
                    if v ~= PLAYER_PED and isCharOnScreen(v) then
                        renderDrawLine(r_myX, r_myY, r_X, r_Y, 3, 0xFFff004d)
                    end
                end
                if settings.info.v then
                    if v ~= PLAYER_PED and isCharOnScreen(v) then
                        _, id = sampGetPlayerIdByCharHandle(v)
                        renderFontDrawText(font, 'ID: '..id..'\nNick: '..sampGetPlayerNickname(id)..'\nHP: '..getCharHealth(v)..'\nARM: '..getCharArmour(v), r_X, r_Y, 0xFFFFFFFF, 0x90000000)
                    end
                end
            end
        end
    end
end

function imgui.OnDrawFrame()
    if window.v then
        imgui.SetNextWindowPos(imgui.ImVec2(650.0, 250.0), imgui.Cond.FirstUseEver)
        imgui.SetNextWindowSize(imgui.ImVec2(280.0, 70.0), imgui.Cond.FirstUseEver)
        imgui.Begin('Multi-Cheat Menu | Han', window)
     if imgui.CollapsingHeader('Wall Hack Settings', imgui.imVec2(200,200)) then
         imgui.Checkbox(u8'Включить Wall Hack', settings.enabled)
        imgui.Separator()
     imgui.Checkbox(u8"Линия к игрокам", settings.line)
     imgui.Checkbox(u8"Информация об игроках", settings.info)
     imgui.Checkbox(u8"Инфобар", checkinfobar)
     imgui.Checkbox(u8"Дополнение к инфобару", checkdopinfobar)
    end
end
 
Последнее редактирование:

chapo

🫡 В армии с 17.10.2023. В ЛС НЕ ОТВЕЧАЮ
Друг
8,776
11,226
у меня оно после Ctrl + R отображается на миллисеку и пропадает

а все, конфликтовали два скрипта

@chapo как сделать активацию по команде ?

Lua:
local imgui = require('imgui')
local encoding = require 'encoding'
encoding.default = 'CP1251'
u8 = encoding.UTF8

local themes = import "resource/imgui_themes.lua"

local window = imgui.ImBool(false)
local settings = {
    enabled = imgui.ImBool(true),
    line = imgui.ImBool(true),
    info = imgui.ImBool(true),
}
local font = renderCreateFont('Tahoma', 10, 5)

function main()
    if not isSampLoaded() or not isSampfuncsLoaded() then return end
    while not isSampAvailable() do wait(100) end
    sampRegisterChatCommand("eh", cmdimgui)
    imgui.Process = false
    window.v = true  --show window
    while true do
        wait(0)
        imgui.Process = window.v
        if settings.enabled.v then
            for k, v in pairs(getAllChars()) do
                local myX, myY, myZ = getCharCoordinates(PLAYER_PED)
                local x, y, z = getCharCoordinates(v)
                local r_myX, r_myY = convert3DCoordsToScreen(myX, myY, myZ)
                local r_X, r_Y = convert3DCoordsToScreen(x, y, z)
                if settings.line.v then
                    if v ~= PLAYER_PED and isCharOnScreen(v) then
                        renderDrawLine(r_myX, r_myY, r_X, r_Y, 3, 0xFFff004d)
                    end
                end
                if settings.info.v then
                    if v ~= PLAYER_PED and isCharOnScreen(v) then
                        _, id = sampGetPlayerIdByCharHandle(v)
                        renderFontDrawText(font, 'ID: '..id..'\nNick: '..sampGetPlayerNickname(id)..'\nHP: '..getCharHealth(v)..'\nARM: '..getCharArmour(v), r_X, r_Y, 0xFFFFFFFF, 0x90000000)
                    end
                end
            end
        end
    end
end

function imgui.OnDrawFrame()
    if window.v then
        imgui.SetNextWindowPos(imgui.ImVec2(650.0, 250.0), imgui.Cond.FirstUseEver)
        imgui.SetNextWindowSize(imgui.ImVec2(280.0, 70.0), imgui.Cond.FirstUseEver)
        imgui.Begin('Multi-Cheat Menu | Han', window)
     if imgui.CollapsingHeader('Wall Hack Settings', imgui.imVec2(200,200)) then
         imgui.Checkbox(u8'Включить Wall Hack', settings.enabled)
        imgui.Separator()
     imgui.Checkbox(u8"Линия к игрокам", settings.line)
     imgui.Checkbox(u8"Информация об игроках", settings.info)
     imgui.Checkbox(u8"Инфобар", checkinfobar)
     imgui.Checkbox(u8"Дополнение к инфобару", checkdopinfobar)
    end
end
Lua:
-- вх
sampRegisterChatCommand('wh', function() settings.enabled.v = not settings.enabled.v end)

-- открытие меню
sampRegisterChatCommand('wh.menu', function() window.v = not window.v end)
 
  • Влюблен
Реакции: JesusCryMan

Kegwineye.

Участник
Автор темы
478
20
как сделать чтобы он при запуске игры сразу незапускался ? а ток по команде

Lua:
local imgui = require('imgui')
local encoding = require 'encoding'
encoding.default = 'CP1251'
u8 = encoding.UTF8

local themes = import "resource/imgui_themes.lua"
local window = imgui.ImBool(false)
local settings = {
    enabled = imgui.ImBool(true),
    line = imgui.ImBool(true),
    info = imgui.ImBool(true),
}
local font = renderCreateFont('Tahoma', 10, 5)

function main()
    while not isSampAvailable() do wait(200) end
-- вх
sampRegisterChatCommand('wh', function() settings.enabled.v = not settings.enabled.v end)

-- открытие меню
sampRegisterChatCommand('wh.menu', function() window.v = not window.v end)
    imgui.Process = false
    window.v = true  --show window
                   imgui.SwitchContext()
    themes.SwitchColorTheme(5)
    while true do
        wait(0)
        imgui.Process = window.v
        if settings.enabled.v then
            for k, v in pairs(getAllChars()) do
                local myX, myY, myZ = getCharCoordinates(PLAYER_PED)
                local x, y, z = getCharCoordinates(v)
                local r_myX, r_myY = convert3DCoordsToScreen(myX, myY, myZ)
                local r_X, r_Y = convert3DCoordsToScreen(x, y, z)
                if settings.line.v then
                    if v ~= PLAYER_PED and isCharOnScreen(v) then
                        renderDrawLine(r_myX, r_myY, r_X, r_Y, 3, 0xFFff014d)
                    end
                end
                if settings.info.v then
                    if v ~= PLAYER_PED and isCharOnScreen(v) then
                        _, id = sampGetPlayerIdByCharHandle(v)
                        renderFontDrawText(font, 'ID: '..id..'\nNick: '..sampGetPlayerNickname(id)..'\nHP: '..getCharHealth(v)..'\nARM: '..getCharArmour(v), r_X, r_Y, 0xFFFFFFFF, 0x90000000)
                    end
                end
            end
        end
    end
end

function imgui.OnDrawFrame()
    if window.v then
        imgui.SetNextWindowPos(imgui.ImVec2(650.0, 250.0), imgui.Cond.FirstUseEver)
        imgui.SetNextWindowSize(imgui.ImVec2(280.0, 70.0), imgui.Cond.FirstUseEver)
        imgui.Begin('Multi-Cheat Menu | By Han', window)

        imgui.Checkbox(u8'Включить WallHack', settings.enabled)
        imgui.Separator()
        imgui.Checkbox(u8'Линия к игрокам', settings.line)
        imgui.Checkbox(u8'Информация о игроках', settings.info)
        imgui.End()
    end
end

И как исправить то что в информации о игроке у него постоянно 1к хп ток после смерти 0 ?

и чо делать если if imgui.CollapsingHeader('Wall Hack Settings', imgui.imVec2(200,200)) then не работает ?

@chapo
 
Последнее редактирование:

chapo

🫡 В армии с 17.10.2023. В ЛС НЕ ОТВЕЧАЮ
Друг
8,776
11,226
как сделать чтобы он при запуске игры сразу незапускался ? а ток по команде

Lua:
local imgui = require('imgui')
local encoding = require 'encoding'
encoding.default = 'CP1251'
u8 = encoding.UTF8

local themes = import "resource/imgui_themes.lua"
local window = imgui.ImBool(false)
local settings = {
    enabled = imgui.ImBool(true),
    line = imgui.ImBool(true),
    info = imgui.ImBool(true),
}
local font = renderCreateFont('Tahoma', 10, 5)

function main()
    while not isSampAvailable() do wait(200) end
-- вх
sampRegisterChatCommand('wh', function() settings.enabled.v = not settings.enabled.v end)

-- открытие меню
sampRegisterChatCommand('wh.menu', function() window.v = not window.v end)
    imgui.Process = false
    window.v = true  --show window
                   imgui.SwitchContext()
    themes.SwitchColorTheme(5)
    while true do
        wait(0)
        imgui.Process = window.v
        if settings.enabled.v then
            for k, v in pairs(getAllChars()) do
                local myX, myY, myZ = getCharCoordinates(PLAYER_PED)
                local x, y, z = getCharCoordinates(v)
                local r_myX, r_myY = convert3DCoordsToScreen(myX, myY, myZ)
                local r_X, r_Y = convert3DCoordsToScreen(x, y, z)
                if settings.line.v then
                    if v ~= PLAYER_PED and isCharOnScreen(v) then
                        renderDrawLine(r_myX, r_myY, r_X, r_Y, 3, 0xFFff014d)
                    end
                end
                if settings.info.v then
                    if v ~= PLAYER_PED and isCharOnScreen(v) then
                        _, id = sampGetPlayerIdByCharHandle(v)
                        renderFontDrawText(font, 'ID: '..id..'\nNick: '..sampGetPlayerNickname(id)..'\nHP: '..getCharHealth(v)..'\nARM: '..getCharArmour(v), r_X, r_Y, 0xFFFFFFFF, 0x90000000)
                    end
                end
            end
        end
    end
end

function imgui.OnDrawFrame()
    if window.v then
        imgui.SetNextWindowPos(imgui.ImVec2(650.0, 250.0), imgui.Cond.FirstUseEver)
        imgui.SetNextWindowSize(imgui.ImVec2(280.0, 70.0), imgui.Cond.FirstUseEver)
        imgui.Begin('Multi-Cheat Menu | By Han', window)

        imgui.Checkbox(u8'Включить WallHack', settings.enabled)
        imgui.Separator()
        imgui.Checkbox(u8'Линия к игрокам', settings.line)
        imgui.Checkbox(u8'Информация о игроках', settings.info)
        imgui.End()
    end
end

И как исправить то что в информации о игроке у него постоянно 1к хп ток после смерти 0 ?

и чо делать если if imgui.CollapsingHeader('Wall Hack Settings', imgui.imVec2(200,200)) then не работает ?

@chapo
getCharHealth(v) замени на sampGetPlayerHealth(id)
в collapsingheader нет аргумента который принимает размеры
1637415523006.png


как сделать чтобы он при запуске игры сразу незапускался ? а ток по команде
поставь значение settings.enabled.v = false
 

Kegwineye.

Участник
Автор темы
478
20

Kegwineye.

Участник
Автор темы
478
20
Lua:
local imgui = require('imgui')
local encoding = require 'encoding'
encoding.default = 'CP1251'
u8 = encoding.UTF8

local checkinfobar = imgui.ImBool()
local checkdopinfobar = imgui.ImBool()
local themes = import "resource/imgui_themes.lua"
local window = imgui.ImBool(false)
local settings = {
    enabled = imgui.ImBool(true),
    line = imgui.ImBool(true),
    info = imgui.ImBool(true),
}
local font = renderCreateFont('Arial Black', 10, 5)

function main()
    while not isSampAvailable() do wait(200) end

-- открытие меню
sampRegisterChatCommand('ch', function() window.v = not window.v end)
    imgui.Process = false
    window.v = true  --show window
                   imgui.SwitchContext()
    themes.SwitchColorTheme(5)
    while true do
        wait(0)
        imgui.Process = window.v
        if settings.enabled.v then
            for k, v in pairs(getAllChars()) do
                local myX, myY, myZ = getCharCoordinates(PLAYER_PED)
                local x, y, z = getCharCoordinates(v)
                local r_myX, r_myY = convert3DCoordsToScreen(myX, myY, myZ)
                local r_X, r_Y = convert3DCoordsToScreen(x, y, z)
                if settings.line.v then
                    if v ~= PLAYER_PED and isCharOnScreen(v) then
                        renderDrawLine(r_myX, r_myY, r_X, r_Y, 3, 0xFFff004d)
                    end
                end
                if settings.info.v then
                    if v ~= PLAYER_PED and isCharOnScreen(v) then
                        _, id = sampGetPlayerIdByCharHandle(v)
                        renderFontDrawText(font, 'ID: '..id..'\nNick: '..sampGetPlayerNickname(id)..'\n{FF0000}HeatlyPoint: '..sampGetPlayerHealth(id)..'\n{FFFFFF}Armour: '..getCharArmour(v), r_X, r_Y, 0xFFFFFFFF, 0x90000000)
                    end
                end
            end
        end
    end
end

function imgui.OnDrawFrame()
    if window.v then
        if imgui.CollapsingHeader('WallHack Settings') then
        imgui.SetNextWindowPos(imgui.ImVec2(650.0, 250.0), imgui.Cond.FirstUseEver)
        imgui.SetNextWindowSize(imgui.ImVec2(280.0, 70.0), imgui.Cond.FirstUseEver)
        imgui.Begin('Multi-Cheat Menu | By Han', window)
        imgui.Checkbox(u8'Включить WallHack', settings.enabled)
        imgui.Checkbox(u8'Линия к игрокам', settings.line)
        imgui.Checkbox(u8'Информация о игроках', settings.info)
             imgui.Checkbox(u8"Инфобар", checkinfobar)
     imgui.Checkbox(u8"Дополнение к инфобару", checkdopinfobar)
 end
     imgui.Separator()
        imgui.End()
    end
end