For some reason this countdown doesnt work. I type /countdown and nothing happens.
PHP Code:
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "[ZP] Countdown"
#define VERSION "1.0"
#define AUTHOR "Mr.Apple"
new time_s
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
register_clcmd("say /countdown", "countdown")
}
public event_round_start()
{
time_s = 5
}
public countdown()
{
set_hudmessage(0, 255, 0, -1.0, 0.28, 2, 1.1, 1.1, 0.01, 0.01)
show_hudmessage(0, "---Warning---^n ---Alerta Biologica en: %i---", time_s);
--time_s;
if(time_s >= 1)
{
set_task(1.0, "countdown")
}
}
__________________