CSGO: Proper Lby timer
Does this seem like it would work?
bool NewTimer()
{
static int TESTERRR;
static float oldMemeTime;
int LbyBreakertimer;
static float nextLBYUpdate;
static float OldLBY;
static float lastUpdatetimeLBY;
float flServerTime = G::LocalPlayer->GetTickBase() * I::Globals->interval_per_tick;
if (G::LocalPlayer->GetAlive())
{
if (OldLBY != *G::LocalPlayer->GetLowerBodyYawTarget())
lastUpdatetimeLBY = flServerTime;
OldLBY = *G::LocalPlayer->GetLowerBodyYawTarget();
if (flServerTime > nextLBYUpdate && G::LocalPlayer->GetFlags() & FL_ONGROUND && G::LocalPlayer->GetVelocity().Length2D() < 0.1f) {
nextLBYUpdate = flServerTime + 1.1;
if (abs(nextLBYUpdate - lastUpdatetimeLBY) >= 1.1) {
LbyBreakertimer++;
if (TESTERRR != LbyBreakertimer && abs(oldMemeTime - I::Globals->curtime) > 0.8 && G::SendPacket == false) {
oldMemeTime = I::Globals->curtime;
TESTERRR = LbyBreakertimer;
return true;
}
else {
return false;
}
before i get hate im aware that theres a 99% chance this is completely wrong but im trying to do more on my own instead of pasting but i put together this timer because the one in our cheat uses latency which i was told is not supposed to be accounted for. i looked at purves and tried to replicate it in a much more simple way thanks for feed back.
|