AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugin/Gameplay Ideas and Requests (https://forums.alliedmods.net/forumdisplay.php?f=60)
-   -   [CSGO]SourceBans check if player is muted (https://forums.alliedmods.net/showthread.php?t=331154)

Sajmooooon 03-08-2021 09:48

[CSGO]SourceBans check if player is muted
 
Hi is there any sourcepawn command for sourcebans to check if player is muted/gaged ?

Thanks.

azalty 03-08-2021 09:54

Re: [CSGO]SourceBans check if player is muted
 
Afaik there is no command BUT you can get muted/gaged players through the /admin menu

I think there was also sm_listbans and sm_listblocks but you have to enter a username/steamid I think

FAQU 03-09-2021 00:03

Re: [CSGO]SourceBans check if player is muted
 
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;



Sajmooooon 03-09-2021 03:27

Re: [CSGO]SourceBans check if player is muted
 
Thanks works great.


All times are GMT -4. The time now is 11:02.

Powered by vBulletin®
Copyright ©2000 - 2021, vBulletin Solutions, Inc.