0x73616D
Active member
What's wrong? The color should change but it doesn't.
C++:
char piluluall[64] = { 0 };
int pshow = (int)PEDSELF->GetHealth() + (int)PEDSELF->GetArmor();
if ((int)pshow <= 30)
{
sprintf(piluluall, "%d", (int)pshow);
pFont->Print(piluluall, D3DCOLOR_ARGB(0XFF, 255, 0, 0), 500, 400, false); // {FF0000} | R = 255 | G = 0 | B = 0 |
}
else if ((int)pshow > 30)
{
sprintf(piluluall, "%d", (int)pshow);
pFont->Print(piluluall, D3DCOLOR_ARGB(0XFF, 255, 110, 0), 500, 400, false); // {FF6E00} | R = 255 | G = 110 | B = 0 |
}
else if ((int)pshow > 49)
{
sprintf(piluluall, "%d", (int)pshow);
pFont->Print(piluluall, D3DCOLOR_ARGB(0XFF, 255, 180, 0), 500, 400, false); // {FFB400} | R = 255 | G = 180 | B = 0 |
}
else if ((int)pshow > 74)
{
sprintf(piluluall, "%d", (int)pshow);
pFont->Print(piluluall, D3DCOLOR_ARGB(0XFF, 255, 255, 0), 500, 400, false); // {FFFF00} | R = 255 | G = 255 | B = 0 |
}
else if ((int)pshow > 99)
{
sprintf(piluluall, "%d", (int)pshow);
pFont->Print(piluluall, D3DCOLOR_ARGB(0XFF, 150, 255, 0), 500, 400, false); // {96FF00} | R = 150 | G = 255 | B = 0 |
}
else if ((int)pshow > 124)
{
sprintf(piluluall, "%d", (int)pshow);
pFont->Print(piluluall, D3DCOLOR_ARGB(0XFF, 0, 255, 0), 500, 400, false); // {00FF00} | R = 0 | G = 255 | B = 0 |
}
else if ((int)pshow > 149)
{
sprintf(piluluall, "%d", (int)pshow);
pFont->Print(piluluall, D3DCOLOR_ARGB(0XFF, 0, 255, 255), 500, 400, false); // {00FFFF} | R = 0 | G = 255 | B = 255 |
}
else if ((int)pshow > 174)
{
sprintf(piluluall, "%d", (int)pshow);
pFont->Print(piluluall, D3DCOLOR_ARGB(0XFF, 0, 0, 255), 500, 400, false); // {0000FF} | R = 0 | G = 0 | B = 255 |
}