// inf enhancer v0.1
var
alphaplayer: integer;
score: array[1..2] of integer;
procedure SelectAlpha();
var ran: Integer;
begin
ran := Random(1,32);
if (GetPlayerStat(ran,'Active') = true) then begin
if (GetPlayerStat(ran,'Team') <> 5) then begin
if (GetPlayerStat(ran,'Team') = 2) then begin
Command('/setteam1 ' + inttostr(ran));
end;
alphaplayer := ran;
end;
end;
if alphaplayer = 0 then begin
SelectAlpha();
end;
end;
procedure MoveAllToBravo();
var i: Integer;
begin
alphaplayer := 0;
SelectAlpha();
// Looping through players to put them all on blue team
for i := 1 to 32 do
if (GetPlayerStat(i,'Active') = true) then begin
if (GetPlayerStat(i,'Team') = 1) then begin
if alphaplayer <> i then begin
Command('/setteam2 ' + inttostr(i));
end;
end;
end;
WriteConsole(0,'Alpha team has scored, player teams reset',$FFFFFFFF);
WriteConsole(ran,"You have been randomly selected as the new alpha player',$FFFFFFFF);
end;
procedure OnFlagScore(ID, TeamFlag: Byte);
begin
// if its alpha flag
if TeamFlag = 2 then begin
MoveAllToBravo();
end;
end;
// This will run every time a player is killed
procedure OnPlayerKill(Killer, Victim: byte; Weapon: string);
var i: byte;
begin
// if the victim is on team two, move to team one
if GetPlayerStat(Victim, 'Team') = 2 then begin
score[2] := BravoScore; // saving bravo score
Command('/setteam1 ' + IntToStr(Victim));
// When all Bravo players killed
if BravoPlayers = 0 then begin
SetTeamScore(1, AlphaScore + 25); // add score to alpha
MoveAllToBravo(); //
SetTeamScore(2, score[2]);
end;
end;
end;
// inf enhancer v0.1
var
alphaplayer: integer;
score: array[1..2] of integer;
procedure SelectAlpha();
var ran: Integer;
begin
ran := Random(1,32);
if (GetPlayerStat(ran,'Active') = true) then begin
if (GetPlayerStat(ran,'Team') <> 5) then begin
if (GetPlayerStat(ran,'Team') = 2) then begin
Command('/setteam1 ' + inttostr(ran));
end;
alphaplayer := ran;
end;
end;
if alphaplayer = 0 then begin
SelectAlpha();
end;
end;
procedure MoveAllToBravo();
var i: Integer;
begin
alphaplayer := 0;
SelectAlpha();
// Looping through players to put them all on blue team
for i := 1 to 32 do
if (GetPlayerStat(i,'Active') = true) then begin
if (GetPlayerStat(i,'Team') = 1) then begin
if alphaplayer <> i then begin
Command('/setteam2 ' + inttostr(i));
end;
end;
end;
WriteConsole(0,'Alpha team has scored, player teams reset',$FFFFFFFF);
WriteConsole(ran,"You have been randomly selected as the new alpha player',$FFFFFFFF);
end;
procedure OnFlagScore(ID, TeamFlag: Byte);
begin
// if its alpha flag
if TeamFlag = 2 then begin
MoveAllToBravo();
end;
end;
// This will run every time a player is killed
procedure OnPlayerKill(Killer, Victim: byte; Weapon: string);
var i: byte;
begin
// if the victim is on team two, move to team one
if GetPlayerStat(Victim, 'Team') = 2 then begin
score[2] := BravoScore; // saving bravo score
Command('/setteam1 ' + IntToStr(Victim));
// When all Bravo players killed
if BravoPlayers = 0 then begin
SetTeamScore(1, AlphaScore + 25); // add score to alpha
MoveAllToBravo(); //
SetTeamScore(2, score[2]);
end;
end;
end;