ciobeys
Silver Üye
- Katılım
- 24 Nis 2024
- Mesajlar
- 77
- Beğeniler
- 13
if (Config.PlayerESP.Health) {
int CurHP = (int) std::max(0, std::min(
(int) Player->Health,
(int) Player->HealthMax));
int MaxHP = (int) Player->HealthMax;
long HPColor;
HPColor = SCOLOR;
int colorLine = GetRandomColorByIndexAlpa(Player->TeamID);
int colorText = GetRandomColorByIndexBack(Player->TeamID);
if (Player->Health == 0.0f && !Player->bDead) {
CurHP = Player->NearDeathBreath;
if (Player->NearDeatchComponent) {
MaxHP = Player->NearDeatchComponent->BreathMax;
}
}
SCOLOR = IM_COL32(0, 0, 0, 255);
HPColor = IM_COL32(255, 0, 20, 90);
float boxWidth = density / 1.6f;
boxWidth -= std::min(
((boxWidth / 2) / 0.001f) * Distance,
boxWidth / 2);
float boxHeight = boxWidth * 0.15f;
ImVec2 vStart = {headPosSC.x - (boxWidth / 2),
headPosSC.y -
(boxHeight * 2.001f)};
ImVec2 vEndFilled = {vStart.x + (CurHP * boxWidth / MaxHP),vStart.y + boxHeight};
ImVec2 vEndRect = {vStart.x + boxWidth,
vStart.y + boxHeight};
draw->AddRectFilled(vStart, vEndFilled, colorLine,10.0f);
draw->AddRect(vStart, vEndRect,SCOLOR, 10.0f);
}
Health code
int CurHP = (int) std::max(0, std::min(
(int) Player->Health,
(int) Player->HealthMax));
int MaxHP = (int) Player->HealthMax;
long HPColor;
HPColor = SCOLOR;
int colorLine = GetRandomColorByIndexAlpa(Player->TeamID);
int colorText = GetRandomColorByIndexBack(Player->TeamID);
if (Player->Health == 0.0f && !Player->bDead) {
CurHP = Player->NearDeathBreath;
if (Player->NearDeatchComponent) {
MaxHP = Player->NearDeatchComponent->BreathMax;
}
}
SCOLOR = IM_COL32(0, 0, 0, 255);
HPColor = IM_COL32(255, 0, 20, 90);
float boxWidth = density / 1.6f;
boxWidth -= std::min(
((boxWidth / 2) / 0.001f) * Distance,
boxWidth / 2);
float boxHeight = boxWidth * 0.15f;
ImVec2 vStart = {headPosSC.x - (boxWidth / 2),
headPosSC.y -
(boxHeight * 2.001f)};
ImVec2 vEndFilled = {vStart.x + (CurHP * boxWidth / MaxHP),vStart.y + boxHeight};
ImVec2 vEndRect = {vStart.x + boxWidth,
vStart.y + boxHeight};
draw->AddRectFilled(vStart, vEndFilled, colorLine,10.0f);
draw->AddRect(vStart, vEndRect,SCOLOR, 10.0f);
}
Health code