SelfMute: add sm_debugtorch
just for fun and statistics, probably will remove it at some point again
This commit is contained in:
parent
ca7fec3bcf
commit
0e0c5903f9
@ -67,6 +67,7 @@ public void OnPluginStart()
|
||||
RegConsoleCmd("sm_sm", Command_SelfMute, "Mute player by typing !sm [playername]");
|
||||
RegConsoleCmd("sm_su", Command_SelfUnMute, "Unmute player by typing !su [playername]");
|
||||
RegConsoleCmd("sm_cm", Command_CheckMutes, "Check who you have self-muted");
|
||||
RegAdminCmd("sm_debugtorch", Command_CheckPermaTorchMutes, ADMFLAG_GENERIC, "Check who has permanently self-muted Torch");
|
||||
|
||||
HookEvent("round_start", Event_Round);
|
||||
HookEvent("round_end", Event_Round);
|
||||
@ -468,6 +469,31 @@ void UnExempt(int client, int target)
|
||||
/*
|
||||
* CHAT COMMANDS
|
||||
*/
|
||||
|
||||
public Action Command_CheckPermaTorchMutes(int client, int args)
|
||||
{
|
||||
int iTorchPermMuted;
|
||||
int iPlayers;
|
||||
char sBuffer[2];
|
||||
|
||||
for(int i = 1; i <= MaxClients; i++)
|
||||
{
|
||||
if(!IsClientInGame(i) || IsFakeClient(i))
|
||||
continue;
|
||||
|
||||
GetClientCookie(i, g_hCookieTorchMuted, sBuffer, sizeof(sBuffer));
|
||||
|
||||
if(sBuffer[0] != '\0')
|
||||
iTorchPermMuted++;
|
||||
|
||||
iPlayers++;
|
||||
}
|
||||
|
||||
ReplyToCommand(client, "[SM] There are currently %d out of %d Players who've got Torch permanently self-muted.", iTorchPermMuted, iPlayers);
|
||||
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
public Action Command_SelfMute(int client, int args)
|
||||
{
|
||||
if(client == 0)
|
||||
|
Loading…
Reference in New Issue
Block a user