No no, this part works perfectly, i'm just curious about "time" values.
I'm willing to stop the damage when one of tasks like this is active using
PHP Code:
RegisterHam(Ham_TakeDamage, "player", "hook_TakeDamage")
Now it looks something like that
PHP Code:
public hook_TakeDamage(victim, attacker, useless, Float:damage, damagebits) {
switch(something)
{
case 1:
{
if(task_exists(TASK_1))
return HAM_SUPERCEDE
}
case 2:
{
if(task_exists(TASK_2))
return HAM_SUPERCEDE
}
case 3:
{
if(task_exists(TASK_3))
return HAM_SUPERCEDE
}
etc...
return HAM_IGNORED
}
But i thought to get a little bit more optimised i could use code like that
PHP Code:
public hook_TakeDamage(victim, attacker, useless, Float:damage, damagebits) {
if(time > 0) {
return HAM_SUPERCEDE
}
return HAM_IGNORED
}
then i would save a lot of lines
As far as you said variable TIME stops @ 0 or -1 ( not sure ) and stays with it for good.