0 Members and 1 Guest are viewing this topic.
procedure BalanceTeams(fromTeam, toTeam : byte);var i : integer; Changed : boolean; CmdStr : String;begin i := 1; Changed := False; while (i <= LAST_JOINED_LENGTH) and (not Changed) do begin if arrLastJoined[i].Team = fromTeam then begin CmdStr := '/setteam' + IntToStr(toTeam) + ' ' + IntToStr(arrLastJoined[i].ID); Command(CmdStr); SayToPlayer(arrLastJoined[i].ID, 'You have been moved to team ' + GetTeamName(toTeam)); arrLastJoined[i].ID := GetLastJoinedID(arrLastJoined[i].Team); Changed := True; end; i := i + 1; end;end;
1.10-- Added /balanceteams admin command to check balance-- Added boolean constant to enable/disable auto checking of balance-- Fixed bug where PlayerID wasn't defined if the last joined ID = 1