OnConsoleInput

From Onset Developer Wiki
Revision as of 16:57, 14 August 2020 by BlueMountains (talk | contribs) (Created page with "{{Info|Event|Server|1.2.1}} {{FuncDescription|Called when a new input in the console happened.}} {{FuncSyntax|OnConsoleInput(input)}} {{FuncParameters}} {{FuncParam|input|T...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
OnConsoleInput

Type: Event
Context: Server
Introduced: v1.2.1

Description

Called when a new input in the console happened.

Syntax

OnConsoleInput(input)

Parameters

  • input
    The text that was typed in the console.

Example

AddEvent("OnConsoleInput", function(input)
    print("OnConsoleInput "..input)

    if input == "quit" or input == "exit" then
        ServerExit("Exiting via console command")
    end
end)

See also