View Single Post
FAQU
Member
Join Date: Sep 2020
Location: Romania
Old 03-09-2021 , 00:03   Re: [CSGO]SourceBans check if player is muted
Reply With Quote #3

I've no idea if this will work with sourcebans, but it might be worth giving it a try:

PHP Code:
#include <sourcemod>
#include <basecomm>

#pragma semicolon 1
#pragma newdecls required

public void OnPluginStart()
{
    
LoadTranslations("common.phrases");
    
RegConsoleCmd("sm_comms"Command_Comms"Shows a players communications status");
}

public 
Action Command_Comms(int clientint args)
{
    if (
args != 1)
    {
        
ReplyToCommand(client"[SM] Usage: sm_comms <name|userid>");
        return 
Plugin_Handled;
    }
    
    
char arg1[MAX_NAME_LENGTH];
    
GetCmdArg(1arg1sizeof(arg1));
    
    
int target FindTarget(clientarg1truefalse);
    if (
target == -1)
    {
        return 
Plugin_Handled;
    }
    
    
bool gag BaseComm_IsClientGagged(target);
    
bool mute BaseComm_IsClientMuted(target);
    
    
ReplyToCommand(clientgag "%N is gagged":"%N is ungagged"target);
    
ReplyToCommand(clientmute "%N is muted":"%N is unmuted"target);
    
    return 
Plugin_Handled;

__________________
FAQU is offline