太少的争论&期待一个破坏

时间:2015-10-21 01:15:43

标签: c++

我似乎无法弄清楚游戏黑客的错误是什么让角色自动跳跃以获得更快的移动而且我可能听起来非常愚蠢到它可能是一个错误,如果有人可以帮我那么非常感谢!

#include <Windows.h>

Memory Mem;

#define key_space 0x20
#define key9 0x39
#define key_sc 0x0A
void bhopFunc();

const DWORD localBase = 0xA6C90C;
const DWORD flagOffset = 0x100;

void bhopFunc() {
    int FL_ONGROUND = 257; 
    Mem.Process("csgo.exe"); 
    DWORD ClientDLL = Mem.Module("client.dll"); 
}


if (GetAsyncKeyState(key_space) & 0x8000 && m_fFlags == FL_ONGROUND) { 
    keybd_event(KEY9, KEY9SC, 0, 0);

    keybd_event(KEY9, KEY9SC, KEYEVENTF_KEYUP, 0);
}

    int main()
    {
        while (true) {
            bhopFunc();
        }
    }

}

1 个答案:

答案 0 :(得分:0)

int main()上方的四行代码应该位于您的bhopFunct()函数中。

这是您的固定代码:

#include <Windows.h>

#define key_space 0x20
#define key9 0x39
#define key_sc 0x0A
void bhopFunc();

const DWORD localBase = 0xA6C90C;
const DWORD flagOffset = 0x100;

void bhopFunc() {
    int FL_ONGROUND = 257;
    Mem.Process("csgo.exe");
    DWORD ClientDLL = Mem.Module("client.dll");

    if (GetAsyncKeyState(key_space) & 0x8000 && m_fFlags == FL_ONGROUND)
    {
        keybd_event(KEY9, KEY9SC, 0, 0);
        keybd_event(KEY9, KEY9SC, KEYEVENTF_KEYUP, 0);
    }
}

int main()
{
    while (true) 
    {
        bhopFunc();
    }
}