Raised This Month: $12 Target: $400
 3% 

[L4D] Plugin Voter


Post New Thread Reply   
 
Thread Tools Display Modes
Author
InspectorSpacetime
New Member
Join Date: Apr 2012
Plugin ID:
2869
Plugin Version:
1.2.0.0
Plugin Category:
General Purpose
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Plugin for allowing players to vote other plugins on or off
    Old 04-03-2012 , 23:32   [L4D] Plugin Voter
    Reply With Quote #1

    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:
    Click image for larger version

Name:	iniitial.jpg
Views:	3897
Size:	91.2 KB
ID:	101673

    Confirm Menu:
    Click image for larger version

Name:	confirm.jpg
Views:	1976
Size:	32.9 KB
ID:	101675

    Vote:
    Click image for larger version

Name:	vote.jpg
Views:	1606
Size:	23.6 KB
ID:	101674

    Menu changed to reflect plugin's state:
    Click image for larger version

Name:	result.jpg
Views:	2350
Size:	83.1 KB
ID:	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
    Attached Files
    File Type: sp Get Plugin or Get Source (PluginVoter.sp - 2451 views - 12.2 KB)

    Last edited by InspectorSpacetime; 04-06-2012 at 11:29.
    InspectorSpacetime is offline
    bluebrain
    Junior Member
    Join Date: Dec 2011
    Old 04-10-2012 , 17:32   Re: [L4D] Plugin Voter
    Reply With Quote #2

    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

    Last edited by bluebrain; 04-10-2012 at 17:32.
    bluebrain is offline
    95trane
    Member
    Join Date: Feb 2010
    Old 05-12-2012 , 02:06   Re: [L4D] Plugin Voter
    Reply With Quote #3

    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
    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
    95trane is offline
    The 5th Survivor
    Senior Member
    Join Date: Mar 2012
    Old 07-24-2012 , 10:35   Re: [L4D] Plugin Voter
    Reply With Quote #4

    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


    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


    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.

    Last edited by The 5th Survivor; 07-26-2012 at 12:57.
    The 5th Survivor is offline
    AIDSViruZ
    New Member
    Join Date: Apr 2012
    Old 07-30-2012 , 01:04   Re: [L4D] Plugin Voter
    Reply With Quote #5

    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.
    AIDSViruZ is offline
    trollhater
    Member
    Join Date: Jul 2011
    Old 08-02-2012 , 13:39   Re: [L4D] Plugin Voter
    Reply With Quote #6

    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.
    trollhater is offline
    The 5th Survivor
    Senior Member
    Join Date: Mar 2012
    Old 08-18-2012 , 21:59   Re: [L4D] Plugin Voter
    Reply With Quote #7

    Quote:
    Originally Posted by trollhater View Post
    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?
    The 5th Survivor is offline
    TGMasterVN
    Member
    Join Date: May 2014
    Location: Earth
    Old 12-26-2015 , 10:07   Re: [L4D] Plugin Voter
    Reply With Quote #8

    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.
    TGMasterVN is offline
    Dakar200
    Junior Member
    Join Date: Mar 2018
    Old 03-19-2018 , 20:14   Re: [L4D] Plugin Voter
    Reply With Quote #9

    Quote:
    Originally Posted by TGMasterVN View Post
    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 ?
    Dakar200 is offline
    TiTz
    Member
    Join Date: Jan 2020
    Old 03-30-2020 , 06:54   Re: [L4D] Plugin Voter
    Reply With Quote #10

    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
    TiTz 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 03:04.


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