OnCommand

From Soldat Community Wiki
Revision as of 09:23, 15 August 2012 by Freeman (talk | contribs) (Created page with "===From the Scripting Manual=== ''function OnCommand(ID: Byte; Text: string): boolean;'' '''Parameter Info:''' ID (Byte): ID of the player who sent the command. (255 = S...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

From the Scripting Manual

function OnCommand(ID: Byte; Text: string): boolean;

Parameter Info:
 ID (Byte): ID of the player who sent the command. (255 = Server)
 Text (String): Command which has been sent.

Description:
 This procedure will be called every time an ingame Admin or TCP Admin send a / command.
 You may add your own commands here.

Examples

begin
    if Text = '/test' then begin
       WriteLn('Test successful!');
    end;
    Result := false; // Return true if you want to ignore the command typed.
end;


External Links