Console
Summary
Methods
Methods
Register
Register(name: string, description: string, callback: callable): ConsoleCommand
Parameters
| Name |
Type |
Description |
| name |
string |
|
| description |
string |
|
| callback |
callable |
A callback in the form function(args: string{}): string | nil. |
Returns
Example
Console:Register('SomeCommand', 'Incredible command description.', function(args)
if #args == 1 and args[1] == 'hello' then
return 'goodbye'
end
end)
Register
Register(name: string, description: string, context: any, callback: callable): ConsoleCommand
Parameters
| Name |
Type |
Description |
| name |
string |
|
| description |
string |
|
| context |
any |
|
| callback |
callable |
A callback in the form function(context: any, args: string{}): string | nil. |
Returns
Deregister
Deregister(name: string): bool
Parameters
| Name |
Type |
Description |
| name |
string |
|
Returns
Deregister
Deregister(command: ConsoleCommand): bool
Parameters
Returns
DeregisterAll
DeregisterAll()