Console
Built-in Console library. (Opens with key: F1)
Examples:
.AddCommand with any args count:
.AddCommand with limited args count:
.Print with multi color:
Static Functions:
.AddCommand
Console.AddCommand(name: string, description: string, usage: string, numargs: integer, callback: function)
: boolean
name
string
Name of the command
description
string (optional)
Description of the command
usage
string (optional)
Usage of the command
numargs
string (optional)
Number of args required
callback
function
Function that will get called
Returns true when command was successfully registered and doesn't exist.
.RemoveCommand
Console.RemoveCommand(name: string)
name
string
Name of the command
Removes command by name. Note: You can't remove command registered by other script!
.Print
Console.Print(text: string, color: Color, sameline: boolean)
text
string
Text to print
color
Color
Color object
sameline
boolean (optional)
Will print on last line
This is mostly same as print
function, but this will open you more option for like raw text printing & color and printing on old line to make multi color print.
Last updated