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
sv_stopsoundCategories
Parameters
- soundfile (text): a path to a soundfile. relative to the sfx folder
- player (0-32): ID of a player or 0 for all players
Info
Stops playback of all sounds with the given soundfile which have been started beforehand using either sv_sound or sv_sound2. Playback can be stopped for all players (player 0) or for a specific player only.
Note: The player parameter is optional. The sound will be stopped for all players if it is not provided.
Attention: Parameter order is different from the parameter order in sv_sound2. This is for compatibility reasons because the player parameter has been added in an update.
Lua Hooks
Lua Commands
Categories
Parameters
- soundfile (text): a path to a soundfile. relative to the sfx folder
- player (0-32): ID of a player or 0 for all players
Info
Stops playback of all sounds with the given soundfile which have been started beforehand using either sv_sound or sv_sound2. Playback can be stopped for all players (player 0) or for a specific player only.
Note: The player parameter is optional. The sound will be stopped for all players if it is not provided.
Attention: Parameter order is different from the parameter order in sv_sound2. This is for compatibility reasons because the player parameter has been added in an update.