AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   Custom Votes Redux (v1.7 - 4/13/14) (https://forums.alliedmods.net/showthread.php?t=235115)

ReFlexPoison 02-08-2014 19:34

Custom Votes Redux (v1.7 - 4/13/14)
 
54 Attachment(s)
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

ReFlexPoison 02-08-2014 19:53

Re: Custom Votes Redux (v1.0 - 2/8/2014)
 
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}" 


Donski 02-09-2014 11:57

Re: Custom Votes Redux (v1.0 - 2/8/2014)
 
Just what I need. Thanks!

Donski 02-10-2014 14:06

Re: Custom Votes Redux (v1.0 - 2/8/2014)
 
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?

ReFlexPoison 02-10-2014 15:35

Re: Custom Votes Redux (v1.0 - 2/8/2014)
 
Quote:

Originally Posted by Donski (Post 2098429)
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.

Donski 02-10-2014 18:21

Re: Custom Votes Redux (v1.0 - 2/8/2014)
 
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!

robotortoise 02-12-2014 15:59

Re: Custom Votes Redux (v1.0 - 2/8/2014)
 
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

ReFlexPoison 02-12-2014 16:04

Re: Custom Votes Redux (v1.0 - 2/8/2014)
 
Quote:

Originally Posted by robotortoise (Post 2099410)
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.

Donski 02-12-2014 16:54

Re: Custom Votes Redux (v1.0 - 2/8/2014)
 
@robotortoise:

All of your

"playersvotes" "0

Are missing closing quotation marks.

Nice server by the way!

robotortoise 02-12-2014 17:54

Re: Custom Votes Redux (v1.0 - 2/8/2014)
 
Quote:

Originally Posted by Donski (Post 2099427)
@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 - 22:39: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.


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

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