diff options
Diffstat (limited to 'sourcemod/scripting/gem_halftime_teamswap.sp')
| -rw-r--r-- | sourcemod/scripting/gem_halftime_teamswap.sp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sourcemod/scripting/gem_halftime_teamswap.sp b/sourcemod/scripting/gem_halftime_teamswap.sp index 5c5a50a..bed6959 100644 --- a/sourcemod/scripting/gem_halftime_teamswap.sp +++ b/sourcemod/scripting/gem_halftime_teamswap.sp @@ -68,6 +68,7 @@ public OnPluginStart(){ CreateConVar("sm_halftime_teamswitch_version", PLUGIN_VERSION, "Halftime teamswitch version", FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_REPLICATED|FCVAR_NOTIFY); HookEvent("round_start", Event_RoundStart); HookEvent("round_end", Event_RoundEnd); + HookEvent("restart_round_(1_second)", Event_RestartRound ); g_h_moneyReset = CreateConVar("sm_halftime_money_reset", "1", "If weapons should be removed and money reset to mp_startmoney"); g_h_mp_startmoney = FindConVar("mp_startmoney"); @@ -84,6 +85,17 @@ public OnPluginStart(){ } +public Event_RestartRound( Handle: event, const String:name[], bool dontBroadcast ) { + g_CtScore = 0; + g_TScore = 0; + + g_halftime_do_resetMoney = true; + g_roundCount = 0; + + SetTeamScore(CS_TEAM_CT, g_CtScore); + SetTeamScore(CS_TEAM_T, g_TScore); +} + // RoundStart gets the maptime // Checks to see if halftime has passed, if not then make sure halftime is 0 // Setting halftime false here as well since in some occasions when extending map |
