Raised This Month: $32 Target: $400
 8% 

[EXTENSION] Voice Management


Post New Thread Closed Thread   
 
Thread Tools Display Modes
Author Message
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 07-11-2007 , 15:03   [EXTENSION] Voice Management
#1

This extension allow you to control who can use the voice aka mic in the server.

Install:
Upload the addons folder to your mods root directory.

Natives:
Code:
#define SPEAK_NORMAL           0 #define SPEAK_MUTED            1 #define SPEAK_ALL              2 #define SPEAK_LISTENALL        4 /**  * Set the client listening flags.  *  * @param client        Player index  * @param iSpeakFlags   The speak flag mode. Use the SPEAK_* defines  * @noreturn  */ native SetClientListeningFlags(client, iSpeakFlags); /**  * Retrieve the client current listening flags.  *  * @param client        Player index  * @return      The speak flags.  */ native GetClientListeningFlags(client); /**  * Set the receiver ability to listen to the sender.  *  * @param iReceiver  The listener index.  * @param iSender      The sender index.  * @return      True if sucessful otherwise false.  */ native bool:SetClientListening(iReceiver, iSender, bool:bListen); /**  * Retrieves of the receiver can listen to the sender.  *  * @param iReceiver  The listener index.  * @param iSender      The sender index.  * @return      True if sucessful otherwise false.  */ native bool:GetClientListening(iReceiver, iSender);

Example:
Code:
#include <sourcemod> #include <voicemanagement> public OnPluginStart() {     RegConsoleCmd("mute", CmdRun); } public Action:CmdRun(client, args) {     if(client)     {         SetClientListeningFlags(client, SPEAK_MUTED);         PrintToConsole(client, "You have muted yourself");     } else {         PrintToServer("You must be in game to use this option");     }     return Plugin_Handled; }

Credit:
  • ^BuGs^ - For helping me test it.
    AMX Mod X - base on the set/get_speak

Source Code

Click here to download
__________________
No private support via Instant Message
GunGame:SM Released
teame06 is offline
Send a message via AIM to teame06
Zenith77
Veteran Member
Join Date: Aug 2005
Old 07-11-2007 , 15:06   Re: [EXTENSION] Voice Management
#2

Good job.


p.s. pants
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
ferret
SourceMod Developer
Join Date: Dec 2004
Location: Atlanta, GA
Old 07-11-2007 , 15:14   Re: [EXTENSION] Voice Management
#3

Well, I wanted to wait for SDKTools version, but I'll use it

I'll release my Deadtalk and gag/mute plugins tonight. I wrote them a week ago, but didn't have the voice stuff. I'll test them tonight then release.
__________________
I'm a blast from the past!
ferret is offline
ferret
SourceMod Developer
Join Date: Dec 2004
Location: Atlanta, GA
Old 07-12-2007 , 09:24   Re: [EXTENSION] Voice Management
#4

Does SPEAK_NORMAL obey sv_alltalk?

edit: nm, dumb.
__________________
I'm a blast from the past!

Last edited by ferret; 07-12-2007 at 09:49.
ferret is offline
ferret
SourceMod Developer
Join Date: Dec 2004
Location: Atlanta, GA
Old 07-12-2007 , 09:46   Re: [EXTENSION] Voice Management
#5

Shouldn't:

Code:
	if((g_players[iSender].iSpeakFlags & SPEAK_LISTENALL) != 0)
	{
		RETURN_META_VALUE_NEWPARAMS(MRES_IGNORED, bListen, &IVoiceServer::SetClientListening, (iReceiver, iSender, true));
	}
be:

Code:
	if((g_players[iReceiver].iSpeakFlags & SPEAK_LISTENALL) != 0)
	{
		RETURN_META_VALUE_NEWPARAMS(MRES_IGNORED, bListen, &IVoiceServer::SetClientListening, (iReceiver, iSender, true));
	}
__________________
I'm a blast from the past!
ferret is offline
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 07-12-2007 , 12:32   Re: [EXTENSION] Voice Management
#6

Thanks.

Uploaded a new a new compiled version.
__________________
No private support via Instant Message
GunGame:SM Released
teame06 is offline
Send a message via AIM to teame06
krod
Member
Join Date: Oct 2006
Old 07-17-2007 , 17:29   Re: [EXTENSION] Voice Management
#7

Thanks, works great!
krod is offline
krod
Member
Join Date: Oct 2006
Old 07-20-2007 , 11:03   Re: [EXTENSION] Voice Management
#8

Is it possible to detect when someone is using the mic?

Like an event being triggered?
__________________

krod is offline
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 07-20-2007 , 12:38   Re: [EXTENSION] Voice Management
#9

Quote:
Originally Posted by krod View Post
Is it possible to detect when someone is using the mic?

Like an event being triggered?
I'll see if I can research and look in the hl2sdk, but if they did it like how they did it in HL1. Then no you can't catch it.
__________________
No private support via Instant Message
GunGame:SM Released
teame06 is offline
Send a message via AIM to teame06
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 08-01-2007 , 00:39   Re: [EXTENSION] Voice Management
#10

This is extension is now deprecated, since it is included sdktools rev 1242.
__________________
No private support via Instant Message
GunGame:SM Released
teame06 is offline
Send a message via AIM to teame06
Closed Thread


Thread Tools
Display Modes

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 03:59.


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