-
Автор темы
- #1
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Код:
void CEsp::DrawHealth(IClientEntity* pEntity, CEsp::ESPBox size, Color color)
{
int health = pEntity->GetHealth();
if (health > 100)
health = 100;
int r = 255 - health * 2.55;
int g = health * 2.55;
int healthBar = size.h / 100 * health;
int healthBarDelta = size.h - healthBar;
int iClampedHealth = pEntity->GetHealth();
if (iClampedHealth >= 100)
iClampedHealth = 100;
// Because we all know that syn's healthbar is shit
Render::Outline(size.x - 4, size.y + 1, 1, size.h * 0.01 * iClampedHealth, Color(r, g, 0, 255));
Render::Outline(size.x - 5, size.y - 1, 3, size.h + 2, Color(0, 0, 0, 255));
}