This should work.
procedure AppOnIdle(Ticks: integer);
var i: byte;
begin
for i := 1 to 32 do
if GetPlayerStat(i, 'Team') = 1 then
if (GetPlayerStat(i,'Health') < (MAX_HEALTH - (DROP_VALUE - 1))) then
DoDamage(i,-DROP_VALUE)
else
DoDamage(i,-(MAX_HEALTH - (GetPlayerStat(i,'Health'))));
end;
As for the team mover, I don't really understand the problem, but you need a space after /setteam1
procedure OnJoinTeam(ID, Team: byte);
begin
if Team = 2 then begin
WriteConsole(ID, 'This is not your team!', $90C2A0);
Command('/setteam1 ' + inttostr(ID));
end;
end;