function OnCommand(ID:Byte;Text:string):boolean;
var
Temp0, Temp1, Temp2: string;
begin
Result:=false;
Temp0:=GetPiece(LowerCase(Text), ' ', 0);
Case Temp0 of
'/kills','/setkills': begin
Temp1:=GetPiece(Text, ' ', 1);
Temp2:=GetPiece(Text, ' ', 2);
if Active[strtoint(Temp1)] then begin
if Team[strtoint(Temp1)] < 5 then begin
try
SetScore(Temp1,Temp2);
except
WriteConsole(ID,'SetScore failed, Unknown exception.',$FFFF8020);
end;
end else WriteConsole(ID,'Cannot set kills, Player is Spectator.',$FFFF8020);
end else WriteConsole(ID,'Cannot set kills, Player is inactive.',$FFFF8020);
end;
//add more stuff here
end;
end;
this will set the player's kills
( /kills *playernum* *new kills* )
I used case so you can add more commands if needed