I wanted to start hacking for a while now, and now I started making (with the help of tutorials) a hack for the legacy version of csgo, but it doesn't really work
... this is my code, can you spot any mistakes? maybe the offsets? idkk.
Code:
#include "memory.h"
#include <thread>
namespace offsets {
// client.dll
constexpr auto localPlayer = 0xDEB99C;
constexpr auto entityList = 0x4E0102C;
constexpr auto glowObjectManager = 0x535BAD0;
// entity
constexpr auto teamNum = 0xF4;
constexpr auto glowIndex = 0x10488;
}
int main() {
auto mem = Memory{ "csgo.exe" };
const auto client = mem.GetModuleAddress("client.dll");
while (true) {
const auto localPlayer = mem.Read<std::uintptr_t>(client + offsets::localPlayer);
const auto glowObjectManager = mem.Read<std::uintptr_t>(client + offsets::glowObjectManager);
for (auto i = 0; i < 64; ++i) {
const auto entity = mem.Read<std::uintptr_t>(client + offsets::entityList + i * 0x10);
if (mem.Read<std::uintptr_t>(entity + offsets::teamNum) == mem.Read<std::uintptr_t>(localPlayer + offsets::teamNum))
continue;
const auto glowIndex = mem.Read<std::int32_t>(entity + offsets::glowIndex);
mem.Write<float>(glowObjectManager + (glowIndex * 0x38) + 0x8, 1.f); // r
mem.Write<float>(glowObjectManager + (glowIndex * 0x38) + 0xC, 1.f); // g
mem.Write<float>(glowObjectManager + (glowIndex * 0x38) + 0x10, 1.f); // b
mem.Write<float>(glowObjectManager + (glowIndex * 0x38) + 0x14, 1.f); // a
mem.Write<bool>(glowObjectManager + (glowIndex * 0x38) + 0x27, true);
mem.Write<bool>(glowObjectManager + (glowIndex * 0x38) + 0x28, true);
}
std::this_thread::sleep_for(std::chrono::milliseconds(1));
}
return 0;
}