Funzione statica
Veloce
Console.RegisterCommand
Registers a new Console Command
Non ancora tradotto
Sintassi
Console.RegisterCommand(command, callback, description = "", parameters = {})
Parametri
| Nome | Tipo | Predefinito | Descrizione |
|---|---|---|---|
command
|
string | — | The command |
callback
|
function | — | The callback to be called when the command is inputted
Firma della callback
function(params)
|
description
facoltativo
|
string | "" |
The command description to display in the console |
parameters
facoltativo
|
string[] | {} |
The list of supported parameters to display in the console |
Esempi
Console.RegisterCommand("hello", function(text), Console.Log("Sending a 'Hello %s' to everyone!", text), Chat.BroadcastMessage("Hello " .. text),end, "says a message to everyone", { "my_text" })