0 Members and 1 Guest are viewing this topic.
varkills: array[1..32] of integer;CurMap,NexMap: string;HKills: integer;HName: string;procedure ResetKills();vari: integer;beginfor i := 1 to 32 do beginkills[i] := 0;end;end;procedure HighestSpree();beginif HKills > 1 then beginCommand('/say Highest spree by: ' + HName + ' with ' + IntToStr(HKills) + ' kills!');HName := '';HKills := 0;end;end;procedure OnMapChange();beginResetKills();HighestSpree();end;procedure ActivateServer();beginCurMap := CurrentMap;NexMap := NextMap;end;procedure AppOnIdle(Ticks: integer);begin if Ticks mod 2 = 0 then begin //Every 2 seconds if ((CurMap <> CurrentMap) and (TimeLeft > 0)) then begin OnMapChange; //Map has changed! CurMap := CurrentMap; end; end;end;procedure OnCommand(ID: integer;Text: string);vari: integer;beginif GetPiece(Text, ' ', 1) = '/map' then begin if GetPiece(Text, ' ', 2) = CurrentMap then begin ResetKills(); HighestSpree(); end; end; if GetPiece(Text, ' ', 1) = '/restart' then begin ResetKills(); HighestSpree(); end; if GetPiece(Text, ' ', 1) = '/spree' then begin if HKills > 1 then begin Command('/say Highest spree by: ' + HName + ' with ' + IntToStr(HKills) + ' kills!'); end; endend;procedure OnJoinTeam(IP, Nickname: string;Team: byte);beginkills[NameToId(Nickname)] := 0;end;procedure OnLeaveGame(IP, Nickname: string;Team: byte);beginkills[NameToId(Nickname)] := 0;end;procedure OnPlayerKill(Killer,Victim,Weapon: string);varspree: array[1..25] of string;i: integer;j: integer;killsNeeded: integer;beginkillsNeeded := 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 sizespree[killsNeeded] := ' is on a Killing Spree!';spree[8] := ' is on a Rampage!';spree[11] := ' is Dominating!';spree[14] := ' is Unstoppable!';spree[17] := ' is Wicked Sick!';spree[20] := ' is Godlike!';spree[25] := ' is Beyond Godlike!';i := NameToId(killer);j := NameToId(victim);if killer <> victim then begin //needed for servers with survival mode kills[i] := kills[i] + 1 if kills[i] > HKills then begin HKills := kills[i]; HName := killer; end; if (kills[j] >= killsNeeded) then begin Command('/say ' + victim + '''s ' + inttostr(kills[j]) + ' kills spree ended by ' + killer); end; kills[j] := 0; if (kills[i] <= Arrayhigh(spree) + 1) then begin if (spree[kills[i]] <> '') then Command('/say ' + killer + spree[kills[i]]); end;end;end;
Would it be possible to add a bit so if a player gets a Triple Kill, Multi Kill, + it will announce it also?
I can't make it work on the new server version.... rly dont know whats wrong, the compiling completes perfect, and shows no errors.. but there is simply no killing spree on the server! I Combined them manually, and with your script combiner, and everything seems in order.. but. just doesnt show anything ingame??
varkills: array[1..32] of byte;procedure OnJoinGame(ID, Team: byte);beginkills[ID] := 0;end;procedure OnLeaveGame(ID, Team: byte; Kicked: boolean);beginkills[ID] := 0;end;procedure OnPlayerKill(Killer, Victim: byte; Weapon: string);varspree: array[1..17] of string;killsNeeded: byte;beginkillsNeeded := 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 sizespree[killsNeeded] := ' is on a Killing Spree!';spree[8] := ' is on a Rampage!';spree[11] := ' is Dominating!';spree[14] := ' is Unstoppable!';spree[17] := ' is Godlike!';if killer <> victim then beginif (GetPlayerStat(killer,'name') <> GetPlayerStat(victim,'name')) then beginkills[killer] := kills[killer] + 1;if (kills[victim] >= killsNeeded) then beginCommand('/say ' + GetplayerStat(victim,'name') + '''s ' + inttostr(kills[victim]) + ' kills spree ended by ' + GetPlayerStat(killer,'name'));end;kills[victim] := 0;if (kills[killer] <= Arrayhigh(spree) + 1) then beginif (spree[kills[killer]] <> '') then Command('/say ' + GetPlayerStat(killer,'name') + spree[kills[killer]]);end;endelse beginif (kills[killer] > 0) then SayToPlayer(killer, 'Your spree kills have been reset for team killing');kills[killer] := 0;end;end;end;
My new password is secure as shit Mate, I am not sure Shit is even secured nowadays.
Code: [Select]if killer <> victim then begin if (GetPlayerStat(killer,'team') <> GetPlayerStat(victim,'team')) then begin ... end;end;
if killer <> victim then begin if (GetPlayerStat(killer,'team') <> GetPlayerStat(victim,'team')) then begin ... end;end;