Advertisement
Wolfrost

CSGO Basic external glow esp

May 24th, 2016
299
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Cheat loop
  2. while (!GetAsyncKeyState(VK_DELETE)) // Panic key
  3. {
  4.     if (!bGlowEnabled) continue; // Check if glow is enabled
  5.  
  6.     // Get the glow object pointer
  7.     DWORD dwGlowPointer = Read<DWORD>(dwClientBase + dwGlowObject);
  8.     // Get the current count of valid glow objects (+ 0x4 will return the maximum amount of glow objects)
  9.     DWORD dwGlowCount = Read<DWORD>(dwClientBase + dwGlowObject + 0xC);
  10.  
  11.     // Loop through glow objects
  12.     for (unsigned int i = 0; i < dwGlowCount; i++)
  13.     {
  14.         if (dwGlowPointer) // If the glow object pointer is valid
  15.         {
  16.             GlowObject_t GlowObj = Read<GlowObject_t>(dwGlowPointer + i * sizeof(GlowObject_t)); // Grab the current glow object
  17.             // Grab the class id of the entity through multi-level dereferencing to check if it's a player
  18.             int gl_iClassID = Read<int>(Read<int>(Read<int>(Read<int>(GlowObj.pEntity + 0x8) + 2*0x4) + 0x1) + 20);
  19.             if (gl_iClassID == 35) // If the entity is a player
  20.             {
  21.                 // We are sure that the entity corresponding to the glow object is a player, check for teams to decide color
  22.                 int gl_iTeam = Read<int>(GlowObj.pEntity + 0xF0);
  23.                 // Check if the entity is dormant, we don't want to glow unreliable stuff
  24.                 bool gl_bDormant = Read<bool>(GlowObj.pEntity + 0xE9);
  25.                 if (!gl_bDormant) // If the entity is not dormant (not networked)
  26.                 {
  27.                     if (gl_iTeam == 2) // T
  28.                     {
  29.                         // Default spec glow colors (kinda yellowish)
  30.                         GlowObj.r = 0.878431f;
  31.                         GlowObj.g = 0.686275f;
  32.                         GlowObj.b = 0.337255f;
  33.                         GlowObj.a = 0.6f;
  34.                     }
  35.                     else if (gl_iTeam == 3) // CT
  36.                     {
  37.                         // Default spec glow colors (kinda light blue)
  38.                         GlowObj.r = 0.447059f;
  39.                         GlowObj.g = 0.607843f;
  40.                         GlowObj.b = 0.866667f;
  41.                         GlowObj.a = 0.6f;
  42.                     }
  43.                 }
  44.  
  45.                 // Set other glow object components
  46.                 GlowObj.RenderWhenOccluded = true;
  47.                 GlowObj.RenderWhenUnoccluded = false;
  48.                 GlowObj.FullBloom = false;
  49.                        
  50.                 // Finally overwrite the current glow object structure
  51.                 Write<GlowObject_t>(dwGlowPointer + (i*sizeof(GlowObject_t)), GlowObj);
  52.             }
  53.         }
  54.     }
  55.  
  56.     Sleep(15); // ~15 ms should be enough to not make the glow flickering, at least from my experience
  57. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement