Commands/Lua
Reference for console commands, Lua hooks and Lua commands in CS2D.
- CS2D Console Commands can be entered in the console, executed with key-binds, configuration (cfg) files or in Lua with parse
- Lua Hooks are used to execute Lua scripts when certain things happen - some have a return value which can change the game behavior
- Lua Commands are used to retrieve game data and to modify/extend the game
CS2D Console Commands
Category: server (198)
msgCategories
Parameters
- message (text): the message you want to send
Info
Send a message to everyone on your server.
Same as sv_msg!
Add an @C at the end of your text to display the message at the center of the screen.
For example: "Centered [email protected]"
You can also use color codes (You can use an online colorpicker to get the values) at the beginning and in-line! Colors are encoded as RGB values.
Format: ©RRRGGGBBB (with each part RRR, GGG and BB ranging from 000 to 255)
For example: "©255000000This is a red text" or "The following text is ©000000255blue"
Note: Each component, R, G and B always has to have 3 digits. Add leading zeros if necessary!
Lua Hooks
Lua Commands
Categories
Parameters
- message (text): the message you want to send
Info
Send a message to everyone on your server.
Same as sv_msg!
Add an @C at the end of your text to display the message at the center of the screen.
For example: "Centered [email protected]"
You can also use color codes (You can use an online colorpicker to get the values) at the beginning and in-line! Colors are encoded as RGB values.
Format: ©RRRGGGBBB (with each part RRR, GGG and BB ranging from 000 to 255)
For example: "©255000000This is a red text" or "The following text is ©000000255blue"
Same as sv_msg!
Add an @C at the end of your text to display the message at the center of the screen.
For example: "Centered [email protected]"
You can also use color codes (You can use an online colorpicker to get the values) at the beginning and in-line! Colors are encoded as RGB values.
Format: ©RRRGGGBBB (with each part RRR, GGG and BB ranging from 000 to 255)
For example: "©255000000This is a red text" or "The following text is ©000000255blue"
Note: Each component, R, G and B always has to have 3 digits. Add leading zeros if necessary!



