Вопрос RCS при инжекте не чего не происходит

Начинающий
Статус
Оффлайн
Регистрация
9 Дек 2018
Сообщения
42
Реакции[?]
2
Поинты[?]
0
При инжекте rcs не пашет, если кто то шарит помогите

Код:
//include
#include "pch.h"
#include <Windows.h>
// vec3 class
struct Vec3 {
    float x, y, z;

    Vec3 operator+(Vec3 d) {
        return { x + d.x, y + d.y, z + d.z };
    }
    Vec3 operator-(Vec3 d) {
        return { x - d.x, y - d.y, z - d.z };
    }
    Vec3 operator*(float d) {
        return { x * d, y * d, z * d };
    }

    void Normalize() {
        while (y < -180) { y += 360; }
        while (y > 180) { y -= 360; }
        if (x > 89) { x = 89; }
        if (x < -89) { x = -89; }
    }
};

// offsets
// LocalPlayer
uintptr_t dwLocalPlayer = 0xD8B2BC;
// ClientState
uintptr_t dwClientState = 0x58EFE4;
// viewAngles
uintptr_t dwClientState_viewAngles = 0x4D90;
// shotsFired
uintptr_t m_iShotsFired = 0xA390;
// aimpunchandle
uintptr_t m_aimPunchAngle = 0x302C;

// settings
uintptr_t exitKey = VK_HOME;

int WINAPI HackThread(HMODULE hModule) {

    // data
    // ClientModule
    uintptr_t clientModule = (uintptr_t)GetModuleHandle(L"client_panorama.dll");
    // engineModule
    uintptr_t engineModule = (uintptr_t)GetModuleHandle(L"engine.dll");
    // localPlayer ptr
    uintptr_t localPlayer = *(uintptr_t*)(clientModule + dwLocalPlayer);
    // viewAngles ptr
    Vec3* viewAngles = (Vec3*)(*(uintptr_t*)(engineModule + dwClientState) + dwClientState_viewAngles);
    // shotsFired ptr
    int* iShotsFired = (int*)(localPlayer + m_iShotsFired);
    // aimPunch ptr
    Vec3* aimPunchAngle = (Vec3*)(localPlayer + m_aimPunchAngle);

    Vec3 oPunch{ 0,0,0 };

    while (!GetAsyncKeyState(exitKey)) {
        Vec3 punchAngle = *aimPunchAngle * 2;
        if (*iShotsFired > 1) {
            //call rcs
            Vec3 newAngle = *viewAngles + oPunch - punchAngle;
            //normalize
            newAngle.Normalize();
            //set
            *viewAngles = newAngle;
        }
        //fix
        oPunch = punchAngle;
    };

    FreeLibraryAndExitThread(hModule, 0);
    CloseHandle(hModule);
    return 0;
}
BOOL APIENTRY DllMain(HMODULE hModule, DWORD  ul_reason_for_call, LPVOID lpReserved) {
    if (ul_reason_for_call == DLL_PROCESS_ATTACH)
        CreateThread(0, 0, (LPTHREAD_START_ROUTINE)HackThread, hModule, 0, 0);
    return TRUE;
}
При инжекте rcs не пашет, если кто то шарит помогите

Код:
//include
#include "pch.h"
#include <Windows.h>
// vec3 class
struct Vec3 {
    float x, y, z;

    Vec3 operator+(Vec3 d) {
        return { x + d.x, y + d.y, z + d.z };
    }
    Vec3 operator-(Vec3 d) {
        return { x - d.x, y - d.y, z - d.z };
    }
    Vec3 operator*(float d) {
        return { x * d, y * d, z * d };
    }

    void Normalize() {
        while (y < -180) { y += 360; }
        while (y > 180) { y -= 360; }
        if (x > 89) { x = 89; }
        if (x < -89) { x = -89; }
    }
};

// offsets
// LocalPlayer
uintptr_t dwLocalPlayer = 0xD8B2BC;
// ClientState
uintptr_t dwClientState = 0x58EFE4;
// viewAngles
uintptr_t dwClientState_viewAngles = 0x4D90;
// shotsFired
uintptr_t m_iShotsFired = 0xA390;
// aimpunchandle
uintptr_t m_aimPunchAngle = 0x302C;

// settings
uintptr_t exitKey = VK_HOME;

int WINAPI HackThread(HMODULE hModule) {

    // data
    // ClientModule
    uintptr_t clientModule = (uintptr_t)GetModuleHandle(L"client_panorama.dll");
    // engineModule
    uintptr_t engineModule = (uintptr_t)GetModuleHandle(L"engine.dll");
    // localPlayer ptr
    uintptr_t localPlayer = *(uintptr_t*)(clientModule + dwLocalPlayer);
    // viewAngles ptr
    Vec3* viewAngles = (Vec3*)(*(uintptr_t*)(engineModule + dwClientState) + dwClientState_viewAngles);
    // shotsFired ptr
    int* iShotsFired = (int*)(localPlayer + m_iShotsFired);
    // aimPunch ptr
    Vec3* aimPunchAngle = (Vec3*)(localPlayer + m_aimPunchAngle);

    Vec3 oPunch{ 0,0,0 };

    while (!GetAsyncKeyState(exitKey)) {
        Vec3 punchAngle = *aimPunchAngle * 2;
        if (*iShotsFired > 1) {
            //call rcs
            Vec3 newAngle = *viewAngles + oPunch - punchAngle;
            //normalize
            newAngle.Normalize();
            //set
            *viewAngles = newAngle;
        }
        //fix
        oPunch = punchAngle;
    };

    FreeLibraryAndExitThread(hModule, 0);
    CloseHandle(hModule);
    return 0;
}
BOOL APIENTRY DllMain(HMODULE hModule, DWORD  ul_reason_for_call, LPVOID lpReserved) {
    if (ul_reason_for_call == DLL_PROCESS_ATTACH)
        CreateThread(0, 0, (LPTHREAD_START_ROUTINE)HackThread, hModule, 0, 0);
    return TRUE;
}
Если у кого то проблемы с компиляцией то нужно отключить пред скомп заголовки в проекте и компить в релиз 86
 
Участник
Статус
Оффлайн
Регистрация
11 Апр 2019
Сообщения
1,117
Реакции[?]
306
Поинты[?]
4K
чем инжектишь, вроде код начала 20, чекни новые оффсеты и пропиши инсекюр если лл инжектишь
 
Начинающий
Статус
Оффлайн
Регистрация
9 Дек 2018
Сообщения
42
Реакции[?]
2
Поинты[?]
0
Сверху Снизу