Hi
I use this method to change the color of the hood for CountDown
Can anyone offer a more efficient method?
PHP Code:
public task_CountDown()
{
g_iCountDown--
new mins = g_iCountDown/60, secs = g_iCountDown%60
if (g_iCountDown>=0)
{
switch(g_iCountDown)
{
case 0..10:
{
set_dhudmessage(255, 0, 0, -1.0, 0.06, 0, 1.0, 0.8, 0.4, 0.1);
}
case 11..30:
{
set_dhudmessage(255, 255, 0, -1.0, 0.06, 0, 1.0, 0.8, 0.4, 0.1);
}
default:
{
set_dhudmessage(0, 255, 255, -1.0, 0.06, 0, 1.0, 0.8, 0.4, 0.1);
}
}
show_dhudmessage(0, "| %L : %d:%02d |", LANG_SERVER, "BUILD_TIMER", mins, secs);
}
}
__________________