mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2025-04-14 21:42:27 +03:00
Add new console command: mp_swapteams - Swap the teams and restart the game. (#430)
This commit is contained in:
parent
a9ba748eef
commit
35277804bf
@ -22,6 +22,13 @@ Archive's bin directory contains 2 subdirectories, 'bugfixed' and 'pure'
|
|||||||
<pre>ReGameDLL_CS also have beta version with latest changes from official version of Counter-Strike.</pre>
|
<pre>ReGameDLL_CS also have beta version with latest changes from official version of Counter-Strike.</pre>
|
||||||
* Enter `-beta` option at the command line HLDS.
|
* Enter `-beta` option at the command line HLDS.
|
||||||
|
|
||||||
|
## Commands
|
||||||
|
| Command | Description |
|
||||||
|
| :---------------------------------- | :---------------------------------------------- |
|
||||||
|
| game version | Will show GameDLL build version, date & URL. |
|
||||||
|
| endround | Args:<br/>`T` force round end with Terrorists win. <br/>`CT` force round end with Counter-Terrorists win. <br/> or terminate round draw when called without arguments. |
|
||||||
|
| mp_swapteams | Swap the teams and restart the game. |
|
||||||
|
|
||||||
## Configuration (cvars)
|
## Configuration (cvars)
|
||||||
<details>
|
<details>
|
||||||
<summary>Click to expand</summary>
|
<summary>Click to expand</summary>
|
||||||
|
@ -172,6 +172,12 @@ void GameDLL_EndRound_f()
|
|||||||
CSGameRules()->OnRoundEnd_Intercept(WINSTATUS_DRAW, ROUND_END_DRAW, CSGameRules()->GetRoundRestartDelay());
|
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
|
#endif // REGAMEDLL_ADD
|
||||||
|
|
||||||
void EXT_FUNC GameDLLInit()
|
void EXT_FUNC GameDLLInit()
|
||||||
@ -298,6 +304,7 @@ void EXT_FUNC GameDLLInit()
|
|||||||
|
|
||||||
ADD_SERVER_COMMAND("game", GameDLL_Version_f);
|
ADD_SERVER_COMMAND("game", GameDLL_Version_f);
|
||||||
ADD_SERVER_COMMAND("endround", GameDLL_EndRound_f);
|
ADD_SERVER_COMMAND("endround", GameDLL_EndRound_f);
|
||||||
|
ADD_SERVER_COMMAND("mp_swapteams", GameDLL_SwapTeams_f);
|
||||||
|
|
||||||
CVAR_REGISTER(&game_version);
|
CVAR_REGISTER(&game_version);
|
||||||
CVAR_REGISTER(&maxmoney);
|
CVAR_REGISTER(&maxmoney);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user