Difference between revisions of "ScriptHook.RegisterCommand"
From Nomad DB
(Created page with "This function is used to register commands to the Ingame Console. == Syntax == <syntaxhighlight lang="lua"> ScriptHook.RegisterCommand(name, callb...") |
|||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
− | This function is used to register commands to the [[ | + | This function is used to register commands to the [[ScriptHook: Console|Ingame Console]]. |
== Syntax == | == Syntax == | ||
Line 8: | Line 8: | ||
* '''callback''' (function) Command function | * '''callback''' (function) Command function | ||
* '''Returns: [[ICommandRegistry]]''' | * '''Returns: [[ICommandRegistry]]''' | ||
− | |||
− | |||
== Related Pages == | == Related Pages == | ||
* [[ICommandRegistry]] | * [[ICommandRegistry]] | ||
* [[ICommandRegistry:AddArgument]] | * [[ICommandRegistry:AddArgument]] | ||
− | * [[ | + | * [[ScriptHook: Console Commands]] |
− | [[Category: | + | [[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