First of all I made a workaround for the bug where the server wouldn't change the map although one of the players reached the score limit. Sometimes the script will notice the score limit a bit earlier =)
I also added a !nextmap command which can be used by every player to see the next map. The server will also notice who made the first kill on the map and will tell that.
var kills: array[1..32] of integer;
currMap: string;
procedure OnJoinGame(IP, Nickname: string;Team: byte);
begin
{ When a player joins, reset his kills}
kills[NameToID(Nickname)] := 0;
end;
procedure OnPlayerKill(Killer,Victim,Weapon: string);
var i: byte;
begin
if (Killer <> Victim) then begin
{ Delete kills on Mapchange }
if (currMap <> CurrentMap) then begin
for i:= 1 to 32 do kills[i] := 0;
currMap := CurrentMap;
Command('/say First kill by '+Killer+'. Nextmap is '+NextMap); {Tell people what the next map will be and who did the first kill}
end;
{ Keep track of the kills }
inc(kills[NameToID(Killer)],1);
{ if player reaches limit execute /nextmap }
if (kills[NameToID(Killer)] >= ScoreLimit) then begin
for i:= 1 to 32 do kills[i] := 0;
Command('/nextmap');
end;
end;
end;
procedure OnPlayerSpeak(Name,Text: string);
begin
if (Text = '!nextmap') then Command('/say Nextmap is ' + NextMap);
end;