AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Custom Voice Channels (https://forums.alliedmods.net/showthread.php?t=159055)

nikhilgupta345 06-12-2011 12:19

Custom Voice Channels
 
6 Attachment(s)
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

drekes 06-12-2011 12:52

Re: Custom Voice Channels
 
Quote:

Originally Posted by nikhilgupta345 (Post 1486456)
Client Commands:
/channel - Opens Last Request Menu, only final living Terrorist can use it.

Last request in voice channel :3

nikhilgupta345 06-12-2011 14:04

Re: Custom Voice Channels
 
Copy + Paste fail :)

Fixed.

MAUGHOLD 06-12-2011 15:20

Re: Custom Voice Channels
 
Sweet nikhilgupta345: you're the man.

I will test it ASAP. I assume this will work for all Mods correct ?

ConnorMcLeod 06-12-2011 17:01

Re: Custom Voice Channels
 
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.

nikhilgupta345 06-12-2011 17:19

Re: Custom Voice Channels
 
@ConnorMcLeod: Fixed. Also added what you suggested. Thanks :)

Commented the code a little as well.

Xalus 06-12-2011 17:33

Re: Custom Voice Channels
 
Interesting plugin.

nnajko 06-12-2011 17:42

Re: Custom Voice Channels
 
Quote:

Originally Posted by Xalus (Post 1486729)
Interesting plugin.

yeah, seems great

fysiks 06-12-2011 17:46

Re: Custom Voice Channels
 
Quote:

Originally Posted by MAUGHOLD (Post 1486625)
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.

DeLiriuM 06-14-2011 04:50

Re: Custom Voice Channels
 
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.


All times are GMT -4. The time now is 10:19.

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