- Status
- Offline
- Joined
- Dec 16, 2019
- Messages
- 3
- Reaction score
- 3
Code:
Title says it all
if (c_config::get().someindicators)
{
if (Globals::LocalPlayer->IsAlive())
{
float desyncAmt = g_AntiAim.MaxDelta(Globals::LocalPlayer);
float diffrence = (Globals::RealAngle.y - Globals::LocalPlayer->GetLowerBodyYaw());
float Velocity = Globals::LocalPlayer->GetVelocity().Length2D();
int offset = 40;
Color fake = desyncAmt <= 29 ? Color(255, 0, 0) : (desyncAmt >= 55 ? Color(132, 195, 16) : Color(255 - (desyncAmt * 2.55), desyncAmt * 2.55, 0));
std::string choke;
auto NetChannel = g_pEngine->GetNetChannel();
static int iWidth, iHeight;
g_pEngine->GetScreenSize(iWidth, iHeight);
if (!NetChannel)
return;
choke += "choke: " + std::to_string(NetChannel->m_nChokedPackets);
g_pSurface->DrawT(20, (iHeight - offset - 90), Color(255, 255, 255), Globals::Indicators, false, choke.c_str());
if (diffrence > 35 && Velocity < 0.1f)
g_pSurface->DrawT(20, (iHeight - offset - 60), Color(132, 195, 16), Globals::Indicators, false, "LBY");
else
g_pSurface->DrawT(20, (iHeight - offset - 60), Color(255, 0, 0), Globals::Indicators, false, "LBY");
if (!(desyncAmt < 29))
g_pSurface->DrawT(20, (iHeight - offset - 30), fake, Globals::Indicators, false, "FAKE");
}
}
NOTE : i did it for xy0 in notepad so might need some fixes idk
NOTE 2 : paste this in antiaim.cpp if you dont have it
float AntiAim::MaxDelta(C_BaseEntity* pEnt) {
auto animstate = uintptr_t(pEnt->AnimState());
float duckammount = *(float*)(animstate + 0xA4);
float speedfraction = max(0, min(*reinterpret_cast<float*>(animstate + 0xF8), 1));
float speedfactor = max(0, min(1, *reinterpret_cast<float*> (animstate + 0xFC)));
float unk1 = ((*reinterpret_cast<float*> (animstate + 0x11C) * -0.30000001f) - 0.19999999f) * speedfraction;
float unk2 = unk1 + 1.f;
float unk3;
if (duckammount > 0) {
unk2 += ((duckammount * speedfactor) * (0.5f - unk2));
}
unk3 = *(float*)(animstate + 0x334) * unk2;
return unk3;
}
EDIT : this goes into antiaim.h ( if you dont have it ofc )
float MaxDelta(C_BaseEntity* pEnt);