From 24e4648b161a478fbbb1491cc183ac8948cf4b4a Mon Sep 17 00:00:00 2001 From: dogan Date: Mon, 3 Aug 2020 15:30:08 +0200 Subject: [PATCH] ExtraCommands: oops --- ExtraCommands/scripting/ExtraCommands.sp | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/ExtraCommands/scripting/ExtraCommands.sp b/ExtraCommands/scripting/ExtraCommands.sp index b28ef915..c98a1a7e 100644 --- a/ExtraCommands/scripting/ExtraCommands.sp +++ b/ExtraCommands/scripting/ExtraCommands.sp @@ -1138,9 +1138,7 @@ public Action Command_RestartRound(int client, int argc) } else if(argc < 1 && !g_CVar_sv_restartround.BoolValue) { - int iScoreZombies = GetTeamScore(CS_TEAM_T); - - CreateTimer(3.0, RoundRestartSlay, iScoreZombies); + CreateTimer(3.0, RoundRestartSlay); ShowActivity2(client, "\x01[SM] \x04", "\x01Restarted the round (3.0 seconds)"); LogAction(client, -1, "\"%L\" restarted the round (3.0 seconds)", client); return Plugin_Handled; @@ -1154,11 +1152,7 @@ public Action Command_RestartRound(int client, int argc) if(g_CVar_sv_restartround.BoolValue) CS_TerminateRound(fDelay, CSRoundEnd_Draw, true); else - { - int iScoreZombies = GetTeamScore(CS_TEAM_T); - - CreateTimer(fDelay, RoundRestartSlay, iScoreZombies); - } + CreateTimer(fDelay, RoundRestartSlay); ShowActivity2(client, "\x01[SM] \x04", "\x01Restarted the round (%f seconds)", fDelay); LogAction(client, -1, "\"%L\" restarted the round (%f seconds)", client, fDelay); @@ -1166,7 +1160,7 @@ public Action Command_RestartRound(int client, int argc) return Plugin_Handled; } -public Action RoundRestartSlay(Handle timer, int iScoreZombies) +public Action RoundRestartSlay(Handle timer) { int iHumanCount; @@ -1185,14 +1179,14 @@ public Action RoundRestartSlay(Handle timer, int iScoreZombies) return Plugin_Handled; } - RequestFrame(RequestFrameCallback, iScoreZombies); + RequestFrame(RequestFrameCallback); return Plugin_Handled; } -public void RequestFrameCallback(int iScoreZombies) +public void RequestFrameCallback() { - SetTeamScore(CS_TEAM_T, iScoreZombies); + SetTeamScore(CS_TEAM_T, CS_GetTeamScore(CS_TEAM_T) - 1); } stock void WAILA(int client, int iEntity)