-
Автор темы
- #1
здравствуйте понижают ли функции чита траст фактор сделаные на ReadMemory/WriteMemory ?
Например этот аимбот
Например этот аимбот
Код:
const auto memory = Memory{ "csgo.exe" };
// module addresses
const auto client = memory.GetModuleAddress("client.dll");
const auto engine = memory.GetModuleAddress("engine.dll");
// infinite hack loop
while (true)
{
std::this_thread::sleep_for(std::chrono::milliseconds(1));
// aimbot key
if (!GetAsyncKeyState(VK_XBUTTON2))
continue;
// get local player
const auto localPlayer = memory.Read<std::uintptr_t>(client + offset::dwLocalPlayer);
const auto localTeam = memory.Read<std::int32_t>(localPlayer + offset::m_iTeamNum);
// eye position = origin + viewOffset
const auto localEyePosition = memory.Read<Vector3>(localPlayer + offset::m_vecOrigin) +
memory.Read<Vector3>(localPlayer + offset::m_vecViewOffset);
const auto clientState = memory.Read<std::uintptr_t>(engine + offset::dwClientState);
const auto localPlayerId =
memory.Read<std::int32_t>(clientState + offset::dwClientState_GetLocalPlayer);
const auto viewAngles = memory.Read<Vector3>(clientState + offset::dwClientState_ViewAngles);
const auto aimPunch = memory.Read<Vector3>(localPlayer + offset::m_aimPunchAngle) * 2;
// aimbot fov
auto bestFov = 2.f;
auto bestAngle = Vector3{ };
for (auto i = 1; i <= 32; ++i)
{
const auto player = memory.Read<std::uintptr_t>(client + offset::dwEntityList + i * 0x10);
if (memory.Read<std::int32_t>(player + offset::m_iTeamNum) == localTeam)
continue;
if (memory.Read<bool>(player + offset::m_bDormant))
continue;
if (memory.Read<std::int32_t>(player + offset::m_lifeState))
continue;
if (memory.Read<std::int32_t>(player + offset::m_bSpottedByMask) & (1 << localPlayerId))
{
const auto boneMatrix = memory.Read<std::uintptr_t>(player + offset::m_dwBoneMatrix);
// pos of player head in 3d space
// 8 is the head bone index :)
const auto playerHeadPosition = Vector3{
memory.Read<float>(boneMatrix + 0x30 * 8 + 0x0C),
memory.Read<float>(boneMatrix + 0x30 * 8 + 0x1C),
memory.Read<float>(boneMatrix + 0x30 * 8 + 0x2C)
};
const auto angle = CalculateAngle(
localEyePosition,
playerHeadPosition,
viewAngles + aimPunch
);
const auto fov = std::hypot(angle.x, angle.y);
if (fov < bestFov)
{
bestFov = fov;
bestAngle = angle;
}
}
}
// if we have a best angle, do aimbot
if (!bestAngle.IsZero())
memory.Write<Vector3>(clientState + offset::dwClientState_ViewAngles, viewAngles + bestAngle / 8.f); // smoothing
}
return 0;
}
Последнее редактирование: