Advertisement
Guest User

Untitled

a guest
May 5th, 2016
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. DWORD WINAPI thTrigger(PVOID pThreadParams)
  2. {
  3.     TrigConfig CurrentCfg;
  4.     int chHealth = 0, chTeam = 0;
  5.     bool chImmune = false;
  6.     while (true)
  7.     {
  8.         if (!Vars::Trig::Enabled) continue;
  9.         if (!Engine.IsInGame()) continue;
  10.  
  11.         if (Me.hasPistol()) CurrentCfg = Vars::Trig::TCPistols;
  12.         else if (Me.hasRifle()) CurrentCfg = Vars::Trig::TCRifles;
  13.         else if (Me.hasSniper()) CurrentCfg = Vars::Trig::TCSnipers;
  14.         else if (Me.hasSMG()) CurrentCfg = Vars::Trig::TCSMG;
  15.         else if (Me.hasHeavy()) CurrentCfg = Vars::Trig::TCHeavy;
  16.  
  17.         if (!GetAsyncKeyState(CurrentCfg.Key)) continue;
  18.  
  19.         //if (Me.hasSniper())
  20.         //  if (!Me.Scoped())
  21.         //      continue;
  22.  
  23.         int chid = Me.CrosshairID();
  24.         DWORD chEntityBase = Process.Read<DWORD>(Process.GetClientBase() + Offsets::m_dwEntityList + chid * 0x10);
  25.  
  26.         if (CurrentCfg.VisCheck)
  27.             if (!Process.Read<bool>(chEntityBase + Offsets::m_bSpotted))
  28.                 continue;
  29.  
  30.         chTeam = Process.Read<int>(chEntityBase + Offsets::m_iTeam);
  31.         chHealth = Process.Read<int>(chEntityBase + Offsets::m_iHealth);
  32.         chImmune = Process.Read<bool>(chEntityBase + Offsets::m_bGunGameImmunity);
  33.  
  34.         if ( (chid > 0 && chid <= 64) && chEntityBase && chTeam!=Me.Team() && chHealth > 0 && !chImmune )
  35.         {
  36.             Client.ForceAttack();
  37.             Sleep(CurrentCfg.DelayBefore);
  38.             Client.StopAttack();
  39.             Sleep(CurrentCfg.DelayAfter);
  40.         }
  41.  
  42.         Sleep(1);
  43.     }
  44.     return 0;
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement