Code:
if ( ZGetGameTypeManager()->IsQuestDerived( ZGetGame()->GetMatch()->GetMatchType())
{
x = ITEM_XPOS[2]; // HP/AP
sprintf( szBuff, "%s/%s", ZMsg(MSG_CHARINFO_HP), ZMsg(MSG_CHARINFO_AP));
TextRelative(pDC,x,y, szBuff);
}
Code:
if ( ZGetGameTypeManager()->IsQuestDerived( ZGetGame()->GetMatch()->GetMatchType())
|| ZGetGame()->GetMatch()->GetMatchType() == MMATCH_GAMETYPE_DEATHMATCH_TEAM
|| ZGetGame()->GetMatch()->GetMatchType() == MMATCH_GAMETYPE_GLADIATOR_TEAM
|| ZGetGame()->GetMatch()->GetMatchType() == MMATCH_GAMETYPE_CTF)
{
x = ITEM_XPOS[2]; // HP/AP
sprintf( szBuff, "%s/%s", ZMsg(MSG_CHARINFO_HP), ZMsg(MSG_CHARINFO_AP));
TextRelative(pDC,x,y, szBuff);
}
Search again : if ( ZGetGameTypeManager()->IsQuestDerived( ZGetGame()->GetMatch()->GetMatchType())
Code:
if ( ZGetGameTypeManager()->IsQuestDerived( ZGetGame()->GetMatch()->GetMatchType())
|| ZGetGame()->GetMatch()->GetMatchType() == MMATCH_GAMETYPE_DEATHMATCH_TEAM
|| ZGetGame()->GetMatch()->GetMatchType() == MMATCH_GAMETYPE_GLADIATOR_TEAM
|| ZGetGame()->GetMatch()->GetMatchType() == MMATCH_GAMETYPE_CTF)
{
bool bDraw = m_Observer.IsVisible();
ZCharacterManager::iterator itor = ZGetGame()->m_CharacterManager.find( pItem->uidUID);
//Gunz HP/AP Scoreboard
if ( itor != ZGetGame()->m_CharacterManager.end())
{
ZCharacter* pQuestPlayerInfo = (*itor).second;
if (pQuestPlayerInfo->GetTeamID() != ZGetGame()->m_pMyCharacter->GetTeamID()) {
continue;
}
MCOLOR tmpColor = pDC->GetColor();
x=ITEM_XPOS[2];
bDraw = true;
if ( bDraw)
pDC->SetColor( MCOLOR( 0x40FF0000));
else
pDC->SetColor( MCOLOR( 0x30000000));
pDC->FillRectangleW( (x*MGetWorkspaceWidth()), texty*MGetWorkspaceHeight()+1, 0.08*MGetWorkspaceWidth(), 7);
if ( bDraw)
{
float nValue = 0.08 * pQuestPlayerInfo->GetHP() / pQuestPlayerInfo->GetMaxHP();
pDC->SetColor( MCOLOR( 0x90FF0000));
pDC->FillRectangleW( (x*MGetWorkspaceWidth()), texty*MGetWorkspaceHeight()+1, nValue*MGetWorkspaceWidth(), 7);
}
if ( bDraw)
pDC->SetColor( MCOLOR( 0x4000FF00));
else
pDC->SetColor( MCOLOR( 0x30000000));
pDC->FillRectangleW( (x*MGetWorkspaceWidth()), texty*MGetWorkspaceHeight()+9, 0.08*MGetWorkspaceWidth(), 3);
if ( bDraw)
{
float nValue = 0.08 * pQuestPlayerInfo->GetAP() / pQuestPlayerInfo->GetMaxAP();
pDC->SetColor( MCOLOR( 0x9000FF00));
pDC->FillRectangleW( (x*MGetWorkspaceWidth()), texty*MGetWorkspaceHeight()+9, nValue*MGetWorkspaceWidth(), 3);
}
pDC->SetColor( tmpColor);
x=ITEM_XPOS[3];
int nKills = 0;
ZModule_QuestStatus* pMod = (ZModule_QuestStatus*)pQuestPlayerInfo->GetModule(ZMID_QUESTSTATUS);
if (pMod)
nKills = pMod->GetKills();
sprintf(szText,"%d", nKills);
TextRelative(pDC,x,texty,szText,true);
}
}
else
{
x=ITEM_XPOS[2];
sprintf(szText,"%d",pItem->nExp);
TextRelative(pDC,x,texty,szText,true);
MCOLOR color = pDC->GetColor();
if ( ZGetGame()->GetMatch()->GetMatchType() == MMATCH_GAMETYPE_DUEL)
{
if(!pItem->bDeath)
pDC->SetColor( 200, 0, 0);
else
pDC->SetColor( 120, 0, 0);
}
x=ITEM_XPOS[3];
sprintf(szText,"%d",pItem->nKills);
TextRelative(pDC,x,texty,szText,true);
pDC->SetColor( color);
}
x=ITEM_XPOS[4];
sprintf(szText,"%d",pItem->nDeaths);
TextRelative(pDC,x,texty,szText,true);
x=ITEM_XPOS[5];
sprintf(szText,"%d",pItem->nPing);
if(pItem->nPing == 0 || pItem->nPing > 250)
pDC->SetColor( 255, 0, 0);
else if(pItem->nPing > 1)
pDC->SetColor( 50, 205, 50);
else if(pItem->nPing > 150)
pDC->SetColor( 250, 250, 210);
TextRelative(pDC,x,texty,szText,true);
// y+=linespace;
}
while(!items.empty())
{
delete *items.begin();
items.erase(items.begin());
}
}
i hope can help u . Sorry for english bad