OnConsoleInput: Difference between revisions
From Onset Developer Wiki
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
{{Info|Event|Server & Client|1.2.1}} | {{Info|Event|Server & Client|1.2.1}} | ||
{{FuncDescription|Called when a new input in the console happened.}} | {{FuncDescription|Called when a new input in the console happened. | ||
Read more about the client console here [[Debugging]]}} | |||
{{FuncSyntax|OnConsoleInput(input)}} | {{FuncSyntax|OnConsoleInput(input)}} |
Latest revision as of 09:43, 7 October 2020
Description
Called when a new input in the console happened.
Read more about the client console here Debugging
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)