const
PunishSuic=false;
var
FKillsA, FKillsB, FSuicA, FSuicB: integer;
KillsA, SuicA: array[1..AlphaPlayers] of integer;
KillsB, SuicB: array[1..BravoPlayers] of integer;
DSpotXA, DSpotYA: array[1..FKillsA] of single;
DSpotXB, DSpotYB: array[1..FKillsB] of single;
DNameA: array[1..FKillsA] of string;
DNameB: array[1..FKillsB] of string;
SNameA: array[1..FSuicA] of string;
SNameB: array[1..FSuicB] of string;
procedure OnPlayerKill(Killer, Victim: Byte);
begin
if Killer <> Victim then begin
//-----OnKill-----
//---Alpha---
if GetPlayerStat(Killer,'Team') = 1 then begin
KillsA[Killer]:=KillsA[Killer]+1;
DSpotXB[FKillsA]:=Roundto(1,GetPlayerStat(Victim,'x'));
DSpotYB[FKillsA]:=Roundto(1,GetPlayerStat(Victim,'y'));
DNameB[FKillsA]:=GetPlayerStat(Victim,'name');
FKillsA:=FKillsA+1;
end;
//---Bravo---
if GetPlayerStat(Killer,'Team') = 2 then begin
KillsB[Killer]:=KillsB[Killer]+1;
DSpotXA[FKillsB]:=Roundto(1,GetPlayerStat(Victim,'x'));
DSpotYA[FKillsB]:=Roundto(1,GetPlayerStat(Victim,'y'));
DNameA[FKillsB]:=GetPlayerStat(Victim,'name');
FKillsB:=FKillsB+1;
end;
end else begin
//-----OnSuicide-----
//---Alpha---
if GetPlayerStat(Killer,'Team') = 1 then begin
SuicA[Killer]:=SuicA[Killer]+1;
SNameA[FSuicA]:=GetPlayerStat(Victim,'name');
FSuicA:=FSuicA+1;
if PunishSuic = true then FKillsA:=FKillsA-1;
end;
//---Bravo---
if GetPlayerStat(Killer,'Team') = 2 then begin
SuicB[Killer]:=SuicB[Killer]+1;
SNameB[FSuicB]:=GetPlayerStat(Victim,'name');
FSuicB:=FSuicB+1;
if PunishSuic = true then FKillsB:=FKillsB-1;
end;
end;
end;
function OnPlayerCommand(ID:Byte;Text:string):boolean;
var
Temp: array[1..3] of string;
i: integer;
Returnstr: string;
begin
Result:=false;
Temp[1]:=GetPiece(LowerCase(Text), ' ', 0);
if Temp[1] = '/kills' then begin
Temp[2]:=GetPiece(LowerCase(Text), ' ', 1);
if Temp[2] = 'a' or Temp[2] = 'alpha' then begin
Temp[3]:=GetPiece(LowerCase(Text), ' ', 2);
if Temp[3] = 'all' then for i:=1 to FKillsA do begin
SayToPlayer(ID,KillsA[i]);
end;
end;
end;
end;
again, a work in progress, will try to fin when I get home...
can anyone make the command parts?