View Single Post
Author Message
Joeakuaku
Junior Member
Join Date: Sep 2013
Old 07-18-2019 , 01:09   Removing clientside mutes against admins
Reply With Quote #1

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.
Joeakuaku is offline