I improved the code based on OciXCrom comment. It compiled fine but I didn't test it.
PHP Code:
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "Plugin Name"
#define VERSION "1.0"
#define AUTHOR "Plugin Author"
new g_CurrentSecond;
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
register_event("HLTV", "event_round_start", "a", "1=0", "2=0");
g_CurrentSecond = 10;
}
public plugin_precache()
{
new precacheString[32];
for (new i = 0; i < 11; i++) {
formatex(precacheString, charsmax(precacheString), "zombie_plague/%d.wav", i);
precache_sound(precacheString);
}
}
public event_round_start()
{
set_task(5.0, "Countdown");
}
public Countdown()
{
set_task(1.0, "RealCountdown", 0, "", 0, "a", 11);
}
public RealCountdown()
{
new hudMessage[32];
new playSoundString[32];
formatex(hudMessage, charsmax(hudMessage), "-= %d =-^n[**********]", g_CurrentSecond);
formatex(playSoundString, charsmax(playSoundString), "spk zombie_plague/%d", g_CurrentSecond);
set_hudmessage(0, 180, 255, -1.0, 0.28, 2, 0.02, 1.0, 0.01, 0.1, 10);
show_hudmessage(0, hudMessage);
client_cmd(0, playSoundString);
g_CurrentSecond--;
}