Difference between revisions of "ScriptHook.RegisterCommand"

From Nomad DB
 
Line 1: Line 1:
This function is used to register commands to the [[WD2 ScriptHook: Console|Ingame Console]].
+
This function is used to register commands to the [[ScriptHook: Console|Ingame Console]].
  
 
== Syntax ==
 
== Syntax ==
Line 12: Line 12:
 
* [[ICommandRegistry]]
 
* [[ICommandRegistry]]
 
* [[ICommandRegistry:AddArgument]]
 
* [[ICommandRegistry:AddArgument]]
* [[WD2 ScriptHook: Console Commands]]
+
* [[ScriptHook: Console Commands]]
  
[[Category:WD2 ScriptHook Lua]]
+
[[Category:ScriptHook Lua]]

Latest revision as of 12:57, 6 October 2020

This function is used to register commands to the Ingame Console.

Syntax

ScriptHook.RegisterCommand(name, callback)
  • name (string) Name of the command
  • callback (function) Command function
  • Returns: ICommandRegistry

Related Pages