Script Name: Fix for Join Team Bug
Script Description: There is a bug where when you join a team you are alive. For servers with survival mode enabled this is a problem.
Original Author(s): Bmekim
Core Version: 2.6.0
Code:
var
setteam: integer;
function OnCommand(ID: Byte; Text: string): boolean;
begin
if MaskCheck(Text, '/setteam? *') then setteam := StrToInt(GetPiece(Text,' ',1));
Result := false;
end;
procedure OnJoinTeam(ID, Team: byte);
begin
if ID = setteam then setteam := 0
else if GetPlayerStat(ID,'team') <> 5 then DoDamage(ID,4000);
end;