-
Автор темы
- #1
seen people asking for this and i was bored legit took me like 10 secs to make lol enjoy
make sure to run predict lby then handle chokes then your anti aim
handle chokes
lby breaker
in the .hpp
make sure to run predict lby then handle chokes then your anti aim
handle chokes
C++:
void antiaim :: HandleChoke ()
{
// init max amount to choke
const int maxChoke = 16;
if (! m_bShouldChoke && m_bNextShouldChoke)
{
m_bShouldChoke = true;
m_bNextShouldChoke = false;
}
// should and can choke
if (m_bShouldChoke && g_pClientState-> chokedcommands <maxChoke)
g_send_packet = false;
else
g_send_packet = true;
}
C++:
void antiaim :: PredictLbyUpdate ()
{
if (! g_pLocalPlayer-> get_alive () || (* g_ppGameRules) -> m_bFreezePeriod ()) // no point running this if we dead
return;
// predict lby updates and help with chokes
const auto ticks // = whatever u want to use
static float m_flNextLBYUpdateTime = 0.f;
auto animstate = g_pLocalPlayer-> m_flAnimState ();
if (! animstate)
return;
if (animstate-> m_velocity> 0.1f || fabs (animstate-> flUpVelocity)> 100.f)
m_flNextLBYUpdateTime = ticks + 0.22f;
else
{
if (ticks> m_flNextLBYUpdateTime) {// break our lby and tell our handle chokes to choke
m_flNextLBYUpdateTime = ticks + 1.1f;
SetShouldChoke (true);
m_bBreakLby = true;
}
// we wanna pre break exacly 1 tick after our lby update
// pre-flick our lby and tell our handle chokes to choke
else if (! m_bBreakLby && ticks + ticks_to_time (1)> m_flNextLBYUpdateTime) {
SetShouldChoke (true);
m_bpreBreak = true;
}
// run our fake exacly after our breaks / pre break
else if (ticks + ticks_to_time (2)> m_flNextLBYUpdateTime)
{
SetShouldChoke (false);
}
}
}
C++:
// handle choke crap
bool m_bNextShouldChoke = false;
bool m_bShouldChoke = false;
void SetNextShouldChoke (bool choke) {m_bNextShouldChoke = choke; }
bool ShouldChokeNext () const {return m_bNextShouldChoke; }
void SetShouldChoke (bool choke) {m_bShouldChoke = choke; }
bool ShouldChoke () const {return m_bShouldChoke; }
// lby crap
bool m_bBreakLby;
bool m_bpreBreak;