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
endroundCategories
Parameters
- mode (0-2): end round mode
Info
Ends the current round.
There will be a radio message and a text message in the center of the screen, saying that there's either a draw or a win for a specific team. Moreover team scores will be changed (unless it's a draw). Additionally after a 5 second delay a new round will be started. This includes spawning all players at spawn points, giving them money etc.
There are three different modes to end the round:
- 0 - Draw (no changes in team scores)
- 1 - Terrorists Win (team score +1 for Ts)
- 2 - Counter-Terrorists Win (team score +1 for CTs)
Note: The new round will not begin instantly but with a delay of 5 seconds.
Note: This command has no effect if the current round has already ended and the new round hasn't started yet (5 sec time frame).
Note: No players will be killed and no player scores will be changed by this command. Players who are alive could still kill other players in the 5 sec time frame until the next round starts.
Note: use restart/restartround/sv_restart/sv_restartround instead if you want to reset all team scores.
Lua Hooks
Lua Commands
Categories
Parameters
- mode (0-2): end round mode
Info
Ends the current round.
There will be a radio message and a text message in the center of the screen, saying that there's either a draw or a win for a specific team. Moreover team scores will be changed (unless it's a draw). Additionally after a 5 second delay a new round will be started. This includes spawning all players at spawn points, giving them money etc.
There are three different modes to end the round:
There will be a radio message and a text message in the center of the screen, saying that there's either a draw or a win for a specific team. Moreover team scores will be changed (unless it's a draw). Additionally after a 5 second delay a new round will be started. This includes spawning all players at spawn points, giving them money etc.
There are three different modes to end the round:
- 0 - Draw (no changes in team scores)
- 1 - Terrorists Win (team score +1 for Ts)
- 2 - Counter-Terrorists Win (team score +1 for CTs)
Note: The new round will not begin instantly but with a delay of 5 seconds.
Note: This command has no effect if the current round has already ended and the new round hasn't started yet (5 sec time frame).
Note: No players will be killed and no player scores will be changed by this command. Players who are alive could still kill other players in the 5 sec time frame until the next round starts.
Note: use restart/restartround/sv_restart/sv_restartround instead if you want to reset all team scores.