Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <Windows.h>
- namespace offset {
- #include "Offsets.h"
- using namespace hazedumper::netvars;
- using namespace hazedumper::signatures;
- }
- #include "Memory.h"
- Memory memory;
- struct GlowStruct {
- BYTE buffer0[4];
- float r, g, b, a;
- BYTE buffer1[16];
- bool renderWhenOccluded;
- bool renderWhenUnoccluded;
- bool fullBloom;
- BYTE buffer2[5];
- int glowStyle;
- };
- struct varS {
- uintptr_t procid = NULL;
- uintptr_t client = NULL;
- uintptr_t engine = NULL;
- uintptr_t glowObject = NULL;
- } var;
- void Setup() {
- var.procid = memory.getProcess(L"csgo.exe");
- var.client = memory.getModule(var.procid, L"client_panorama.dll");
- var.engine = memory.getModule(var.procid, L"engine.dll");
- }
- class LocalPlayer {
- public:
- uintptr_t entity = NULL;
- int health = NULL;
- int team = NULL;
- void Update() {
- entity = memory.read<uintptr_t>(var.client + offset::dwLocalPlayer);
- if (entity != NULL) {
- health = memory.read<int>(entity + offset::m_iHealth);
- team = memory.read<int>(entity + offset::m_iTeamNum);
- }
- }
- };
- class OtherPlayer {
- public:
- uintptr_t entity = NULL;
- int health = NULL;
- int team = NULL;
- void Glow(float r, float g, float b, float a, int style = 0, bool bloom = false) {
- int glowIndex = memory.read<int>(entity + offset::m_iGlowIndex);
- GlowStruct gs;
- gs = memory.read<GlowStruct>(var.glowObject + (glowIndex * 0x38));
- gs.r = r, gs.g = g, gs.b = b, gs.a = a;
- gs.glowStyle = style;
- gs.renderWhenOccluded = true;
- gs.renderWhenUnoccluded = false;
- gs.fullBloom = bloom;
- memory.write<GlowStruct>(var.glowObject + (glowIndex * 0x38), gs);
- }
- void Update() {
- if (entity != NULL) {
- health = memory.read<int>(entity + offset::m_iHealth);
- team = memory.read<int>(entity + offset::m_iTeamNum);
- }
- }
- };
- class PlayerList {
- private:
- OtherPlayer list[64];
- public:
- OtherPlayer& operator[] (int Index) {
- return list[Index];
- }
- void Update() {
- for (int i = 0; i < 64; i++) {
- list[i].entity = memory.read<uintptr_t>(var.client + offset::dwEntityList + 0x10 * i);
- if (list[i].entity != NULL)
- list[i].Update();
- }
- var.glowObject = memory.read<uintptr_t>(var.client + offset::dwGlowObjectManager);
- }
- };
- int main() {
- Setup();
- LocalPlayer player;
- PlayerList others;
- while (true) {
- player.Update();
- others.Update();
- for (int i = 0; i < 64; i++)
- if (others[i].entity != player.entity && others[i].health > 0) {
- if (others[i].team == player.team)
- others[i].Glow(0, 0, 1, 0.5f);
- else
- others[i].Glow(1, 0, 0, 0.5f);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement