发送空格键按下游戏bhop破解
Sending spacebar press to game for bhop hack
我遵循了一个教程(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}");
试试这个。
相关文章:
- 在C++游戏中与库存系统作斗争
- 换位表导致测试失败(但在游戏中运行良好)
- Craps游戏问题,忽略if语句
- 矢量下标超出SFML游戏中的范围
- 我是 c++ 的新手.学习基本知识后,我想做井字游戏.对于印刷板,我在下面写代码,但它显示错误
- 我在贪吃蛇游戏中收到了错误代码 -1073741571
- 我应该在简单的策略游戏中为各个派系使用类吗 - C++
- 游戏体验和升级
- 我的代码运行良好,但在游戏循环中中断
- 如何使用 SFML 在贪吃蛇游戏中定义游戏结束?
- 我可以使用任何好的逻辑来阻止计算机将 O 放在井字游戏中的现有 X 上
- 将鼠标和键盘输入发送到 unity3d 游戏 (Rust)
- 在猜谜游戏 c++ 中不计算尝试次数
- 在C++不适用于猜数字游戏的情况下再次播放选项
- 在为我的基于文本的 RPG 游戏制作库存时遇到困难
- 在定义字符数组(井字游戏)的 for 循环中应用输入限制
- Frank Luna 在他的书"使用 DirectX12 进行 3D 游戏编程"的介绍中盒子示例的问题
- 如何在Linux上正确发布C++软件(游戏)
- 提高基于组件的游戏引擎的效率
- 发送空格键按下游戏bhop破解