Code:
#include <amxmodx>
#include <fun>
new hpTimer = 15
public plugin_init() {
register_plugin("Auto Healing","1.0","stigma")
register_concmd("healme","autoHeal",0,"Gives a client +3HP for 15 seconds")
register_clcmd("say /heal","autoHeal",0,"Gives a client +3HP for 15 seconds")
}
public autoHeal(id) {
set_hudmessage(200,0,0, 0.03, 0.76, 2, 0.02, 1.0, 0.01, 0.1, 2)
if(hpTimer < 0) {
set_user_health(id,get_user_health(id)) + 3
show_hudmessage(id,"Time before healing stops: %i",hpTimer)
set_task(1.0,"autoHeal",id)
return PLUGIN_HANDLED
}
return PLUGIN_HANDLED
}
I dont know whats the matter with this script, but i just cant get it to auto heal me, i dont get any warnings og errors in the compiling part, and all the neccecary modules are loaded...