AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   Removing clientside mutes against admins (https://forums.alliedmods.net/showthread.php?t=317523)

Joeakuaku 07-18-2019 01:09

Removing clientside mutes against admins
 
So I'm trying to hack something together that's able to remove clientside mutes towards admins, in case they need to communicate to everyone - but I've had little luck getting it working as a novice to this.

Code:

public Action unmuteMeV(client, args) {

        char attArg[65];
        GetCmdArg(1, attArg, sizeof(attArg));
       
        int target = FindTarget(client, attArg, false, false);
       
        PrintToChat(client, "[DEBUG] GetListenOverride(%N, %N): %d", target, client, GetListenOverride(target, client));
        SetListenOverride(target, client, Listen_Yes);
        SetClientListening(target, client, true);
        PrintToChat(client, "[DEBUG] GetListenOverride(%N, %N): %d", target, client, GetListenOverride(target, client));
        PrintToChat(client, "[SM] You can now be heard by %N", target);
       
        return Plugin_Handled;

}

That's the main function I'm using - but GetListenOveride always ends up reporting 1, whereas 2 is the correct number, I believe, for unmuted.

Ideally I'd have it loop through every player and have them unmute the issuing admin, but right now I'm just trying to get it working at all.

Depicted is me running a mute-check, attempting to unmute "cringe patrol", then checking again.
https://i.imgur.com/FuDAKbv.png

Neuro Toxin 07-18-2019 03:58

Re: Removing clientside mutes against admins
 
I doubt you can. I would say its done client side which you cant "hack".

Joeakuaku 07-18-2019 13:57

Re: Removing clientside mutes against admins
 
Quote:

Originally Posted by Neuro Toxin (Post 2659580)
I doubt you can. I would say its done client side which you cant "hack".

My reason for suspecting it is possible is the existence of this plugin which alleges to be able to enact clientside mutes. There are also plugins that are able to list the players who have enacted them against you.

Neuro Toxin 07-18-2019 17:04

Re: Removing clientside mutes against admins
 
The selfmute doesnt allege to change client side mutes, it simply replaces them as apparently having less steps.

Mutecheck, after checking the API can only get the mute status between two players.

I stick to my original reply.

Fyren 07-23-2019 13:10

Re: Removing clientside mutes against admins
 
Quote:

Originally Posted by Joeakuaku (Post 2659569)
Code:

        SetListenOverride(target, client, Listen_Yes);
        SetClientListening(target, client, true);


There is a reason that the documentation says GetClientListening and SetClientListening are deprecated. Without testing, your code may just work if you remove the SetClientListening call.


All times are GMT -4. The time now is 14:41.

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