Quote:
Originally Posted by bwgrubbs1
Works...BUT...doesn't call the function every 2 seconds.
I get this in console.
Debug: Adding 2 hp. Current HP = 81
Debug: Adding 2 hp. Current HP = 83
Debug: Adding 2 hp. Current HP = 85
Debug: Adding 2 hp. Current HP = 87
Debug: Adding 2 hp. Current HP = 89
Debug: Adding 2 hp. Current HP = 91
Debug: Adding 2 hp. Current HP = 93
Debug: Adding 2 hp. Current HP = 95
Debug: Adding 2 hp. Current HP = 97
Debug: Setting user hp to 100
REAL FAST...but it does take 2 second to start.
|
change
Code:
if(equali(szClassname, "healer"))
to
Code:
if(equali(szClassname, "healer") && !task_exists(id))
Quote:
Originally Posted by bwgrubbs1
ALSO. If you die, and you land on the block it does this...
Debug: Adding 2 hp. Current HP = -122
Debug: Adding 2 hp. Current HP = -122
Debug: Adding 2 hp. Current HP = -122
Debug: Adding 2 hp. Current HP = -122
Debug: Adding 2 hp. Current HP = -122
Debug: Adding 2 hp. Current HP = -122
Debug: Adding 2 hp. Current HP = -122
Debug: Adding 2 hp. Current HP = -122
...SPAMS THIS HARD CORE...until this
Debug: Adding 2 hp. Current HP = 1
Debug: Adding 2 hp. Current HP = 3
Debug: Adding 2 hp. Current HP = 5
Debug: Adding 2 hp. Current HP = 7
Debug: Adding 2 hp. Current HP = 9
...
Debug: Adding 2 hp. Current HP = 99
Debug: Setting user hp to 100
|
Add
Code:
if(!is_user_alive(id))
{
remove_task(id)
return PLUGIN_CONTINUE
}
to give_health()