ExtraCommands: add a restartround command.
This commit is contained in:
parent
e9ce02f2d4
commit
cd9d3667b9
@ -55,6 +55,7 @@ public void OnPluginStart()
|
||||
RegAdminCmd("sm_setdeaths", Command_SetDeaths, ADMFLAG_GENERIC, "sm_setdeaths <#userid|name> <value>");
|
||||
RegAdminCmd("sm_setmvp", Command_SetMvp, ADMFLAG_GENERIC, "sm_setmvp <#userid|name> <value>");
|
||||
RegAdminCmd("sm_setteamscore", Command_SetTeamScore, ADMFLAG_GENERIC, "sm_setteamscore <team> <value>");
|
||||
RegAdminCmd("sm_restartround", Command_RestartRound, ADMFLAG_GENERIC, "sm_restartround <delay>");
|
||||
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> <cvar> <value>");
|
||||
@ -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 <delay>");
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user