procedure Heal(Team: byte);
var
HP: integer;
i: byte;
begin
for i:= 1 to 32 do if GetPlayerStat(i,'Active') = true then if GetPlayerStat(i,'Alive') = true then if GetPlayerStat(i,'Health') < MaxHP then
if Team = GetPlayerStat(i,'Team') then if
Distance(GetPlayerStat(Medic[Team],'X'),GetPlayerStat(Medic[Team],'Y'),GetPlayerStat(i,'X'),GetPlayerStat(i,'Y')) <= HealDistance then begin
DrawText(Medic[Team],'Healing',60,Color,0.1,160,350);
if GetPlayerStat(i,'Health') <= (MaxHP-HpHealed) then HP:= 5 else HP:= MaxHP-GetPlayerStat(i,'Health');
DoDamage(i,-HP);
if Medic[Team] <> i then begin
inc(Healed[Team],HP);
if Healed[Team] > HealForPoint then begin
WriteConsole(Medic[Team],'You got 1 point for healing.',Color);
SetScore(Medic[Team],GetPlayerStat(Medic[Team],'Kills')+1);
Healed[Team]:= 0;
end;
end;
end;
end;
The engine is stared a bit but it wants to change that as it then pressing q healing oneself and others want to not have been this push!