diff options
| author | navewindre <nw@moneybot.cc> | 2023-11-13 14:39:12 +0100 |
|---|---|---|
| committer | navewindre <nw@moneybot.cc> | 2023-11-13 14:39:12 +0100 |
| commit | c10e77724861c9fefc6d3ea0846751ff4f9dcb98 (patch) | |
| tree | 7688ba9640dc5f0918b9eed01350e891ef607787 /sourcemod/scripting/gem_halftime_teamswap.sp | |
| parent | da518fdc0f32839730ccdee8098b59c6f842d93f (diff) | |
reset score on mp_restartgame 1
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 |
