EDIT: I think this will work.
Code:
#include <amxmodx>
#include <csx>
new g_c4timer;
public plugin_init() {
register_plugin("Test", "0.1", "SAMURAI");
register_event("RoundTime", "newRound", "bc")
register_event("SendAudio", "endRound", "a", "1=0")
}
public bomb_planted() {
g_c4timer = get_cvar_num("mp_c4timer");
set_task(1.0, "dispTime", 652450, "", 0, "a", g_c4timer)
}
public bomb_explode()
remove_task(652450)
public bomb_defused()
remove_task(652450)
public dispTime() {
g_c4timer--
show_hudmsg()
}
show_hudmsg() {
switch ( g_c4timer ) {
case 0..7 : set_hudmessage(150, 0, 0, -1.0, 0.80, 0, 1.0, 1.0, 0.01, 0.01, -1)
case 8..13 : set_hudmessage(150, 150, 0, -1.0, 0.80, 0, 1.0, 1.0, 0.01, 0.01, -1)
default : set_hudmessage(0, 150, 0, -1.0, 0.80, 0, 1.0, 1.0, 0.01, 0.01, -1)
}
show_hudmessage(0, "C4: %d", g_c4timer)
}