Hi. i remade EnesCe's script for dediced server verrsion: 2.6.3
And i added one option: Change color of the script.
Script Name: Killing Sprees
Script Description: Shows who is on killing sprees and who ends their spree
Original Author(s): Bmekim (Remake of EnEsCe's script)
Core Version: 2.6.3
Code:
const
Color = $000000; //$000000 - it's gray. Change it. :)
var
kills: array[1..32] of byte;
procedure OnJoinGame(ID, Team: byte);
begin
kills[ID] := 0;
end;
procedure OnLeaveGame(ID, Team: byte; Kicked: boolean);
begin
kills[ID] := 0;
end;
procedure OnPlayerKill(Killer, Victim: byte; Weapon: string);
var
spree: array[1..27] of string;
killsNeeded: byte;
begin
killsNeeded := 5; //number of kills needed to count as a killing spree
//spree[x] where x represents the current number of spree kills player has
//more can be added just be sure to change the spree array size
spree[killsNeeded] := ' is on a Killing Spree!';
spree[8] := ' is on a Rampage!';
spree[11] := ' is Dominating!';
spree[14] := ' is Madness!';
spree[17] := ' is Ownage!';
spree[20] := ' is Unstopable!';
spree[22] := ' is Godlike!';
spree[25] := ' is Cheater!!';
spree[27] := ' Dude! Stop it!!';
if killer <> victim then begin
if (GetPlayerStat(killer,'name') <> GetPlayerStat(victim,'name')) then begin
kills[killer] := kills[killer] + 1;
if (kills[victim] >= killsNeeded) then begin
WriteConsole(0, + GetplayerStat(victim,'name') + 's ' + inttostr(kills[victim]) + ' kills spree ended by ' + GetPlayerStat(killer,'name'),Color);
end;
kills[victim] := 0;
if (kills[killer] <= Arrayhigh(spree) + 1) then begin
if (spree[kills[killer]] <> '') then WriteConsole(0, + GetPlayerStat(killer,'name') + spree[kills[killer]],Color);
end;
end
else begin
if (kills[killer] > 0) then SayToPlayer(killer, 'Your spree kills have been reset for team killing');
kills[killer] := 0;
end;
end;
end;