Commands/Lua
Reference for console commands, Lua hooks and Lua commands in CS2D.
- Console Commands are entered in console, executed with key-binds, cfg-files or with Lua parse
- Lua Hooks execute Lua when events occur - some have a return value which can change the game behavior
- Lua Commands are used to retrieve game data or to perform actions in Lua scripts
CS2D Console Commands
Lua Hooks
Lua Commands
printCategories
Parameters
- "text"
Info
Shows "text" in console.
You can start "text" with an RGB color code "©RRRGGGBBB" to change its color. (use a colorpicker to get the values)
Sample 1: Showing a text in console
print("hello, world")
Sample 2: Showing a red text (note that there is no space behind the color tag)
print("©255000000This message is red!")
Note: You can prefix the text with "UTF-8:" to pass encoded UTF-8 strings to this function. Use this tool to encode strings!
Categories
Parameters
- "text"
Info
Shows "text" in console.
You can start "text" with an RGB color code "©RRRGGGBBB" to change its color. (use a colorpicker to get the values)
Sample 1: Showing a text in console
Sample 2: Showing a red text (note that there is no space behind the color tag)
You can start "text" with an RGB color code "©RRRGGGBBB" to change its color. (use a colorpicker to get the values)
Sample 1: Showing a text in console
print("hello, world")
Sample 2: Showing a red text (note that there is no space behind the color tag)
print("©255000000This message is red!")
Note: You can prefix the text with "UTF-8:" to pass encoded UTF-8 strings to this function. Use this tool to encode strings!