You don't need set_task for this.
Use get_gametime and check if the time is larger than current time or not
PHP Code:
/*
| =============================
| Generated by Berk
| Made in Turkey
| Keep It Ready
| =============================
*/
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "Show Damage Plus"
#define VERSION "1.0"
#define AUTHOR "Berk"
#define TIMEOUT 2.0 //How long will the combo reset
new iCombo[33] , iHits[33]
new Float:fTimeout[33]
new g_Maxplayers
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("Damage","event_damage","b","2!0","3=0","4!0")
register_event("HLTV", "event_new_round", "a", "1=0", "2=0")
}
public event_damage(id)
{
new attacker = get_user_attacker(id)
new iDamage = read_data(2)
//Check to reset combo
if(fTimeout[attacker] >= get_gametime())
iCombo[attacker] = 0
fTimeout[attacker] = get_gametime() + TIMEOUT //Set next timeout
iCombo[attacker]++
iHits[attacker]++
set_hudmessage(0, 255, 255, -1.0, 0.70, 0, 4.0, 1.0, _, _, -1)
show_hudmessage(attacker, "%i^n(Combo %dx) (Hit's %d)", iDamage, iCombo[attacker], iHits[attacker])
}
public event_new_round()
{
for(new player;player<g_Maxplayers;player++)
iHits[32]= 0;
}
__________________