0 Members and 1 Guest are viewing this topic.
varprocedure DoDamage(ID: Byte; Damage: Integer)beginIf Text'/kill (ID)' then beginDoDamage((ID), 16000);end;end;
function OnCommand(ID:Byte;Text:string):boolean;var DPlr: Byte; DmgI: integer;begin//-----DoDamage----- if GetPiece(LowerCase(Text), ' ', 0) = '/dodamage' then begin  DPlr:=strtoint(GetPiece(Text, ' ', 1));  DmgI:=strtoint(GetPiece(Text, ' ', 2));  if GetPlayerStat(DPlr,'Active') = true then begin   DoDamage(DPlr,DmgI);  end;  if GetPlayerStat(DPlr,'Active') = false then begin   SayToPlayer(ID,'Player number to damage is inactive.');  end;  if (DmgI = 150) then begin   SayToPlayer(ID,'Perfect Kill!');  end; end;end;
......Code: [Select]procedure DoDamage(ID: Byte; Damage: Integer)beginIf Text'/kill (ID)' then beginDoDamage((ID), 16000);end;end;......
procedure DoDamage(ID: Byte; Damage: Integer)beginIf Text'/kill (ID)' then beginDoDamage((ID), 16000);end;end;
function OnCommand(ID:Byte;Text:string):boolean;begin Result:=false; if GetPiece(LowerCase(Text), ' ', 0) = '/kill' then begin  DoDamage(GetPiece((Text), ' ', 1),4000); end;end;
'/dodamage 1 150' kills player one (150 gets "perfect kill")
function OnCommand(ID:Byte;Text:string):boolean;begin Result:=false; if GetPiece(LowerCase(Text), ' ', 0) = '/kill' then DoDamage(GetPiece((Text), ' ', 1),4000);end;