Вопрос Как присвоить чекбоксу imgui::checkbox("glow" &glow) код

На самом деле я Zodiak
Участник
Статус
Оффлайн
Регистрация
22 Дек 2020
Сообщения
1,011
Реакции[?]
181
Поинты[?]
68K
как присвоить чекбоксу imgui::checkbox("glow" &glow) код из отдельного сурса :


Код:
BOOL WINAPI MainThread(HMODULE hModule)
{
    DWORD moduleBase = (DWORD)GetModuleHandle("client.dll");

    while (!GetAsyncKeyState(VK_INSERT))
    {
        DWORD LocalPlayer = *(DWORD*)(moduleBase + dwLocalPlayer);
        DWORD GlowObjectManager = *(DWORD*)(moduleBase + dwGlowObjectManager);
        DWORD EntityList = *(DWORD*)(moduleBase + dwEntityList);

        int LocalTeam = *(int*)(LocalPlayer + m_iTeamNum);
        


        for (int i = 1; i < 32; i++)
        {

            DWORD entity = *(DWORD*)(moduleBase + dwEntityList) + i * 0x10;

            if (entity == NULL) continue;

            int glowIndex = *(int*)(entity + m_iGlowIndex);
            int entityTeam = *(int*)(entity + m_iTeamNum);

            if (entityTeam == LocalTeam)

            {
                //local team
                *(float*)((GlowObjectManager + glowIndex * 0x38 + 0x4)) = 0.f; //R
                *(float*)((GlowObjectManager + glowIndex * 0x38 + 0x8)) = 1.f; //G
                *(float*)((GlowObjectManager + glowIndex * 0x38 + 0xC)) = 0.f; //B
                *(float*)((GlowObjectManager + glowIndex * 0x38 + 0x10)) = 1.7f; //a
            }
            else
            {
                //enemy team
                *(float*)((GlowObjectManager + glowIndex * 0x38 + 0x4)) = 1.f; //R
                *(float*)((GlowObjectManager + glowIndex * 0x38 + 0x8)) = 0.f; //G
                *(float*)((GlowObjectManager + glowIndex * 0x38 + 0xC)) = 0.f; //B
                *(float*)((GlowObjectManager + glowIndex * 0x38 + 0x10)) = 1.7f; //a

            }
            *(bool*)((GlowObjectManager + glowIndex * 0x38 + 0x24)) = true;
            *(bool*)((GlowObjectManager + glowIndex * 0x38 + 0x25)) = false;
                


        }
    }

    FreeLibraryAndExitThread(hModule, 0);
    return 0;
}

BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
{

    switch (ul_reason_for_call)
    {

    case DLL_PROCESS_ATTACH:
        CloseHandle(CreateThread(nullptr, 0, (LPTHREAD_START_ROUTINE)MainThread, hModule, 0, nullptr));

    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;




}



при том основной код это

Код:
#include "includes.h"

extern LRESULT ImGui_ImplWin32_WndProcHandler(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);

EndScene oEndScene = NULL;
WNDPROC oWndProc;
static HWND window = NULL;

void InitImGui(LPDIRECT3DDEVICE9 pDevice)
{
    ImGui::CreateContext();
    ImGuiIO& io = ImGui::GetIO();
    io.ConfigFlags = ImGuiConfigFlags_NoMouseCursorChange;
    ImGui_ImplWin32_Init(window);
    ImGui_ImplDX9_Init(pDevice);
}
bool glow = false;
bool triggerbot = false;

bool init = false;
bool menu = false;
long __stdcall hkEndScene(LPDIRECT3DDEVICE9 pDevice)
{
    if (!init)
    {
        InitImGui(pDevice);
        init = true;
    }

    if (GetAsyncKeyState(VK_END))
    {
        kiero::shutdown();
        return 0;

    }


    if (GetAsyncKeyState(VK_INSERT) & 1)
    {

        menu = !menu;

    }

    if (menu)
    {
        ImGui_ImplDX9_NewFrame();
        ImGui_ImplWin32_NewFrame();
        ImGui::NewFrame();

        ImGui::Begin("fat cock");

        ImGui::Checkbox("GLOW", &glow);
        ImGui::Checkbox("Trigger", &triggerbot);

        ImGui::End();

        ImGui::EndFrame();
        ImGui::Render();
        ImGui_ImplDX9_RenderDrawData(ImGui::GetDrawData());

        return oEndScene(pDevice);
    }
}

LRESULT __stdcall WndProc(const HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) {

    if (true && ImGui_ImplWin32_WndProcHandler(hWnd, uMsg, wParam, lParam))
        return true;

    return CallWindowProc(oWndProc, hWnd, uMsg, wParam, lParam);
}

BOOL CALLBACK EnumWindowsCallback(HWND handle, LPARAM lParam)
{
    DWORD wndProcId;
    GetWindowThreadProcessId(handle, &wndProcId);

    if (GetCurrentProcessId() != wndProcId)
        return TRUE; // skip to next window

    window = handle;
    return FALSE; // window found abort search
}

HWND GetProcessWindow()
{
    window = NULL;
    EnumWindows(EnumWindowsCallback, NULL);
    return window;
}

DWORD WINAPI MainThread(LPVOID lpReserved)
{
    bool attached = false;
    do
    {
        if (kiero::init(kiero::RenderType::D3D9) == kiero::Status::Success)
        {
            kiero::bind(42, (void**)& oEndScene, hkEndScene);
            do
                window = GetProcessWindow();
            while (window == NULL);
            oWndProc = (WNDPROC)SetWindowLongPtr(window, GWL_WNDPROC, (LONG_PTR)WndProc);
            attached = true;
        }
    } while (!attached);
    return TRUE;
}


BOOL APIENTRY DllMain(HMODULE hMod, DWORD dwReason, LPVOID lpReserved)
{
    switch (dwReason)
    {
    case DLL_PROCESS_ATTACH:
        
        DisableThreadLibraryCalls(hMod);
        CreateThread(nullptr, 0, MainThread, hMod, 0, nullptr);
        break;
    
    case DLL_PROCESS_DETACH:
        kiero::shutdown();
        break;
    }
    return TRUE;
}
я уже вторые сутки сижу и нихуя не понимаю
пробовал добавить 2 файл цпп и засунуть код
Код:
while (!GetAsyncKeyState(VK_INSERT))
    {
        DWORD LocalPlayer = *(DWORD*)(moduleBase + dwLocalPlayer);
        DWORD GlowObjectManager = *(DWORD*)(moduleBase + dwGlowObjectManager);
        DWORD EntityList = *(DWORD*)(moduleBase + dwEntityList);

        int LocalTeam = *(int*)(LocalPlayer + m_iTeamNum);
        


        for (int i = 1; i < 32; i++)
        {

            DWORD entity = *(DWORD*)(moduleBase + dwEntityList) + i * 0x10;

            if (entity == NULL) continue;

            int glowIndex = *(int*)(entity + m_iGlowIndex);
            int entityTeam = *(int*)(entity + m_iTeamNum);

            if (entityTeam == LocalTeam)

            {
                //local team
                *(float*)((GlowObjectManager + glowIndex * 0x38 + 0x4)) = 0.f; //R
                *(float*)((GlowObjectManager + glowIndex * 0x38 + 0x8)) = 1.f; //G
                *(float*)((GlowObjectManager + glowIndex * 0x38 + 0xC)) = 0.f; //B
                *(float*)((GlowObjectManager + glowIndex * 0x38 + 0x10)) = 1.7f; //a
            }
            else
            {
                //enemy team
                *(float*)((GlowObjectManager + glowIndex * 0x38 + 0x4)) = 1.f; //R
                *(float*)((GlowObjectManager + glowIndex * 0x38 + 0x8)) = 0.f; //G
                *(float*)((GlowObjectManager + glowIndex * 0x38 + 0xC)) = 0.f; //B
                *(float*)((GlowObjectManager + glowIndex * 0x38 + 0x10)) = 1.7f; //a

            }
            *(bool*)((GlowObjectManager + glowIndex * 0x38 + 0x24)) = true;
            *(bool*)((GlowObjectManager + glowIndex * 0x38 + 0x25)) = false;
                


        }
    }

    FreeLibraryAndExitThread(hModule, 0);
    return 0;
}


заменив его на
Код:
if (glow)
    {
        DWORD LocalPlayer = *(DWORD*)(moduleBase + dwLocalPlayer);
        DWORD GlowObjectManager = *(DWORD*)(moduleBase + dwGlowObjectManager);
        DWORD EntityList = *(DWORD*)(moduleBase + dwEntityList);

        int LocalTeam = *(int*)(LocalPlayer + m_iTeamNum);
        


        for (int i = 1; i < 32; i++)
        {

            DWORD entity = *(DWORD*)(moduleBase + dwEntityList) + i * 0x10;

            if (entity == NULL) continue;

            int glowIndex = *(int*)(entity + m_iGlowIndex);
            int entityTeam = *(int*)(entity + m_iTeamNum);

            if (entityTeam == LocalTeam)

            {
                //local team
                *(float*)((GlowObjectManager + glowIndex * 0x38 + 0x4)) = 0.f; //R
                *(float*)((GlowObjectManager + glowIndex * 0x38 + 0x8)) = 1.f; //G
                *(float*)((GlowObjectManager + glowIndex * 0x38 + 0xC)) = 0.f; //B
                *(float*)((GlowObjectManager + glowIndex * 0x38 + 0x10)) = 1.7f; //a
            }
            else
            {
                //enemy team
                *(float*)((GlowObjectManager + glowIndex * 0x38 + 0x4)) = 1.f; //R
                *(float*)((GlowObjectManager + glowIndex * 0x38 + 0x8)) = 0.f; //G
                *(float*)((GlowObjectManager + glowIndex * 0x38 + 0xC)) = 0.f; //B
                *(float*)((GlowObjectManager + glowIndex * 0x38 + 0x10)) = 1.7f; //a

            }
            *(bool*)((GlowObjectManager + glowIndex * 0x38 + 0x24)) = true;
            *(bool*)((GlowObjectManager + glowIndex * 0x38 + 0x25)) = false;
                


        }
    }

    FreeLibraryAndExitThread(hModule, 0);
    return 0;
}






но абсолютно ничего не вышло
 
На самом деле я Zodiak
Участник
Статус
Оффлайн
Регистрация
22 Дек 2020
Сообщения
1,011
Реакции[?]
181
Поинты[?]
68K
В чем проблема? Бхоп работает а вх нет
Код:
#include "includes.h"

extern LRESULT ImGui_ImplWin32_WndProcHandler(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);

EndScene oEndScene = NULL;
WNDPROC oWndProc;
static HWND window = NULL;

#include "csgo.hpp"
using namespace hazedumper::netvars;
using namespace hazedumper::signatures;


void InitImGui(LPDIRECT3DDEVICE9 pDevice)
{
    ImGui::CreateContext();
    ImGuiIO& io = ImGui::GetIO();
    io.ConfigFlags = ImGuiConfigFlags_NoMouseCursorChange;
    ImGui_ImplWin32_Init(window);
    ImGui_ImplDX9_Init(pDevice);
}
bool glow = false;
bool triggerbot = false;
bool bhop = false;

bool init = false;
bool menu = false;

long __stdcall hkEndScene(LPDIRECT3DDEVICE9 pDevice)
{
    if (!init)
    {
        InitImGui(pDevice);
        init = true;
    }
    if (GetAsyncKeyState(VK_END))
    {
        kiero::shutdown();
        return 0;

    }


    if (GetAsyncKeyState(VK_INSERT) & 1)
    {

        menu = !menu;

    }
    if (menu) {
        ImGui_ImplDX9_NewFrame();
        ImGui_ImplWin32_NewFrame();
        ImGui::NewFrame();

        ImGui::Begin("Fat cock");
        ImGui::Checkbox("Glow", &glow);
        ImGui::Checkbox("Triggerbot", &triggerbot);
        ImGui::Checkbox("BunnyHop", &bhop);
        ImGui::End();

        ImGui::EndFrame();
        ImGui::Render();
        ImGui_ImplDX9_RenderDrawData(ImGui::GetDrawData());

        return oEndScene(pDevice);
    }
}

LRESULT __stdcall WndProc(const HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) {

    if (true && ImGui_ImplWin32_WndProcHandler(hWnd, uMsg, wParam, lParam))
        return true;

    return CallWindowProc(oWndProc, hWnd, uMsg, wParam, lParam);
}

BOOL CALLBACK EnumWindowsCallback(HWND handle, LPARAM lParam)
{
    DWORD wndProcId;
    GetWindowThreadProcessId(handle, &wndProcId);

    if (GetCurrentProcessId() != wndProcId)
        return TRUE; // skip to next window

    window = handle;
    return FALSE; // window found abort search
}

HWND GetProcessWindow()
{
    window = NULL;
    EnumWindows(EnumWindowsCallback, NULL);
    return window;
}

DWORD WINAPI MainThread(LPVOID lpReserved)
{
    bool attached = false;
    do
    {
        if (kiero::init(kiero::RenderType::D3D9) == kiero::Status::Success)
        {
            kiero::bind(42, (void**)& oEndScene, hkEndScene);
            do
                window = GetProcessWindow();
            while (window == NULL);
            oWndProc = (WNDPROC)SetWindowLongPtr(window, GWL_WNDPROC, (LONG_PTR)WndProc);
            attached = true;
        }
    } while (!attached);
    return TRUE;
}

DWORD WINAPI BhopThread(LPVOID lp)

{
    DWORD gameModule = (DWORD)GetModuleHandle("client.dll");
    DWORD localPlayer = *(DWORD*)(gameModule + dwLocalPlayer);
    while (localPlayer == NULL)
    {
         localPlayer = *(DWORD*)(gameModule + dwLocalPlayer);


    }
    while (true)
    {

        if (bhop)
        {

            DWORD flag = *(BYTE*)(localPlayer + m_fFlags);
            if (GetAsyncKeyState(VK_SPACE) && flag & (1 << 0))
            {
                *(DWORD*)(gameModule + dwForceJump) = 6;
            }
        }
    }


}

BOOL WINAPI GlowThread(HMODULE hMod)
{

    DWORD moduleBase = (DWORD)GetModuleHandle("client.dll");


    if (glow)
    {
        DWORD LocalPlayer = *(DWORD*)(moduleBase + dwLocalPlayer);
        DWORD GlowObjectManager = *(DWORD*)(moduleBase + dwGlowObjectManager);
        DWORD EntityList = *(DWORD*)(moduleBase + dwEntityList);

        int LocalTeam = *(int*)(LocalPlayer + m_iTeamNum);



        for (int i = 1; i < 32; i++)
        {

            DWORD entity = *(DWORD*)(moduleBase + dwEntityList) + i * 0x10;

            if (entity == NULL) continue;

            int glowIndex = *(int*)(entity + m_iGlowIndex);
            int entityTeam = *(int*)(entity + m_iTeamNum);

            if (entityTeam == LocalTeam)

            {
                //local team
                *(float*)((GlowObjectManager + glowIndex * 0x38 + 0x4)) = 0.f; //R
                *(float*)((GlowObjectManager + glowIndex * 0x38 + 0x8)) = 1.f; //G
                *(float*)((GlowObjectManager + glowIndex * 0x38 + 0xC)) = 0.f; //B
                *(float*)((GlowObjectManager + glowIndex * 0x38 + 0x10)) = 1.7f; //a
            }
            else
            {
                //enemy team
                *(float*)((GlowObjectManager + glowIndex * 0x38 + 0x4)) = 1.f; //R
                *(float*)((GlowObjectManager + glowIndex * 0x38 + 0x8)) = 0.f; //G
                *(float*)((GlowObjectManager + glowIndex * 0x38 + 0xC)) = 0.f; //B
                *(float*)((GlowObjectManager + glowIndex * 0x38 + 0x10)) = 1.7f; //a

            }
            *(bool*)((GlowObjectManager + glowIndex * 0x38 + 0x24)) = true;
            *(bool*)((GlowObjectManager + glowIndex * 0x38 + 0x25)) = false;






        }

        

    }

    
    return 0;
    
}












    BOOL WINAPI DllMain(HMODULE hMod, DWORD dwReason, LPVOID lpReserved)
    {
        switch (dwReason)
        {
        case DLL_PROCESS_ATTACH:
            DisableThreadLibraryCalls(hMod);
            CreateThread(nullptr, 0, MainThread, hMod, 0, nullptr);
            CreateThread(nullptr, 0, BhopThread, hMod, 0, nullptr);
            CreateThread(nullptr, 0, (LPTHREAD_START_ROUTINE)GlowThread, hMod, 0, nullptr);
            
            break;
        case DLL_PROCESS_DETACH:
            kiero::shutdown();
            break;
        }
        return TRUE;
    }
 
Забаненный
Статус
Оффлайн
Регистрация
18 Июн 2020
Сообщения
506
Реакции[?]
90
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
На самом деле я Zodiak
Участник
Статус
Оффлайн
Регистрация
22 Дек 2020
Сообщения
1,011
Реакции[?]
181
Поинты[?]
68K
Последнее редактирование:
▃ ▄ ▅ ▆ ▇ █ █ ▇ ▆ ▅ ▄ ▃
Забаненный
Статус
Оффлайн
Регистрация
29 Дек 2020
Сообщения
264
Реакции[?]
158
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Накидываешь bool glow = false;
После делаешь проверку if (glow)
запускаешь цикл while true ()
и производишь код

что бы по чекбоксу обратиться к адресу памяти
ImGui::Checkbox("Glow", &glow);
 
Сверху Снизу