code match
0 removals
21 lines
0 additions
21 lines
procedure Clock(Ticks: Integer);
procedure Clock(Ticks: Integer);
var
var
d: byte; // Store team's ID
d: byte; // Store team's ID
begin
begin
if not forcepause then begin
if not forcepause then begin
for d := 0 to 4 do if (Game.Teams[d].Score >= Game.ScoreLimit) or (Game.TimeLeft = 0) then begin // Pauses the game after score limit is reached or timelimit is over
for d := 0 to 4 do if (Game.Teams[d].Score >= Game.ScoreLimit) or (Game.TimeLeft = 0) then begin // Pauses the game after score limit is reached or timelimit is over
Game.Paused := true; // Pause the game when the map ends
Game.Paused := true; // Pause the game when the map ends
Game.ScoreLimit := Game.ScoreLimit + 1; // There is a chance that the scorelimit is reached by 2 teams at the same tick or go over the limit if for example, 2 players die at the same time. I think it would cause weird bugs, better safe than sorry
Game.ScoreLimit := Game.ScoreLimit + 1; // There is a chance that the scorelimit is reached by 2 teams at the same tick or go over the limit if for example, 2 players die at the same time. I think it would cause weird bugs, better safe than sorry
UpCount := 1; // Amount of time (in seconds) that the game will be paused before /map command is executed, don't use anything below 1 or else it will loop /map command
UpCount := 1; // Amount of time (in seconds) that the game will be paused before /map command is executed, don't use anything below 1 or else it will loop /map command
forcepause := true; // Anti-loop
forcepause := true; // Anti-loop
end;
end;
end;
end;
if UpCount > 0 then begin
if UpCount > 0 then begin
UpCount := UpCount -1; // Decrease unpause countdown
UpCount := UpCount -1; // Decrease unpause countdown
end
end
else if UpCount = 0 then begin
else if UpCount = 0 then begin
UpCount := -1; // Reset unpause countdown
UpCount := -1; // Reset unpause countdown
Players.WriteConsole('Anti nextmap bug script in action...', Color); // Heads-up to players that the script is working
Players.WriteConsole('Anti nextmap bug script in action...', Color); // Heads-up to players that the script is working
Command('/map '+TrueNM); // Change the map to the "true nextmap" according to maplist.txt
Command('/map '+TrueNM); // Change the map to the "true nextmap" according to maplist.txt
end;
end;
end;
end;