-
Автор темы
- #1
Помогите пофиксить плз
if (cClass->m_ClassID == (int)CSGOClassID::CPlantedC4)
{
CBaseEntity* me = Interfaces.pEntList->GetClientEntity(Interfaces.pEngine->GetLocalPlayer());
Vector vOrig; Vector vScreen;
CBaseEntity* ent = Interfaces.pEntList->GetClientEntity(i);
vOrig = ent->GetAbsOrigin();
CCSBomb* Bomb = (CCSBomb*)ent;
CColor col = CColor(255, 255, 255, 255);
Interfaces.g_pDebugOverlay->ScreenPosition(vOrig, vScreen);
float flBlow = Bomb->GetC4BlowTime();
float TimeRemaining = flBlow - (Interfaces.pGlobalVars->interval_per_tick * me->GetTickBase());
char buffer[256];
if (TimeRemaining < 0)
{
col = CColor(45, 255, 45, 255);
TimeRemaining = 0;
}
cout << TimeRemaining << endl;
sprintf_s(buffer, "Bomb: %.1f", TimeRemaining);
Interfaces.pSurface->DrawT(vScreen.x, vScreen.y, col, Hacks.Font_Arista, false, buffer);
}