Newbie Spellweaver
- Joined
- Aug 31, 2020
- Messages
- 36
- Reaction score
- 3
{
ZCharacter* pTargetCharacter = GetTargetCharacter();
if (pTargetCharacter == NULL) return;
float texty = 0.75000f;
float x = 0.024f;
float ysub = 0.05000f;
for(ZCharacterManager::iterator itor = ZGetGame()->m_CharacterManager.begin();
itor != ZGetGame()->m_CharacterManager.end(); ++itor)
{
rvector pos, screen_pos;
ZCharacter* pCharacter = (*itor).second;
if (!pCharacter->IsVisible()) continue;
if (pCharacter->IsDie()) continue;
if (pCharacter->GetTeamID() != pTargetCharacter->GetTeamID()) continue;
if (pCharacter==pTargetCharacter) continue;
MCOLOR tmpColor = pDC->GetColor();
pDC->SetColor(MCOLOR(0xFFffd700));
MFont* pFont = GetGameFont();
pFont = MFontManager::Get("FONTa10_O2Wht");
pDC->SetFont(pFont);
pDC->Text(x * MGetWorkspaceWidth(), texty * MGetWorkspaceHeight() - 16, pCharacter->GetUserNameA());
pDC->SetColor(MCOLOR(0x901C1C1C));
pDC->FillRectangleW((x * MGetWorkspaceWidth()), texty * MGetWorkspaceHeight() + 1, 0.08 * MGetWorkspaceWidth(), 7);
float fHP = 0.08 * pCharacter->GetHP() / pCharacter->GetMaxHP();
if (fHP == 1.0f)pDC->SetColor(MCOLOR(0xFF0080FF));
else if (fHP > 0.7f) pDC->SetColor(MCOLOR(0xFF45B1BA));
else if (fHP > 0.3f) pDC->SetColor(MCOLOR(0xFFE7DC22));
else pDC->SetColor(MCOLOR(0xFFE92C16));
pDC->FillRectangleW((x * MGetWorkspaceWidth()), texty * MGetWorkspaceHeight() + 1, fHP * MGetWorkspaceWidth(), 7);
pDC->SetColor(MCOLOR(0x901C1C1C));
pDC->FillRectangleW((x * MGetWorkspaceWidth()), texty * MGetWorkspaceHeight() + 9, 0.08 * MGetWorkspaceWidth(), 7);
float fAP = 0.08 * pCharacter->GetAP() / pCharacter->GetMaxAP();
pDC->SetColor(MCOLOR(0xFF44C13E));
pDC->FillRectangleW((x * MGetWorkspaceWidth()), texty * MGetWorkspaceHeight() + 9, fAP * MGetWorkspaceWidth(), 7);
pDC->SetColor(tmpColor);
texty -= ysub;
i need some help for fix color same is not work.. :/
Attachments
You must be registered for see attachments list