Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DWORD WINAPI thTrigger(PVOID pThreadParams)
- {
- TrigConfig CurrentCfg;
- int chHealth = 0, chTeam = 0;
- bool chImmune = false;
- while (true)
- {
- if (!Vars::Trig::Enabled) continue;
- if (!Engine.IsInGame()) continue;
- if (Me.hasPistol()) CurrentCfg = Vars::Trig::TCPistols;
- else if (Me.hasRifle()) CurrentCfg = Vars::Trig::TCRifles;
- else if (Me.hasSniper()) CurrentCfg = Vars::Trig::TCSnipers;
- else if (Me.hasSMG()) CurrentCfg = Vars::Trig::TCSMG;
- else if (Me.hasHeavy()) CurrentCfg = Vars::Trig::TCHeavy;
- if (!GetAsyncKeyState(CurrentCfg.Key)) continue;
- //if (Me.hasSniper())
- // if (!Me.Scoped())
- // continue;
- int chid = Me.CrosshairID();
- DWORD chEntityBase = Process.Read<DWORD>(Process.GetClientBase() + Offsets::m_dwEntityList + chid * 0x10);
- if (CurrentCfg.VisCheck)
- if (!Process.Read<bool>(chEntityBase + Offsets::m_bSpotted))
- continue;
- chTeam = Process.Read<int>(chEntityBase + Offsets::m_iTeam);
- chHealth = Process.Read<int>(chEntityBase + Offsets::m_iHealth);
- chImmune = Process.Read<bool>(chEntityBase + Offsets::m_bGunGameImmunity);
- if ( (chid > 0 && chid <= 64) && chEntityBase && chTeam!=Me.Team() && chHealth > 0 && !chImmune )
- {
- Client.ForceAttack();
- Sleep(CurrentCfg.DelayBefore);
- Client.StopAttack();
- Sleep(CurrentCfg.DelayAfter);
- }
- Sleep(1);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement