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
hudtxtcolorfadeCategories
Parameters
- player (1-32): id of a player (or 0 for all)
- id (0-199): internal text id
- duration (ms): color fade/transition effect in milliseconds
- red (0-255): new red color value
- green (0-255): new red color value
- blue (0-255): new red color value
Info
Lets a HUD text (specified with id) change its color (use a colorpicker to get the values). The transition will be smooth and will take the given time (duration).
You can let this effect be visible for all players (player=0) or to a certain player only (player=id of this player).
The text needs to be set with hudtxt or hudtxt2 before you use this command.
Note: The default text color of hudtxt and hudtxt2 is ©255220000 (red=255, green=220, blue=0). You can use another text color by starting the HUD text with ©RRRGGGBBB (with RRR/GGG/BBB being the red/green/blue values, all with 3 digits)
Attention: This command will not work properly with strings which have multiple colors (in-line color tags)!
Lua Hooks
Lua Commands
Categories
Parameters
- player (1-32): id of a player (or 0 for all)
- id (0-199): internal text id
- duration (ms): color fade/transition effect in milliseconds
- red (0-255): new red color value
- green (0-255): new red color value
- blue (0-255): new red color value
Info
Lets a HUD text (specified with id) change its color (use a colorpicker to get the values). The transition will be smooth and will take the given time (duration).
You can let this effect be visible for all players (player=0) or to a certain player only (player=id of this player).
The text needs to be set with hudtxt or hudtxt2 before you use this command.
You can let this effect be visible for all players (player=0) or to a certain player only (player=id of this player).
The text needs to be set with hudtxt or hudtxt2 before you use this command.
Note: The default text color of hudtxt and hudtxt2 is ©255220000 (red=255, green=220, blue=0). You can use another text color by starting the HUD text with ©RRRGGGBBB (with RRR/GGG/BBB being the red/green/blue values, all with 3 digits)
Attention: This command will not work properly with strings which have multiple colors (in-line color tags)!