Raised This Month: $59 Target: $400
 14% 

Microphone Restrictions 1.2


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Server Management        Approver:   v3x (159)
Jon
Veteran Member
Join Date: Dec 2007
Old 07-02-2008 , 18:15   Microphone Restrictions 1.2
Reply With Quote #1

Microphone Restrictions

Purpose:

Ever felt pissed when 10 players use their microphone at the same time? When this plugin is activated only a certain amount of players can use microphone at the same time, using a client command first to activate his/her microphone for use. This is a great plugin when someone wants to play music using HLSS or similar. You can also switch on admin only mode, then only admins can use their microphone (without the use of /mic).


Cvars:

mic_enabled 1

- 0 disables the plugin, 1 enables it.
mic_max 5
- Sets maximum amount of players that can use their mic at the same time.
mic_adminonly 0
- 0 disables admin only, 1 enables it.
mic_banplayer <player>
- Bans seperate players from using their microphone.
mic_time 60
- How long players get to use their microphone each time in seconds.
mic_delay 120
- How long players have to wait before they can use their microphone again.
mic_autocvars 1
- If set to 1, plugin automatically changes server cvars for better voicequality.


Client Commands:

/mic
- Activate microphone


Notes:

The voiceicon will still be visible when players attempt to use their microphone without using /mic command first, but the other players can't hear them.

Quote:
1.1 - 1.2
Rewrote the whole plugin and made it much more simple
Added mic_max cvar
Attached Files
File Type: sma Get Plugin or Get Source (micrest.sma - 3026 views - 3.7 KB)

Last edited by Jon; 07-17-2008 at 17:26. Reason: I like blue
Jon is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 07-02-2008 , 18:30   Re: Microphone Restrictions 1.0
Reply With Quote #2

Quote:
Originally Posted by Jon View Post
Notes:
I didn't find any more efficent way to do this, if there is one, please tell me.

PHP Code:
public plugin_init()
{
    
register_forward(FM_Voice_SetClientListening"fwdSetVoice"0);
}

public 
fwdSetVoice(receiversender)
{
    if( !
is_user_connected(receiver)
    || !
is_user_connected(sender)
    || 
receiver == sender )
    {
        return 
FMRES_IGNORED;
    }
    
    if( 
/* sender cannot talk */ )
    {
        
engfunc(EngFunc_SetClientListeningreceiversender0);
        return 
FMRES_SUPERCEDE;
    }
    
    return 
FMRES_IGNORED;

__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Old 07-03-2008, 07:40
Jon
This message has been deleted by Jon. Reason: need to test it again
Jon
Veteran Member
Join Date: Dec 2007
Old 07-03-2008 , 11:01   Re: Microphone Restrictions 1.0
Reply With Quote #3

Thanks, updated
Jon is offline
AntiBots
Veteran Member
Join Date: May 2008
Location: La Plata, Bs As, Argenti
Old 07-03-2008 , 13:36   Re: Microphone Restrictions 1.0
Reply With Quote #4

Good Idea. Now I test.
__________________

Last edited by AntiBots; 07-06-2008 at 02:23.
AntiBots is offline
Send a message via ICQ to AntiBots Send a message via MSN to AntiBots Send a message via Skype™ to AntiBots
bmann_420
AMX_Super Pooper
Join Date: Jan 2005
Location: [SuperCentral.co]
Old 07-04-2008 , 00:48   Re: Microphone Restrictions 1.1
Reply With Quote #5

I might put the default cvars in the post (just so we all know)

Looks good
__________________
bmann_420 is offline
Zenith77
Veteran Member
Join Date: Aug 2005
Old 07-05-2008 , 15:37   Re: Microphone Restrictions 1.1
Reply With Quote #6

You should make a cvar so server administrators can change how many people they want to be able to speak at a time, not just hardcode it to one.
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
Stixsmaster
Veteran Member
Join Date: May 2007
Location: I am all around you...I
Old 07-06-2008 , 19:03   Re: Microphone Restrictions 1.1
Reply With Quote #7

anyway to edit this so this also restricts normal users from being able to use a mic and makes it so only admins may use mics?

---Stixsmaster
__________________
Stixsmaster is offline
Send a message via AIM to Stixsmaster Send a message via MSN to Stixsmaster
Jon
Veteran Member
Join Date: Dec 2007
Old 07-06-2008 , 19:15   Re: Microphone Restrictions 1.1
Reply With Quote #8

Quote:
Originally Posted by Zenith77 View Post
You should make a cvar so server administrators can change how many people they want to be able to speak at a time, not just hardcode it to one.
Agreed. I will.

Quote:
Originally Posted by Stixsmaster View Post
anyway to edit this so this also restricts normal users from being able to use a mic and makes it so only admins may use mics?

---Stixsmaster
mic_adminmode 1
Jon is offline
Jon
Veteran Member
Join Date: Dec 2007
Old 07-16-2008 , 17:03   Re: Microphone Restrictions 1.2
Reply With Quote #9

Updated, check main post.
Jon is offline
grimvh2
Veteran Member
Join Date: Nov 2007
Location: Fishdot Nation
Old 07-17-2008 , 11:38   Re: Microphone Restrictions 1.2
Reply With Quote #10

Nice , I like this
__________________
I am out of order!
grimvh2 is offline
Reply


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 15:50.


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