diff --git a/README.md b/README.md index 8db6dad2..29e29885 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,13 @@ Archive's bin directory contains 2 subdirectories, 'bugfixed' and 'pure'
ReGameDLL_CS also have beta version with latest changes from official version of Counter-Strike.
* Enter `-beta` option at the command line HLDS. +## Commands +| Command | Description | +| :---------------------------------- | :---------------------------------------------- | +| game version | Will show GameDLL build version, date & URL. | +| endround | Args:
`T` force round end with Terrorists win.
`CT` force round end with Counter-Terrorists win.
or terminate round draw when called without arguments. | +| mp_swapteams | Swap the teams and restart the game. | + ## Configuration (cvars)
Click to expand diff --git a/regamedll/dlls/game.cpp b/regamedll/dlls/game.cpp index 162fea26..d34fa558 100644 --- a/regamedll/dlls/game.cpp +++ b/regamedll/dlls/game.cpp @@ -172,6 +172,12 @@ void GameDLL_EndRound_f() CSGameRules()->OnRoundEnd_Intercept(WINSTATUS_DRAW, ROUND_END_DRAW, CSGameRules()->GetRoundRestartDelay()); } +void GameDLL_SwapTeams_f() +{ + CSGameRules()->SwapAllPlayers(); + CVAR_SET_FLOAT("sv_restartround", 1.0); +} + #endif // REGAMEDLL_ADD void EXT_FUNC GameDLLInit() @@ -298,6 +304,7 @@ void EXT_FUNC GameDLLInit() ADD_SERVER_COMMAND("game", GameDLL_Version_f); ADD_SERVER_COMMAND("endround", GameDLL_EndRound_f); + ADD_SERVER_COMMAND("mp_swapteams", GameDLL_SwapTeams_f); CVAR_REGISTER(&game_version); CVAR_REGISTER(&maxmoney);