Difference between revisions of "ISInterface:RemoveCommand"

From Lavish Software Wiki
Jump to navigation Jump to search
 
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 +
==Syntax==
 +
*bool RemoveCommand(char *Command)
 
== Purpose ==
 
== Purpose ==
 
+
Removes commands created with [[ISInterface:AddCommand|AddCommand]].
 
== Usage ==
 
== Usage ==
 
=== Parameters ===
 
=== Parameters ===
 +
*char *Command
 +
:'''[in]'''Name of the command to be removed
 +
 
=== Return Value ===
 
=== Return Value ===
 +
Returns true on success, false on failure
  
 
== Examples ==
 
== Examples ==
 +
;Example Code
 +
void ISXTest::RegisterCommands()
 +
{
 +
        pISInterface->AddCommand("ISXTest",CMD_ISXTest,true,false);
 +
}
 +
 +
int __cdecl CMD_ISXTest(int argc, char *argv[])
 +
{
 +
        printf("ISXTest Sample Command");
 +
        pISInterface->ExecuteCommand("Display");
 +
        pISInterface->ExecuteCommand("Wireframe on");
 +
        pISInterface->ExecuteTimedCommand(10000,"Wireframe off");
 +
        pISInterface->ExecuteTimedCommand(10500,"echo weeee");
 +
 +
        return 1;
 +
}
 +
void ISXTest::UnRegisterCommands()
 +
{
 +
        pISInterface->RemoveCommand("ISXTest");
 +
}
  
 
== See Also ==
 
== See Also ==
 
* [[ISXDK:ISInterface|ISInterface]]
 
* [[ISXDK:ISInterface|ISInterface]]
 
+
*[[ISInterface:AddCommand]]
 
[[Category:ISXDK]]
 
[[Category:ISXDK]]
 
[[Category:ISInterface]]
 
[[Category:ISInterface]]

Latest revision as of 01:09, 2 September 2005

Syntax

  • bool RemoveCommand(char *Command)

Purpose

Removes commands created with AddCommand.

Usage

Parameters

  • char *Command
[in]Name of the command to be removed

Return Value

Returns true on success, false on failure

Examples

Example Code
void ISXTest::RegisterCommands()
{
       pISInterface->AddCommand("ISXTest",CMD_ISXTest,true,false);
}

int __cdecl CMD_ISXTest(int argc, char *argv[])
{
       printf("ISXTest Sample Command");
       pISInterface->ExecuteCommand("Display");
       pISInterface->ExecuteCommand("Wireframe on");
       pISInterface->ExecuteTimedCommand(10000,"Wireframe off");
       pISInterface->ExecuteTimedCommand(10500,"echo weeee");

       return 1;
}
void ISXTest::UnRegisterCommands()
{
       pISInterface->RemoveCommand("ISXTest");
}

See Also