console:registerVariable
Console commands should be registered on the MOD:onInit() function
The command id needs to be unique
void console:registerVariable(command, var, description, flags)
Registers a new console command
local myVar = false
console:registerVariable("my_command", myVar, "My command description", CONSOLE.FLAGS.CHEATS | CONSOLE.FLAGS.ADMIN) -- Admin only and requires cheats enabled
Parameters
| Type | Name | Description | Optional |
|---|---|---|---|
| string | command | No description | |
| number | var | No description | |
| string | var | No description | |
| boolean | var | No description | |
| string | description | Default: '' | ✔ |
| CONSOLE.FLAGS | flags | Default: '' | ✔ |