sandbox:console_input

Shared

Fired when an unrecognised console command is entered


Signal

"sandbox:console_input"

Arguments

TypeNameDescription
stringcommandThe command name that was entered
tableargsArray of additional arguments passed after the command

Only fires for commands not handled by the engine itself.

  • Built-in commands (version, help, clear, start, stop, etc.) are consumed internally and will not reach this signal.
  • Use this to implement custom console commands in Lua.

Example

Add a custom console command
util.event.on("sandbox:console_input", function(command, args)
    if command == "greet" then
        core.engine.print("info", "Hello, " .. (args[1] or "world") .. "!")
    end
end)

On this page