OnConsoleInput

From Onset Developer Wiki
Revision as of 09:37, 7 October 2020 by BlueMountains (talk | contribs)
OnConsoleInput

Type: Event
Context: Server & Client
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

Server

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

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

Client

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

See also