I need help with countdown timer. Here is little example:
PHP Code:
#include <amxmodx>
new timer = 11
public plugin_init()
{
register_plugin("timer test", "1.0", "me");
register_clcmd("say /timer", "cmdTimer", ADMIN_RCON, "starts timer");
}
public cmdTimer(id)
{
set_task(1.0, "countdown", id,_,_,"b");
}
public countdown(id)
{
timer --
client_print(0, print_chat, "Timeleft: %d", timer);
if(timer < 1)
{
remove_task(id)
timer = 11
}
}
But i want it to show minutes and seconds:
Code:
(0:10)
(0:09)
(0:08)
...