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

Custom Voice Channels


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Server Management        Approver:   Arkshine (91)
nikhilgupta345
Veteran Member
Join Date: Aug 2009
Location: Virginia
Old 06-12-2011 , 13:19   Custom Voice Channels
Reply With Quote #1

Description:
This is a Voice Channel plugin where you can create your own voice channels, and players can join them by typing /channel. They cannot hear anybody who is in a different channel than they are in, and they cannot talk to anybody that they are in a different channel than they are in.

They are auto-prompted for a channel when they enter the server.

A text file is provided with a list of default channels. You can change them by just changing the list of channels that you would like. People are defaulted to the first channel in the list.

Client Commands:
/channel - Opens channel menu.

CVars:
cvc_display_players <0/1> <default:1> - Display how many players are in each channel.
cvc_admin_voice <0/1> <default: 0> - If everybody hears when an admin speaks
cvc_display_on_connect <0/1> <default:0> - Whether or not to display the channels menu on connect.

Changelog:
Code:
June 12, 2011 - v1.0 - Plugin Release
June 14, 2011 - v1.1 - Added password-protected channels
June 17, 2011 - v1.2 - Added amount of players in each channel next to channel name
June 24, 2011 - v1.2.1 - Added CVar for whether everybody hears admin or not.
November 245, 2011 - v1.2.2 - Added CVar for whether channels menu should open on connect or not.
Credits:
nikhilgupta345 - Code
MAUGHOLD - Original Idea: http://forums.alliedmods.net/showthread.php?t=114172
ConnorMcLeod - Fixing file path. Also using trim and remove_quotes.
DeLiriuM - Suggestion for Password-Protected channels.
Fysiks: Small Optimizations
Xalus: Player amount display idea

Installation:
-Click on 'Get Plugin' below
-Place 'custom_voice_channels.amxx' into your plugins folder
-Download the channels.ini from below
-Place that file into your configs folder
-Customize as needed

channels.ini
Code:
"channel name" "channel password"
Leave 'channel password' blank to not have a password. If channel's have spaces in them, make sure to use quotes in the file.
Any Suggestions/Comments/Code Optimizations feel free to post below.

If you have another plugin that shows menu on join on DOD: http://forums.alliedmods.net/showpos...2&postcount=13
Attached Files
File Type: ini channels.ini (547 Bytes, 376 views)
File Type: sma Get Plugin or Get Source (custom_voice_channels.sma - 1022 views - 7.6 KB)
__________________
Quote:
Originally Posted by DarkGod View Post
nikhilgupta generates his plugins using sheer awesome.
If you like my work, please

Last edited by nikhilgupta345; 11-25-2011 at 23:13. Reason: Updated To Version 1.2.1
nikhilgupta345 is offline
Send a message via ICQ to nikhilgupta345 Send a message via Yahoo to nikhilgupta345
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 06-12-2011 , 13:52   Re: Custom Voice Channels
Reply With Quote #2

Quote:
Originally Posted by nikhilgupta345 View Post
Client Commands:
/channel - Opens Last Request Menu, only final living Terrorist can use it.
Last request in voice channel
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
nikhilgupta345
Veteran Member
Join Date: Aug 2009
Location: Virginia
Old 06-12-2011 , 15:04   Re: Custom Voice Channels
Reply With Quote #3

Copy + Paste fail

Fixed.
__________________
Quote:
Originally Posted by DarkGod View Post
nikhilgupta generates his plugins using sheer awesome.
If you like my work, please
nikhilgupta345 is offline
Send a message via ICQ to nikhilgupta345 Send a message via Yahoo to nikhilgupta345
MAUGHOLD
Veteran Member
Join Date: Nov 2004
Location: CA USA
Old 06-12-2011 , 16:20   Re: Custom Voice Channels
Reply With Quote #4

Sweet nikhilgupta345: you're the man.

I will test it ASAP. I assume this will work for all Mods correct ?
__________________
{FJ}Justice STEAM_0:0:633975 If anyone needs any help with their server, Just add me to steam friends and I'll help you out.
MAUGHOLD is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 06-12-2011 , 18:01   Re: Custom Voice Channels
Reply With Quote #5

Code:
    add( szFileName, charsmax( szFileName ), "\channels.ini" );
->
Code:
    add( szFileName, charsmax( szFileName ), "/channels.ini" );

In file parsing, empty lines or commented lines checks wouldn't hurt
Also, you may send trim and remove_quotes after having retrieved line content.
__________________
- tired and retired -
ConnorMcLeod is offline
nikhilgupta345
Veteran Member
Join Date: Aug 2009
Location: Virginia
Old 06-12-2011 , 18:19   Re: Custom Voice Channels
Reply With Quote #6

@ConnorMcLeod: Fixed. Also added what you suggested. Thanks

Commented the code a little as well.
__________________
Quote:
Originally Posted by DarkGod View Post
nikhilgupta generates his plugins using sheer awesome.
If you like my work, please
nikhilgupta345 is offline
Send a message via ICQ to nikhilgupta345 Send a message via Yahoo to nikhilgupta345
Xalus
Veteran Member
Join Date: Dec 2009
Location: Belgium
Old 06-12-2011 , 18:33   Re: Custom Voice Channels
Reply With Quote #7

Interesting plugin.
__________________
Retired.
Xalus is offline
nnajko
Senior Member
Join Date: May 2009
Location: Sweden
Old 06-12-2011 , 18:42   Re: Custom Voice Channels
Reply With Quote #8

Quote:
Originally Posted by Xalus View Post
Interesting plugin.
yeah, seems great
nnajko is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-12-2011 , 18:46   Re: Custom Voice Channels
Reply With Quote #9

Quote:
Originally Posted by MAUGHOLD View Post
I assume this will work for all Mods correct ?
There is no mod specific code so it should work on most HL1 mods. CS and DOD for sure.
__________________
fysiks is offline
Old 06-14-2011, 04:31
Shadymn
This message has been deleted by Exolent[jNr]. Reason: Random spam.
DeLiriuM
Senior Member
Join Date: Dec 2006
Old 06-14-2011 , 05:50   Re: Custom Voice Channels
Reply With Quote #10

Suggestion: Add an option, to put a password on the specific channel.

In channels.ini, after the name of the channel the password and in-game, after selecting the channel you want, to prompt a password.

Good job.
__________________
DeLiriuM is offline
Old 06-14-2011, 05:58
Shadymn
This message has been deleted by Exolent[jNr]. Reason: Random spam.
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 05:42.


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