how to make countdown for cooldown after check that zombie used his ability ?
PHP Code:
public Task_ShowHUD(task)
{
new id = task - TASKID_SHOWHUD
if(!is_user_alive(id))
return PLUGIN_HANDLED
if(g_zombie[id] && InfectedClass[id] == 0)
{
new speed = get_pcvar_num(cvar_hunter_speed)
static health
health = get_user_health(id)
set_hudmessage(255, 150, 0, 0.02, 0.97, 0, 6.0, 1.1, 0.0, 0.0, -1)
new cooldown = 10;
ShowSyncHudMsg(id, g_hudsync , "-=[Health: %d | Class: %s || cooldown : %d ]=-", health, zombieclassnames[InfectedClass[id]], cooldown)
set_task(0.1, "Task_ShowHUD", TASKID_SHOWHUD + id)
}
i need just a simple example