Again bug....
Code:
case 0:
{
if (iTeam == CS_TEAM_T)
{
if(is_user_alive(id))
{
new hp = get_user_health(id);
if(hp < 3500)
{
set_task(1.0,"gydytojas", id)
}
}
}
Code:
public gydytojas(id) {
new hp = get_user_health(id);
if(hp < 3500)
{
set_user_health(id, hp + 5);
set_task(1.0,"gydytojas", id);
}
else
{
client_print(id, print_chat, "Daugiau HP nebegausi :)", hp)
return PLUGIN_HANDLED;
}
return PLUGIN_CONTINUE;
}
when round ends and begins new its still restoring hp.....