diff --git a/ExtraCommands/scripting/ExtraCommands.sp b/ExtraCommands/scripting/ExtraCommands.sp index 4336e60c..3926fce5 100644 --- a/ExtraCommands/scripting/ExtraCommands.sp +++ b/ExtraCommands/scripting/ExtraCommands.sp @@ -55,6 +55,7 @@ public void OnPluginStart() RegAdminCmd("sm_setdeaths", Command_SetDeaths, ADMFLAG_GENERIC, "sm_setdeaths <#userid|name> "); RegAdminCmd("sm_setmvp", Command_SetMvp, ADMFLAG_GENERIC, "sm_setmvp <#userid|name> "); RegAdminCmd("sm_setteamscore", Command_SetTeamScore, ADMFLAG_GENERIC, "sm_setteamscore "); + RegAdminCmd("sm_restartround", Command_RestartRound, ADMFLAG_GENERIC, "sm_restartround "); RegAdminCmd("sm_waila", Command_WAILA, ADMFLAG_GENERIC); RegAdminCmd("sm_info", Command_WAILA, ADMFLAG_GENERIC); RegAdminCmd("sm_fcvar", Command_ForceCVar, ADMFLAG_CHEATS, "sm_fcvar <#userid|name> "); @@ -1087,6 +1088,27 @@ public Action Command_SetTeamScore(int client, int argc) return Plugin_Handled; } +public Action Command_RestartRound(int client, int argc) +{ + if(argc < 1) + { + ReplyToCommand(client, "[SM] Usage: sm_restartround "); + return Plugin_Handled; + } + + char sArgs[32]; + GetCmdArg(1, sArgs, sizeof(sArgs)); + + float fDelay = StringToFloat(sArgs); + + CS_TerminateRound(fDelay, CSRoundEnd_Draw, true); + + ShowActivity2(client, "\x01[SM] \x04", "\x01Restarted the round (%f seconds)", fDelay); + LogAction(client, -1, "\"%L\" restarted the round (%f seconds)", client, fDelay); + + return Plugin_Handled; +} + public Action Command_WAILA(int client, int argc) { if(!client)