发送空格键按下游戏bhop破解

Sending spacebar press to game for bhop hack

本文关键字:游戏 bhop 破解 空格键      更新时间:2023-10-16

我遵循了一个教程(https://www.youtube.com/watch?v=RiS-j_ecG0A)使用c++为cs:s进行bhop欺骗。在教程中,作弊者调用引擎使玩家跳跃,并使用空格键进行切换。我试着不使用它,并试图模拟空格键按压来让玩家跳跃,但它不起作用。我还试着只在按住空格键的时候让我的作弊bhop,不知道我应该在BunnyHop()中使用while还是if in(GetAsyncKeyState(SPACE_BAR))。

#include <Windows.h>
#include <iostream>
#include "HackProcess.h"
CHackProcess fProcess;
using namespace std;
const DWORD Player_Base = 0x4C6708;   
const DWORD dw_JumpOffset = 0x350;

#define FL_ONGROUND 257
#define SPACE_BAR 0x20
#define F6_KEY 0x75
bool b_true = true;
bool b_false = false;
bool BunnyHopStatus = false;
struct MyPlayer_t
{
    DWORD ClocalPlayer;
    int m_fFlags;
    void ReadInformation()
    {
        ReadProcessMemory(fProcess.__HandleProcess, (PBYTE*)    (fProcess.__dwordClient + Player_Base), &ClocalPlayer, sizeof(DWORD), 0);
        ReadProcessMemory(fProcess.__HandleProcess, (PBYTE*)(ClocalPlayer +     dw_JumpOffset), &m_fFlags, sizeof(int), 0);
    }
}MyPlayer;
void BunnyHop()
{
    INPUT space = {0};
    space.type = INPUT_KEYBOARD;
    space.ki.wVk = VK_SPACE;
    if(GetAsyncKeyState(SPACE_BAR))
    {
        if(MyPlayer.m_fFlags == FL_ONGROUND)
        {
            SendInput(1, &space, sizeof(INPUT)); // Send KeyDown
            space.ki.dwFlags = KEYEVENTF_KEYUP;
            SendInput(1, &space, sizeof(INPUT)); // Send KeyUp
            cout << "player on ground" << endl; //added for debugging
        }else
        {
            cout << "player whatever" << endl; //added for debugging
        }
    }
}


int main()
{
    fProcess.RunProcess();
    cout << "Game Found! Running Bunny Hop..." << endl;
    while(!GetAsyncKeyState(F6_KEY))
    {
        MyPlayer.ReadInformation();
        BunnyHop(); 
    }

}

(HackProcess.h:http://pastebin.com/vVauF3dS)

SendKeys.Send("{SPACE BAR}");

试试这个。