0 Members and 1 Guest are viewing this topic.
function OnPlayerCommand(ID: Byte; Text: string): boolean; if text = '/pos' then WriteConsole(ID,'Your X ordinate is ' +inttostr(GetPlayerStat(ID,'X')),$FFFFFFFF); WriteConsole(ID,'Your Y ordinate is ' +inttostr(GetPlayerStat(ID,'Y')),$FFFFFFFF); end;
IF true THEN doSomethingELSE doSomethingElse;
IF true THEN BEGIN doSomething; doSomethingElse;END ELSE BEGIN doSomeOtherThing; doYetAnotherThing;END;
my understanding of result in the onplayercommand eventis that your telling it whether to pass the command on to soldatfor exampleif someone types '/pos' which is what you are looking for then set Result := true;to tell soldat that its a command that you are going to do stuff for this command so it shouldnt try execute it as wellif however it was '/kill' then after you have checked your own commands if it is not one of yours return false and soldat will know to try and run this command itself...this is how it seems to work IMO
f you're talking about enesce.com/help, then it doesn't even mention result
begin  if Text = '/test' then begin    WriteLn('Test successful!');  end;  Result := false; // Return true if you want to ignore the command typed.end;