seta hud_panel_ammo_maxammo "40" "when you have this much ammo, the ammo status bar is full"
-seta hud_panel_healtharmor_maxhealth "250" "when you have this much health, the health status bar is full"
-seta hud_panel_healtharmor_maxarmor "150" "when you have this much armor, the armor status bar is full"
+seta hud_panel_healtharmor_maxhealth "200" "when you have this much health, the health status bar is full"
+seta hud_panel_healtharmor_maxarmor "200" "when you have this much armor, the armor status bar is full"
seta hud_panel_notify_time 10 "time that a new entry stays until it fades out"
seta hud_panel_notify_fadetime 3 "fade out time"
vector HUD_Get_Num_Color (float x, float maxvalue)
{
+ float blinkingamt;
vector color;
- if(x > maxvalue) {
- color_x = 0;
+ if(x >= maxvalue) {
+ color_x = sin(2*M_PI*time);
color_y = 1;
- color_z = 0;
+ color_z = sin(2*M_PI*time);
}
else if(x > maxvalue * 0.75) {
color_x = 0.4 - (x-150)*0.02 * 0.4; //red value between 0.4 -> 0
color_y = 0;
color_z = 0;
}
+
+ blinkingamt = (1 - x/maxvalue/0.25);
+ if(blinkingamt > 0)
+ {
+ color_x = color_x - color_x * blinkingamt * sin(2*M_PI*time);
+ color_y = color_y - color_y * blinkingamt * sin(2*M_PI*time);
+ color_z = color_z - color_z * blinkingamt * sin(2*M_PI*time);
+ }
return color;
}