//Slaps selected player
Function OnCommand (ID: Byte; Text: string): boolean;
Begin
if GetPiece(Text,' ',0) = '/slap' then begin
DoDamage(strtoint(GetPiece(Text,' ',1)),50);
WriteConsole(0, 'Player ' + GetPlayerStat(strtoint(GetPiece(Text,' ',1)), 'Name') + ' got slapped!', $FFFFFFFF);
end;
End;
although I suggest putting the player id into a variable sense ur calling StrtoInt and GetPiece both 2x on the same thing now.. (sry no time, gtg)