Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- char *pointerToHealth, HealthToDraw[255];
- pointerToHealth = itoa(pEntity->Health, HealthToDraw, 10);
- int HealthColor[3]; // 0 - r, 1 - g, 2 - b
- if (pEntity->Health <= 100 && pEntity->Health > 50)
- {
- HealthColor[0] = 0;
- HealthColor[1] = 255;
- HealthColor[2] = 0;
- }
- if (pEntity->Health <= 50 && pEntity->Health > 25)
- {
- HealthColor[0] = 255;
- HealthColor[1] = 153;
- HealthColor[2] = 0;
- }
- if (pEntity->Health <= 25 && pEntity->Health >= 1)
- {
- HealthColor[0] = 255;
- HealthColor[1] = 0;
- HealthColor[2] = 0;
- }
- DrawShadowString(HealthToDraw, W2S[0], W2S[1], HealthColor[0], HealthColor[1], HealthColor[2], pFont);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement