Official site anti-cheat Ultra Core Protector

Home Download F.A.Q. Addons Monitor Forum Support Advertise English version site UCP Anti-Cheat  Russian version site UCP Anti-Cheat
Ultra Core Protector - is the client-server anti-cheat freeware, for server protection from unscrupulous players.

Abilities Supported games  
Half-Life
Condition Zero
Counter-Strike 1.6
Day of Defeat
Adrenaline Gamer
Team Fortress Classic
Counter-Strike Source
MU Online
Ragnarok Online
Half-Life 2 Deathmatch
Adrenaline Gamer 2
Team Fortress 2
CSGO: Defusing warning

I mean there is only so much I can do wrong…

How I try to draw that shit:

void Visuals::RenderDefuseWarning(C_BaseEntity *Testing)
{
for (int i = 0; i < g_EntityList->GetHighestEntityIndex(); i++)
{
if (Testing->IsPlantedC4())
{
DrawString(watermark_font, 10, 25, Color(0, 162, 232, 255), FONT_LEFT, "Bomb Planted");
C_BaseEntity *entity = (C_BaseEntity*)g_EntityList->GetClientEntity(i);

if (entity == nullptr)
continue;
if (entity == Testing)
continue;
if (entity->IsDormant())
continue;

CCSBomb* Bomb = (CCSBomb*)entity;
float flBlow = Bomb->GetC4BlowTime();
float lifetime = flBlow - (g_GlobalVars->interval_per_tick * Testing->GetTickBase());

char LifetimeTimeString[24];
sprintf_s(LifetimeTimeString, sizeof(LifetimeTimeString) - 1, "Bomb: %.1f", lifetime);
DrawString(watermark_font, 10, 10, Color(0, 162, 232, 255), FONT_LEFT, LifetimeTimeString);

if (Bomb->GetBombDefuser() > 0)
{
DrawString(watermark_font, 10, 40, Color(0, 162, 232, 255), FONT_LEFT, "Defusing");
float countdown = Bomb->GetC4DefuseCountdown() - (AimRage::Get().GetTickbase() *g_GlobalVars->interval_per_tick);

if (countdown > 0.01f)
{
if (lifetime > countdown)
{
char defuseTimeString[24];
sprintf_s(defuseTimeString, sizeof(defuseTimeString) - 1, "Defusing: %.1f", countdown);
DrawString(watermark_font, 10, 10, Color(0, 162, 232, 255), FONT_LEFT, defuseTimeString);
}
else
{
DrawString(watermark_font, 10, 10, Color(0, 162, 232, 255), FONT_LEFT, "NO TIME BLYAT");
}
}
}
}
}
}

bool C_BaseEntity::IsPlantedC4()
{
return GetClientClass()->m_ClassID == ClassId_CPlantedC4;
}

That part is working now just the values which I get back from my Netvars are completely off.

My Bomb class:
class CCSBomb
{
public:

float GetC4BlowTime()
{
return *(float*)((uintptr_t)this + NetMngr::Get().getOffs("DT_PlantedC4", "m_flC4Blow"));
}

float GetC4DefuseCountdown()
{
return *(float*)((uintptr_t)this + NetMngr::Get().getOffs("DT_PlantedC4", "m_flDefuseCountDown"));
}

int GetBombDefuser()
{
return *(int*)((uintptr_t)this + NetMngr::Get().getOffs("DT_PlantedC4", "m_hBombDefuser"));
}

bool IsBombDefused()
{
return *(bool*)((uintptr_t)this + NetMngr::Get().getOffs("DT_PlantedC4", "m_bBombDefused"));
}
};