IConsole
interface in cs_script/point_script — the type of Console.
An API provided to scripts for the console: logging, ConVars, and ConCommands.
Access these functions by importing Console from "cs_script/point_script".
CS2 build 27045800 · Steam date 2026-11-30 · platform windows-x86_64 · schema format 2.2
Members
Log
Log(text: any): voidLog a message to the console.
GetConvarBoolean
GetConvarBoolean(name: string): boolean | undefinedGet the value of a boolean convar.
See also: ConVars.
GetConvarNumber
GetConvarNumber(name: string): number | undefinedGet the value of a numeric convar.
See also: ConVars.
GetConvarString
GetConvarString(name: string): string | undefinedGet the value of any convar, converted to a string.
See also: ConVars.
GetConvarVector
GetConvarVector(name: string): Vector | undefinedGet the value of a Vector convar.
See also: ConVars.
GetConvarQAngle
GetConvarQAngle(name: string): QAngle | undefinedGet the value of a QAngle convar.
See also: ConVars.
GetConvarColor
GetConvarColor(name: string): Color | undefinedGet the value of a Color convar.
See also: ConVars.
SetConvar
SetConvar(name: string, value: boolean | number | string | Vector | QAngle | ColorArg): voidSet the value of a convar.
See also: ConVars.
ClientCommand
ClientCommand(playerSlot: number, command: string): voidIssue the specified command to the specified client.
See also: Commands.
ServerCommand
ServerCommand(command: string): voidIssue a command.
RegisterCheatCommand
RegisterCheatCommand(name: string, callback: (args: string) => void): voidCreates a console command that will run the specified callback. The command will only work when sv_cheats is true.