try it :
PHP Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#define PLUGIN "Healing"
#define VERSION "1.0"
#define AUTHOR "author"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("heal","cmd_heal")
register_cvar("amx_heal_persecond","1")
}
public cmd_heal(id)
{
new Health = get_user_health(id)
if(Health!=100) //if you need healing
{
set_task(1.0,"plus_hp",id,"",0,"b") //plus_hp for per seconds
}
else
{
client_print(id,print_center,"You dont need healing!")
}
}
public plus_hp(id)
{
if(Health!=100) //if you need healing
{
set_user_health(id,get_user_health(id)+get_cvar_num("amx_heal_persecond"))
//an example ... sethp(myhp+1)
}
else
{
//if your hp is 100, stop the healing
remove_task(id)
client_print(id,print_chat,"Your healing is stopped!")
}
}