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

Custom Votes Redux (v1.7 - 4/13/14)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
ReFlexPoison
☠☠☠
Join Date: Jul 2011
Location: United States
Plugin ID:
4088
Plugin Version:
1.9
Plugin Category:
General Purpose
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    164 
    Plugin Description:
    Allows server owners to creates dynamic votes accessible by players that run specified commands when passed.
    Old 02-08-2014 , 19:34   Custom Votes Redux (v1.7 - 4/13/14)
    Reply With Quote #1

    Custom Votes Redux

    Summary

    Allows server owners to creates dynamic votes accessible by players that run specified commands when passed.
    Remake of https://forums.alliedmods.net/showthread.php?t=72216

    Features
    • Anti Vote Evasion - Tired of griefers and hackers evading votes by disconnecting and reconnecting while voting is underway? Custom Votes now makes it hard for those scoundrels to get away with it.
    • Admin Immunity- Admins can be excluded from votes by configurable immunity levels.
    • Fully Configurable Votes - Now offers a fully configurable configuration file for creating and editing players, map, and option votes. (Will supply full list later)

    Commands
    • sm_votemenu - Opens the vote menu
    • sm_customvotes_reload - Reloads the configuration file (Clears all votes)

    How To Use

    This plugin allows for creating votes for about anything. At the moment, the plugin has three base types of votes:
    • players - Vote selections are populated with the current online players of the server
    • map - Vote selections are populated with the maps from a specific map list from maplists.cfg
    • list - Vote selections are populated with custom options designated by the configuration

    Creating Votes


    Installation
    • customvotes-redux.smx to plugins
    • customvotes.phrases.txt to translations
    • customvotes.cfg to configs

    Overrides
    • customvotes_cooldown - Immunity to vote cool-downs
    • customvotes_maxvotes - Immunity to maximum votes allowed

    Versions
    • Version 1.8 - 7/21/15
      • Updated to use GetClientAuthId
      • Added version that uses NativeVotes
    • Version 1.7 - 6/12/14
      • Fixed issues where commands were not executing (ex: sm_kick <player>)
      • Fixed config errors
    • Version 1.7 - 6/12/14
      • Fixed simple votes not being executed by chat triggers
      • Added override for vote cool-downs. Use customvotes_cooldown in the admin_overrides.cfg to change the default flag b to grant immunity to specific players.
      • Added override for maximum votes allowed. Use customvotes_maxvotes in the admin_overrides.cfg to change the default flag b to grant immunity to specific players.
    • Version 1.6 - 4/21/14
      • Fixed issue where {TARGET_STEAMID} wouldn't return a string
    • Version 1.5 - 4/13/14
      • Fixed array index out of bounds errors
    • Version 1.4 - 3/13/14
      • Fixed invalid client errors
      • Added fix for clients who disconnect before they get voted on
    • Version 1.3 - 3/1/14
      • Added ability to start votes rather than having player manually choose selections
      • Added On/Off on/off formatting for control variable votes
      • Added Yes/No yes/no formatting for vote casts
      • Added simple votes which don't require vote selections
      • Added chat notifications for when a vote starts, is cast upon, passes, or fails
      • Added {VOTER_STEAMID} and {TARGET_STEAMID} to vote formatting
      • Removed bots from ratio calculations
    • Version 1.2 - 2/20/14
      • Fixed improper votes being reset upon client connect and disconnects
      • Fixed array index out of bounds errors
      • Fixed bug where votes would have the required votes to pass but don't trigger
      • Fixed exploit where opening a vote with chat triggers would ignore delay and override configuration protocols
      • Fixed chat triggers not being executed when a ! or / is found
      • Changed max maps to 128
      • Changed max votes to 32
      • Added excluding bots from players type votes
      • Added restricting players type votes to team member selections
    • Version 1.1 - 2/16/14
      • Added players, maps, and list votes
      • Now remembers players who were voted upon who disconnect and reconnect (Anti vote evasion)
      • Added several new options to the configuration file (See example config included in download)
    • Version 1.0 - 2/8/14
      • Initial Release

    My Plugins
    intox Gaming
    Attached Files
    File Type: txt customvotes.phrases.txt (798 Bytes, 2020 views)
    File Type: cfg customvotes.cfg (7.3 KB, 2375 views)
    File Type: sp Get Plugin or Get Source (customvotes.sp - 1023 views - 69.7 KB)
    File Type: sp Get Plugin or Get Source (customvotes-nativevotes.sp - 487 views - 69.4 KB)
    File Type: smx customvotes.smx (53.0 KB, 1209 views)
    File Type: smx customvotes-nativevotes.smx (54.1 KB, 592 views)
    __________________

    Last edited by ReFlexPoison; 07-22-2015 at 02:10.
    ReFlexPoison is offline
    ReFlexPoison
    ☠☠☠
    Join Date: Jul 2011
    Location: United States
    Old 02-08-2014 , 19:53   Re: Custom Votes Redux (v1.0 - 2/8/2014)
    Reply With Quote #2

    Configuration Formatting:
    PHP Code:
    // {VOTE_AMOUNT} - Amount of votes called for that item
    // {VOTE_REQUIRED} - Required vote calls for that vote to pass
    //
    // {VOTER_INDEX} - Voter client index
    // {VOTER_ID} - Voter user id
    // {VOTER_STEAMID} - Voter steam id
    // {VOTER_NAME} - Voter name
    //
    // {TARGET_INDEX} - Target client index
    // {TARGET_ID} - Target user id
    // {TARGET_STEAMID} - Target steam id
    // {TARGET_NAME} - Target name
    //
    // {MAP_NAME} - Map name
    // {CURRENT_MAP_NAME} - Current map name
    //
    // {OPTION_NAME} - Option name
    // {OPTION_RESULT} - Option result
    //
    // {On|Off}    - Control variable is On or Off
    // {on|off}    - Control variable is on or off
    //
    // {Yes|No}    - Voter selected Yes or No
    // {yes|no}    - Voter selected yes or no
    //
    // Formatting Examples:
    //
    // "call_notify"    "{olive}[SM] {VOTER_NAME}{default} voted to kick {green}{TARGET_NAME}{default}."
    // "command"        "kickid {TARGET_ID};sm_csay Kicked {TARGET_NAME}" 
    __________________

    Last edited by ReFlexPoison; 03-01-2014 at 14:52.
    ReFlexPoison is offline
    Donski
    Senior Member
    Join Date: Sep 2012
    Old 02-09-2014 , 11:57   Re: Custom Votes Redux (v1.0 - 2/8/2014)
    Reply With Quote #3

    Just what I need. Thanks!
    Donski is offline
    Donski
    Senior Member
    Join Date: Sep 2012
    Old 02-10-2014 , 14:06   Re: Custom Votes Redux (v1.0 - 2/8/2014)
    Reply With Quote #4

    Pardon me if I'm wrong, but this doesn't seem to do much compared to the original custom votes plugin.

    For example, I wish to change sv_gravity. With the other plugin you can show a list of options as to what value you wish to change it to.

    Code:
    "gravity"
     {
         "title"        "How much gravity should we use?"
         "type"         "list"
         "cmd"          "sm_gravity #1"
         "options"
         {
             "200"      "Very Low"
             "400"      "Low"
             "800"      "Normal"
             "1600"     "High"
             "3200"     "Very High"
         }
     }
    Looking at the config file for this plugin, seems like I would need to put in a different menu for each value?
    Donski is offline
    ReFlexPoison
    ☠☠☠
    Join Date: Jul 2011
    Location: United States
    Old 02-10-2014 , 15:35   Re: Custom Votes Redux (v1.0 - 2/8/2014)
    Reply With Quote #5

    Quote:
    Originally Posted by Donski View Post
    Pardon me if I'm wrong, but this doesn't seem to do much compared to the original custom votes plugin.

    For example, I wish to change sv_gravity. With the other plugin you can show a list of options as to what value you wish to change it to.

    Code:
    "gravity"
     {
         "title"        "How much gravity should we use?"
         "type"         "list"
         "cmd"          "sm_gravity #1"
         "options"
         {
             "200"      "Very Low"
             "400"      "Low"
             "800"      "Normal"
             "1600"     "High"
             "3200"     "Very High"
         }
     }
    Looking at the config file for this plugin, seems like I would need to put in a different menu for each value?
    I haven't implemented that. I do appreciate the feedback, I'll probably end up adding this.
    __________________
    ReFlexPoison is offline
    Donski
    Senior Member
    Join Date: Sep 2012
    Old 02-10-2014 , 18:21   Re: Custom Votes Redux (v1.0 - 2/8/2014)
    Reply With Quote #6

    Alright no problem. I was just checking if I understood the config correctly. If you could make it function the same and better as the original one (which is pretty much borked), this plugin's going to rock!

    Thanks!
    Donski is offline
    robotortoise
    Senior Member
    Join Date: Nov 2013
    Location: Somewhere in the US
    Old 02-12-2014 , 15:59   Re: Custom Votes Redux (v1.0 - 2/8/2014)
    Reply With Quote #7

    GAHHHHAHAHHAHH.

    This plugin is awesome. I'm glad someone's finally updated this and Playervotes. However, I can't get it to work.

    I'll post my script.
    http://breakfastbungalow.biz/robotor...ustomvotes.cfg

    Can you see anything wrong with it?

    -Tearing his hair out
    Robotortoise
    robotortoise is offline
    ReFlexPoison
    ☠☠☠
    Join Date: Jul 2011
    Location: United States
    Old 02-12-2014 , 16:04   Re: Custom Votes Redux (v1.0 - 2/8/2014)
    Reply With Quote #8

    Quote:
    Originally Posted by robotortoise View Post
    GAHHHHAHAHHAHH.

    This plugin is awesome. I'm glad someone's finally updated this and Playervotes. However, I can't get it to work.

    I'll post my script.
    http://breakfastbungalow.biz/robotor...ustomvotes.cfg

    Can you see anything wrong with it?

    -Tearing his hair out
    Robotortoise
    You have missing quotes for some of the keyvalues in the config. Also I'd suggest you change the name of the actual section for each vote. I'll be updating to make this plugin act a lot more like the old version.
    __________________
    ReFlexPoison is offline
    Donski
    Senior Member
    Join Date: Sep 2012
    Old 02-12-2014 , 16:54   Re: Custom Votes Redux (v1.0 - 2/8/2014)
    Reply With Quote #9

    @robotortoise:

    All of your

    "playersvotes" "0

    Are missing closing quotation marks.

    Nice server by the way!

    Last edited by Donski; 02-12-2014 at 17:05.
    Donski is offline
    robotortoise
    Senior Member
    Join Date: Nov 2013
    Location: Somewhere in the US
    Old 02-12-2014 , 17:54   Re: Custom Votes Redux (v1.0 - 2/8/2014)
    Reply With Quote #10

    Quote:
    Originally Posted by Donski View Post
    @robotortoise:

    All of your

    "playersvotes" "0

    Are missing closing quotation marks.

    Nice server by the way!
    Thanks for the compliment!

    But it's still not working.

    SM brings up this error: "L 02/12/2014 - 229:05: [SM] Native "SetFailState" reported: Improper structure for configuration file addons/sourcemod/configs/customvotes.cfg!"

    I updated the previous link with the version of the file you suggested.
    robotortoise 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 21:08.


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