Raised This Month: $51 Target: $400
 12% 

Mute Alive Players


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
good_live
AlliedModders Donor
Join Date: Oct 2013
Old 04-09-2016 , 15:43   Mute Alive Players
Reply With Quote #1

Hey,

i want, that a client can't hear alive Players anymore:

Code:
public void MuteClient(int iClient)
{
	g_bMuted[iClient] = true;
	if(!IsClientValid(iClient))
		return;
	for (int i = 1; i < MaxClients; i++)
	{
		if(!IsClientValid(i))
			continue;
		if(!IsPlayerAlive(i))
			continue;
		SetListenOverride(iClient, i, Listen_No);
	}
}
But it's not working :/
Any hint what i'm doing wrong?

Thanks

Last edited by good_live; 04-09-2016 at 15:43.
good_live is offline
xines
Veteran Member
Join Date: Aug 2013
Location: Denmark
Old 04-09-2016 , 15:50   Re: Mute Alive Players
Reply With Quote #2

This:
PHP Code:
for (int i 1MaxClientsi++) 
Change to this:
PHP Code:
for (int i 1<= MaxClientsi++) 
__________________
xines is offline
good_live
AlliedModders Donor
Join Date: Oct 2013
Old 04-09-2016 , 16:02   Re: Mute Alive Players
Reply With Quote #3

Quote:
Originally Posted by xines View Post
This:
PHP Code:
for (int i 1MaxClientsi++) 
Change to this:
PHP Code:
for (int i 1<= MaxClientsi++) 
Hmm my fail there, but thats only affecting the last Client Index.
Main Problem is still unsolved.
good_live is offline
xines
Veteran Member
Join Date: Aug 2013
Location: Denmark
Old 04-09-2016 , 16:08   Re: Mute Alive Players
Reply With Quote #4

Could you post the full code then?
__________________
xines is offline
good_live
AlliedModders Donor
Join Date: Oct 2013
Old 04-09-2016 , 16:22   Re: Mute Alive Players
Reply With Quote #5

Nevermind it's another Plugin which is resetting the Override each secound.
Thanks for your help
good_live is offline
xines
Veteran Member
Join Date: Aug 2013
Location: Denmark
Old 04-09-2016 , 16:24   Re: Mute Alive Players
Reply With Quote #6

Quote:
Originally Posted by good_live View Post
Nevermind it's another Plugin which is resetting the Override each secound.
Thanks for your help
Explains alot, no problem
__________________
xines is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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