0 Members and 1 Guest are viewing this topic.
function OnCommand(ID:Byte;Text:string):boolean;beginIf GetPiece(LowerCase(Text), ' ', 0) = '/kill' then beginDoDamage (ID,4000);end;
function OnPlayerCommand(ID: Byte; Text: string):boolean;var Temp: array[1..5] of string; //now you have an easy 5 "Temp" variables :)begin Result:=false; Temp[1]:=GetPiece(LowerCase(Text), ' ', 0); if Temp[1] = '/kill' then begin Result:=true; //ignores command... DoDamage(ID,4444); //actually, 150 is a "Perfect kill" in DoDamage, but 4000 makes sure...//-----Optional----- DrawText(ID,' ',50,$ffff2020,.24,40,240); DrawText(ID,'Killed by The Guardians.',125,$ffff2020,.24,40,240);//I think that's the right scale and position for "Killed By" drawtexts, I am not sure... end;end;
DoDamage(StrToInt(GetPiece(Text, ' ', 1)), 4444);
function OnPlayerCommand(ID: Byte; Text: string):boolean;var Temp: array[1..5] of string; //now you have an easy 5 "Temp" variables :)begin Result:=false; Temp[1]:=GetPiece(LowerCase(Text), ' ', 0); if Temp[1] = '/suicide' then begin Result:=true; //ignores command... DoDamage(ID,4444); //actually, 150 is a "Perfect kill" in DoDamage, but 4000 makes sure...//-----Optional----- DrawText(0,IDToName(ID),50,$ffff2020,.24,40,240); DrawText(0,'Killed by The Guardians.',125,$ffff2020,.24,40,240);//I think that's the right scale and position for "Killed By" drawtexts, I am not sure... end;end;