0 Members and 2 Guests are viewing this topic.
function OnCommand(ID: Byte; Text: string): boolean;var pname: string;begin pname := GetPlayerStat(ID,'pname'); if Text = '/black' then begin WriteConsole(0,'[' + Name + ']' +?????,$000000); end; Result := false; end;end;
function OnCommand(ID: Byte; Text: string): boolean;var pname: string;begin pname := GetPlayerStat(ID, 'Name'); if GetPiece(LowerCase(Text), ' ', 0) = '/black' then begin WriteConsole(0, '[' + pname + '] ' + Copy(Text, 8, Length(Text)), RGB(0, 0, 0)); end; Result := false;end;
thx! i think its just a matter of memorizing the basic functions and all... cuz i understood every thing you said thereedit:wait... there is one thing i never got to understand, now... or when i learned the lessened pascal, when the result=true or false i still dont know exatclyl what that dose
Quote from: corl45 on December 01, 2007, 08:19:34 pmthx! i think its just a matter of memorizing the basic functions and all... cuz i understood every thing you said thereedit:wait... there is one thing i never got to understand, now... or when i learned the lessened pascal, when the result=true or false i still dont know exatclyl what that dosefor OnCommand or OnPlayerCommand events, when result is false, the command works, if its false then the command doesn't do anything.. like if an admin does /say BLARG! and you have it so oncommand result := true, then nothing will happen..