The reason why is that
ResetHUD is called 2 times after user respawn (approx in 1 sec interval).
You can either do this:
Code:
public HealthOn(id)
{
if (!task_exists(id)) set_task(10.0,"Heal",id,"",0,"b")
return PLUGIN_CONTINUE
}
or set your healing task from client_connect / client_putinserver, not from respawn event.
UPDATE: You can also remove task on death event:
Code:
public plugin_init()
{
// blah blah
register_event("DeathMsg", "on_shit_happens", "a");
// more blah blah
}
public on_shit_happens()
{
new id = read_data(2);
remove_task(id);
}
... but I would use 2. solution.
__________________