-
Автор темы
- #1
C++:
int GetHealth() const {
int m_mask = driver.Read<int>((uintptr_t)this + 0x64);
float m_health = 0.f;
if (m_mask) m_health = m_mask ^ driver.Read<int>((uintptr_t)this + 0x60);
return static_cast<int>(m_health);
}
C++:
__forceinline void DrawPlayerHealth(float x, float y, int health) {
if (health > 100) health = 100;
DrawFilledRect(x - 15.f, y, 30.f, 5.f, ImVec4(0.10f, 0.18f, 0.22f, 1.00f));
DrawFilledRect(x - 15.f + 1.f, y + 1.f, 0.28f * health, 3.f, GetHealthColor(health));
}