AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [L4D] Plugin Voter (https://forums.alliedmods.net/showthread.php?t=181927)

InspectorSpacetime 04-03-2012 23:32

[L4D] Plugin Voter
 
5 Attachment(s)
Description
This plugin allows players on the server to vote other plugins on or off. This makes it so if players are annoyed because of say "Smoker'n Walk" plugin they can vote to turn it off.

The plugin also allows for disabling plugins (listed in plugins_default_disabled) off the bat so that they are not started by default when server restarts or on campaign change ( depending on the plugins_reset_after_campaign cvar ).

When calling up the menu using "!votemods", the user will get a menu naming each plugin that is listed in "plugins_used_filter" along with its current state (On or Off )

After choosing a plugin the user gets a confirmation menu asking if they are sure they want to start a vote to turn On, or Off a plugin.

A vote is then called (if one is not already in progress), if it passes the plugin is turned on or off, if it fails or ties it remains in whatever state it was in.

The plugins stay turned on/off between rounds and reset on campaign switch (if proper cvar is set)

Initial Menu:
Attachment 101673

Confirm Menu:
Attachment 101675

Vote:
Attachment 101674

Menu changed to reflect plugin's state:
Attachment 101676
CVAR/Command list
plugins_default_disabled : A list of filenames of the plugins (including extension) separated by "|" (SHIFT+\). The plugins listed here will be disabled whenever server is restarted. (A future CVAR plugins_reset_after_campaign is planed for when say changing campaign from deadair to no mercy the plugins get reset and this is used again to disable any listed) (MAX 30 plugins, MAX Filename size: 256 )
EXAMPLE:L4DPointsandGift.smx|l4d_brutal_hunte r_mod1.5.2.smx|l4d_zcs.smx
plugins_used_filter : A list of filenames of the plugins (again including extension) separated by "|" (SHIFT+\). The plugins listed here will be the ones that the players will be able to vote on or off. (MAX 30 plugins, MAX Filename size: 256 )
EXAMPLE:L4DPointsandGift.smx|l4d_brutal_hunte r_mod1.5.2.smx|l4d_zcs.smx

plugins_reset_after_campaign
: possible Values: 1, 0. Value of 1 will make the plugins reload on campaign change, and the ones listed in plugins_default_disabled will be disabled automatically. 0 will make it so when changing between campaigns the plugins remain as they were during last campaign.

!votemods (in chat),
votemods (in console) : A player issuing this command will get a menu listing the plugins that match the filenames provided in plugins_used_filter. That user can choose which plugin they want to vote on/off (if a vote is currently under way it will tell them it is denied because a vote is already in progress ). After that everyone in the server will be asked to vote the plugin on or off, if On vote wins the plugin is turned on, if Off vote wins plugin is turned off, if TIE then plugin's state is not changed.

BUGS
v1.0.0.0
  1. Plugins reset on map/campaign change due to OnConfigsExecuted being called every time map is changed. (fixed in 1.1.0.0)
CHANGELOG
2012-04-03 (v1.0.0.0)
* Initial release.

2012-04-04 (v1.1.0.0)
*Memory improvement: Instead of assuming filenames could be up to 256 characters brought it down to 64, even that is considerable for a filename. This lessens the memory need of some of the string buffers.

*Introduced the plugins_reset_after_campaign cvar, and on campaign change plugin reset.

2012-04-06 (v1.2.0.0)
Improved Menu System

Added Plugin's Status Next To Its Name On Menu.
Changed the way the vote works. If plugin is currently ON it will ask the person starting the vote to confirm that they want start a vote to turn it OFF, and vise versa.
PLANS
None.

NOTE
If you would like this to work on other sourcemod games besides L4D,
  1. Get The Source
  2. Change the function "CheckNewCampaign", to detect new campaigns correctly for that game. function should return bool true on a new campaign, bool false otherwise.
  3. Or just disable the new campaign check altogether (this will make it so plugins are not reset between campaigns);
  4. Compile :-P

bluebrain 04-10-2012 17:32

Re: [L4D] Plugin Voter
 
3 things to say:
-this is something absolutely good, so thanks you.
-it says that some plugins are off, and some plugins are on when I start playing (L4D2) NOT according to cvars.
-it says this plugins is off but plugins is still active.
-one plugin(zcs) was on (and also active) but making his off does not make it not active.

PS: the most first one does not count due to last three :)

95trane 05-12-2012 02:06

Re: [L4D] Plugin Voter
 
This seems like a really good idea, especially for those who base their server on its players(such as myself; but I must ask: Is there any way to bundle the mods together into a "package" and voting whether you want to enable or disable the plugin packages. Like for example, I have 3 servers: Tank rush, my "Fun" server, and a "Realistic" server, and swap between each one very often. At times, those I play with want to play on a specific server, and I would have to go into my plugins folder and change the mods to ones that fit their demands and again when they want to play on another one of my servers. I find this to be a bit of an inconvenience so I think this mod will greatly benefit people such as myself if provided with the "Packaging / Bundling" mods thing :P
It's looking good so far, but for someone who has 20-40 mods total, this may not be as useful. Maybe add an option to bundle certain plugins together(not sure if this is even possible, but it can't hurt to look into it) and having it appear as one choice(a bundle / package) in the menu to choose whether you want to enable to disable; or in my case, "Which server do you guys want to play on?" For others who run multiple servers, I think they would also find this to be beneficial; if not then so be it, it can't hurt to see if you could incorporate something like this :)

The 5th Survivor 07-24-2012 10:35

Re: [L4D] Plugin Voter
 
Thanks a bunch for this InspectorSPaceTime. I've been on a few servers that something very similar to this but couldn't find any public plugin that did it until I found yours :fox:


Tried it out with a few plugins and it seems to be working perfectly. :) BTW, do you think it would be possible to implement an option to vote on specific cvars with a specific value for each plugin? For example, with this plugin, you would specify in your plugin to allow voting on:

l4d_infectedhp_tank
l4d_infectedhp_boomer
l4d_infectedhp_hunter
l4d_infectedhp_smoker

and have a choice with values for each cvar. Those same servers that I mentioned that had a similar "plugin voter" have this as an option. I hope you can incorporate this because I don't see any other public plugin like yours.


Also, you may want to consider adding support for the graphical voting event system, like the one mention here.

Thanks again :up:


EDIT: Is there a way to custom sort how the plugins appear on the menu? I put them in order but they appear in a completely different order in the menu. I even tried editing the name in the source of each plugin but they still come up as a random order.

AIDSViruZ 07-30-2012 01:04

Re: [L4D] Plugin Voter
 
Hello I am pretty new to the L4D2 plugin scene but i wanted to ask if I could use your plugin and may edit it that admins can use it to view/enable/disable plugins. Would release it as a new plugin probably called plugin manager as seen in CS:S because i haven't found it in that way for L4D2.

trollhater 08-02-2012 13:39

Re: [L4D] Plugin Voter
 
There already is a plugin manager with the name "plugin manager". Works in L4D2 as well. Doesnt just unload plugins, unloads them to the disabled folder and loads them back form there. Has a reload option too. Integrated in to the SM admin menu too.

The 5th Survivor 08-18-2012 21:59

Re: [L4D] Plugin Voter
 
Quote:

Originally Posted by trollhater (Post 1763271)
There already is a plugin manager with the name "plugin manager". Works in L4D2 as well. Doesnt just unload plugins, unloads them to the disabled folder and loads them back form there. Has a reload option too. Integrated in to the SM admin menu too.

Just so that people don't get confused here, from what I read, Plugin Manager is only for admins. Plugin Voter on the other hand is for all players, so the are not quite the same and therefore each have a separate purpose.


Also, after playing around a bit more with this plugin, as bluebrain stated, some plugins will be listed as "currently off" even though they are actually ON. I had 5 plugins in the list and it stated that 2 of them were off when they weren't. Any ideas why?

TGMasterVN 12-26-2015 10:07

Re: [L4D] Plugin Voter
 
I'm using SourceMod v1.7.3-dev+5280 for Linux
This plugin works without errors (mean loaded successfully) but when I type !votemods or votemods in console, the menu doesn't show.

Dakar200 03-19-2018 20:14

Re: [L4D] Plugin Voter
 
Quote:

Originally Posted by TGMasterVN (Post 2376433)
I'm using SourceMod v1.7.3-dev+5280 for Linux
This plugin works without errors (mean loaded successfully) but when I type !votemods or votemods in console, the menu doesn't show.

me too :|?

TiTz 03-30-2020 06:54

Re: [L4D] Plugin Voter
 
Hi,
Would it be possible to add a cvar so you can set an admin level to use the votemods plugin ?
As I do not wish public to mess with this.

Regards

TiTz


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

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