所以我试图用c ++来练习CS的基本触发程序 一切正常,直到尝试编译为止都没有错误。
我的代码
Triggerbot.cc
#include "ProcMem.h"
#include "csgo.hpp"
#include <ctime>
#include <chrono>
#include <iostream>
#include <Windows.h>
#include "triggerbot.h"
using namespace hazedumper;
using namespace signatures;
using namespace netvars;
ProcMem Memory;
DWORD ClientDLL;
DWORD localPlayer;
const DWORD teamOffset = 0xF4;
const DWORD hpOffset = 0x100;
const DWORD ELD = 0x10;
int mainProcess() {
char process[9] = "csgo.exe";
char module[20] = "client_panorama.dll";
Memory.Process(process);
ClientDLL = Memory.Module(module);
localPlayer = Memory.Read<DWORD>(ClientDLL + dwLocalPlayer);
while (true)
{
Shoot();
Sleep(1);
}
}
void Shoot()
{
DWORD activeWeapon = Memory.Read<DWORD>(localPlayer + m_hactiveWeapon);
DWORD entID = activeWeapon & 0xFFF;
DWORD weapID = Memory.Read<DWORD>(ClientDLL + dwEntityList + (entID - 1) * 0x10);
int myWeapID = Memory.Read<int>(weapID + m_iItemDefinitionIndex);
bool scopedIn = Memory.Read<bool>(localPlayer + m_bIsScoped);
int myTeam = Memory.Read<int>(localPlayer + teamOffset);
int crossEnt = Memory.Read<int>(localPlayer + m_iCrosshairId);
DWORD Entity = Memory.Read<DWORD>(ClientDLL + dwEntityList + (crossEnt - 1) * 0x10);
int enemyHP = Memory.Read<int>(Entity + hpOffset);
int enemyTeam = Memory.Read<int>(Entity + teamOffset);
if (GetKeyState(VK_LMENU) && 0x8000 && enemyTeam != myTeam && enemyHP > 0);
bool weapon = (myWeapID == 9) || (myWeapID == 40) || (myWeapID == 38) || (myWeapID == 11);
if ((weapon && scopedIn) || !weapon) {
Sleep(1);
Memory.Write<int>(ClientDLL + dwForceAttack,5);
Sleep(18);
Memory.Write<int>(ClientDLL + dwForceAttack,4);
Sleep(350);
}
}
错误
Error C3861 'Shoot': identifier not found
为什么即使在下面声明了标识符“ Shoot”也找不到
void Shoot()
请告诉我我做错了什么。