Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Cheat loop
- while (!GetAsyncKeyState(VK_DELETE)) // Panic key
- {
- if (!bGlowEnabled) continue; // Check if glow is enabled
- // Get the glow object pointer
- DWORD dwGlowPointer = Read<DWORD>(dwClientBase + dwGlowObject);
- // Get the current count of valid glow objects (+ 0x4 will return the maximum amount of glow objects)
- DWORD dwGlowCount = Read<DWORD>(dwClientBase + dwGlowObject + 0xC);
- // Loop through glow objects
- for (unsigned int i = 0; i < dwGlowCount; i++)
- {
- if (dwGlowPointer) // If the glow object pointer is valid
- {
- GlowObject_t GlowObj = Read<GlowObject_t>(dwGlowPointer + i * sizeof(GlowObject_t)); // Grab the current glow object
- // Grab the class id of the entity through multi-level dereferencing to check if it's a player
- int gl_iClassID = Read<int>(Read<int>(Read<int>(Read<int>(GlowObj.pEntity + 0x8) + 2*0x4) + 0x1) + 20);
- if (gl_iClassID == 35) // If the entity is a player
- {
- // We are sure that the entity corresponding to the glow object is a player, check for teams to decide color
- int gl_iTeam = Read<int>(GlowObj.pEntity + 0xF0);
- // Check if the entity is dormant, we don't want to glow unreliable stuff
- bool gl_bDormant = Read<bool>(GlowObj.pEntity + 0xE9);
- if (!gl_bDormant) // If the entity is not dormant (not networked)
- {
- if (gl_iTeam == 2) // T
- {
- // Default spec glow colors (kinda yellowish)
- GlowObj.r = 0.878431f;
- GlowObj.g = 0.686275f;
- GlowObj.b = 0.337255f;
- GlowObj.a = 0.6f;
- }
- else if (gl_iTeam == 3) // CT
- {
- // Default spec glow colors (kinda light blue)
- GlowObj.r = 0.447059f;
- GlowObj.g = 0.607843f;
- GlowObj.b = 0.866667f;
- GlowObj.a = 0.6f;
- }
- }
- // Set other glow object components
- GlowObj.RenderWhenOccluded = true;
- GlowObj.RenderWhenUnoccluded = false;
- GlowObj.FullBloom = false;
- // Finally overwrite the current glow object structure
- Write<GlowObject_t>(dwGlowPointer + (i*sizeof(GlowObject_t)), GlowObj);
- }
- }
- }
- Sleep(15); // ~15 ms should be enough to not make the glow flickering, at least from my experience
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement