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.

Snaggle 02-12-2014 18:38

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

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

You're still missing quotation marks in the config. Look at your "call_notify" section on the first 3 entries, you're missing an ending ".

ReFlexPoison 02-16-2014 02:36

Re: Custom Votes Redux (v1.0 - 2/8/2014)
 
Almost done with the new version of this plugin... The update offers much more functionality, including option votes like in the original custom votes plugin.

Coko 02-16-2014 16:23

Re: Custom Votes Redux (v1.0 - 2/8/2014)
 
Please i need config for customvote.

[SM] Listing 24 plugins:
01 <Error> "Custom Votes" (1.0) by ReFlexPoison
02 "Player Commands" (1.5.0-dev+3832) by AlliedModders LLC
03 "Basic Votes" (1.5.0-dev+3832) by AlliedModders LLC
04 "Basic Comm Control" (1.5.0-dev+3832) by AlliedModders LLC
05 "Fun Commands" (1.5.0-dev+3832) by AlliedModders LLC
06 "[TF2] gScramble Team Manager" (3.0.13) by Goerge
07 "Basic Commands" (1.5.0-dev+3832) by AlliedModders LLC
08 "Anti-Flood" (1.5.0-dev+3832) by AlliedModders LLC
09 "Basic Info Triggers" (1.5.0-dev+3832) by AlliedModders LLC
10 "Fun Votes" (1.5.0-dev+3832) by AlliedModders LLC
11 "SourceBans" (1.4.10) by SourceBans Development Team
12 "Map Nominations" (1.5.0-dev+3832) by AlliedModders LLC
13 "Sound Commands" (1.5.0-dev+3832) by AlliedModders LLC
14 "Advertisements" (0.6) by Tsunami
15 "Basic Chat" (1.5.0-dev+3832) by AlliedModders LLC
16 "Players Votes Redux" (1.3) by ReFlexPoison
17 "RandomCycle" (1.5.0-dev+3832) by AlliedModders LLC
18 "MapChooser" (1.5.0-dev+3832) by AlliedModders LLC
19 "Rock The Vote" (1.5.0-dev+3832) by AlliedModders LLC
20 "Admin Menu" (1.5.0-dev+3832) by AlliedModders LLC
21 "High Ping Kicker - Lite Edition" (1.0.0.1) by Liam
22 "Reserved Slots" (1.5.0-dev+3832) by AlliedModders LLC
23 "Admin Help" (1.5.0-dev+3832) by AlliedModders LLC
24 "Admin File Reader" (1.5.0-dev+3832) by AlliedModders LLC
Load Errors:
Custom Votes: Improper structure for configuration file addons/sourcemod/configs/customvotes.cfg!

ReFlexPoison 02-16-2014 16:33

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

Honestly, I feel I added too much to make a specific list so I just advice users to completely redo their configs from scratch. I've included a basic layout of a config offering votemap, voteban, and votekick. This plugin offers almost everything that PlayersVotes did so I'm renderin ghtat plugin useless compared to this. Let me know if there are any problems.

Coko 02-16-2014 17:10

Re: Custom Votes Redux (v1.1 - 2/16/14)
 
Working Nice Thanks

AeroAcrobat 02-16-2014 17:57

Re: Custom Votes Redux (v1.1 - 2/16/14)
 
very cool!
can you do {#FFFFFF}?

ReFlexPoison 02-16-2014 18:30

Re: Custom Votes Redux (v1.1 - 2/16/14)
 
Quote:

Originally Posted by AeroAcrobat (Post 2101126)
very cool!
can you do {#FFFFFF}?

This plugin currently uses morecolors so anything from this...
PHP Code:

SetTrieValue(hTrie"aliceblue"0xF0F8FF);
SetTrieValue(hTrie"allies"0x4D7942); // same as Allies team in DoD:S
SetTrieValue(hTrie"antiquewhite"0xFAEBD7);
SetTrieValue(hTrie"aqua"0x00FFFF);
SetTrieValue(hTrie"aquamarine"0x7FFFD4);
SetTrieValue(hTrie"axis"0xFF4040); // same as Axis team in DoD:S
SetTrieValue(hTrie"azure"0x007FFF);
SetTrieValue(hTrie"beige"0xF5F5DC);
SetTrieValue(hTrie"bisque"0xFFE4C4);
SetTrieValue(hTrie"black"0x000000);
SetTrieValue(hTrie"blanchedalmond"0xFFEBCD);
SetTrieValue(hTrie"blue"0x99CCFF); // same as BLU/Counter-Terrorist team color
SetTrieValue(hTrie"blueviolet"0x8A2BE2);
SetTrieValue(hTrie"brown"0xA52A2A);
SetTrieValue(hTrie"burlywood"0xDEB887);
SetTrieValue(hTrie"cadetblue"0x5F9EA0);
SetTrieValue(hTrie"chartreuse"0x7FFF00);
SetTrieValue(hTrie"chocolate"0xD2691E);
SetTrieValue(hTrie"community"0x70B04A); // same as Community item quality in TF2
SetTrieValue(hTrie"coral"0xFF7F50);
SetTrieValue(hTrie"cornflowerblue"0x6495ED);
SetTrieValue(hTrie"cornsilk"0xFFF8DC);
SetTrieValue(hTrie"crimson"0xDC143C);
SetTrieValue(hTrie"cyan"0x00FFFF);
SetTrieValue(hTrie"darkblue"0x00008B);
SetTrieValue(hTrie"darkcyan"0x008B8B);
SetTrieValue(hTrie"darkgoldenrod"0xB8860B);
SetTrieValue(hTrie"darkgray"0xA9A9A9);
SetTrieValue(hTrie"darkgrey"0xA9A9A9);
SetTrieValue(hTrie"darkgreen"0x006400);
SetTrieValue(hTrie"darkkhaki"0xBDB76B);
SetTrieValue(hTrie"darkmagenta"0x8B008B);
SetTrieValue(hTrie"darkolivegreen"0x556B2F);
SetTrieValue(hTrie"darkorange"0xFF8C00);
SetTrieValue(hTrie"darkorchid"0x9932CC);
SetTrieValue(hTrie"darkred"0x8B0000);
SetTrieValue(hTrie"darksalmon"0xE9967A);
SetTrieValue(hTrie"darkseagreen"0x8FBC8F);
SetTrieValue(hTrie"darkslateblue"0x483D8B);
SetTrieValue(hTrie"darkslategray"0x2F4F4F);
SetTrieValue(hTrie"darkslategrey"0x2F4F4F);
SetTrieValue(hTrie"darkturquoise"0x00CED1);
SetTrieValue(hTrie"darkviolet"0x9400D3);
SetTrieValue(hTrie"deeppink"0xFF1493);
SetTrieValue(hTrie"deepskyblue"0x00BFFF);
SetTrieValue(hTrie"dimgray"0x696969);
SetTrieValue(hTrie"dimgrey"0x696969);
SetTrieValue(hTrie"dodgerblue"0x1E90FF);
SetTrieValue(hTrie"firebrick"0xB22222);
SetTrieValue(hTrie"floralwhite"0xFFFAF0);
SetTrieValue(hTrie"forestgreen"0x228B22);
SetTrieValue(hTrie"fuchsia"0xFF00FF);
SetTrieValue(hTrie"fullblue"0x0000FF);
SetTrieValue(hTrie"fullred"0xFF0000);
SetTrieValue(hTrie"gainsboro"0xDCDCDC);
SetTrieValue(hTrie"genuine"0x4D7455); // same as Genuine item quality in TF2
SetTrieValue(hTrie"ghostwhite"0xF8F8FF);
SetTrieValue(hTrie"gold"0xFFD700);
SetTrieValue(hTrie"goldenrod"0xDAA520);
SetTrieValue(hTrie"gray"0xCCCCCC); // same as spectator team color
SetTrieValue(hTrie"grey"0xCCCCCC);
SetTrieValue(hTrie"green"0x3EFF3E);
SetTrieValue(hTrie"greenyellow"0xADFF2F);
SetTrieValue(hTrie"haunted"0x38F3AB); // same as Haunted item quality in TF2
SetTrieValue(hTrie"honeydew"0xF0FFF0);
SetTrieValue(hTrie"hotpink"0xFF69B4);
SetTrieValue(hTrie"indianred"0xCD5C5C);
SetTrieValue(hTrie"indigo"0x4B0082);
SetTrieValue(hTrie"ivory"0xFFFFF0);
SetTrieValue(hTrie"khaki"0xF0E68C);
SetTrieValue(hTrie"lavender"0xE6E6FA);
SetTrieValue(hTrie"lavenderblush"0xFFF0F5);
SetTrieValue(hTrie"lawngreen"0x7CFC00);
SetTrieValue(hTrie"lemonchiffon"0xFFFACD);
SetTrieValue(hTrie"lightblue"0xADD8E6);
SetTrieValue(hTrie"lightcoral"0xF08080);
SetTrieValue(hTrie"lightcyan"0xE0FFFF);
SetTrieValue(hTrie"lightgoldenrodyellow"0xFAFAD2);
SetTrieValue(hTrie"lightgray"0xD3D3D3);
SetTrieValue(hTrie"lightgrey"0xD3D3D3);
SetTrieValue(hTrie"lightgreen"0x99FF99);
SetTrieValue(hTrie"lightpink"0xFFB6C1);
SetTrieValue(hTrie"lightsalmon"0xFFA07A);
SetTrieValue(hTrie"lightseagreen"0x20B2AA);
SetTrieValue(hTrie"lightskyblue"0x87CEFA);
SetTrieValue(hTrie"lightslategray"0x778899);
SetTrieValue(hTrie"lightslategrey"0x778899);
SetTrieValue(hTrie"lightsteelblue"0xB0C4DE);
SetTrieValue(hTrie"lightyellow"0xFFFFE0);
SetTrieValue(hTrie"lime"0x00FF00);
SetTrieValue(hTrie"limegreen"0x32CD32);
SetTrieValue(hTrie"linen"0xFAF0E6);
SetTrieValue(hTrie"magenta"0xFF00FF);
SetTrieValue(hTrie"maroon"0x800000);
SetTrieValue(hTrie"mediumaquamarine"0x66CDAA);
SetTrieValue(hTrie"mediumblue"0x0000CD);
SetTrieValue(hTrie"mediumorchid"0xBA55D3);
SetTrieValue(hTrie"mediumpurple"0x9370D8);
SetTrieValue(hTrie"mediumseagreen"0x3CB371);
SetTrieValue(hTrie"mediumslateblue"0x7B68EE);
SetTrieValue(hTrie"mediumspringgreen"0x00FA9A);
SetTrieValue(hTrie"mediumturquoise"0x48D1CC);
SetTrieValue(hTrie"mediumvioletred"0xC71585);
SetTrieValue(hTrie"midnightblue"0x191970);
SetTrieValue(hTrie"mintcream"0xF5FFFA);
SetTrieValue(hTrie"mistyrose"0xFFE4E1);
SetTrieValue(hTrie"moccasin"0xFFE4B5);
SetTrieValue(hTrie"navajowhite"0xFFDEAD);
SetTrieValue(hTrie"navy"0x000080);
SetTrieValue(hTrie"normal"0xB2B2B2); // same as Normal item quality in TF2
SetTrieValue(hTrie"oldlace"0xFDF5E6);
SetTrieValue(hTrie"olive"0x9EC34F);
SetTrieValue(hTrie"olivedrab"0x6B8E23);
SetTrieValue(hTrie"orange"0xFFA500);
SetTrieValue(hTrie"orangered"0xFF4500);
SetTrieValue(hTrie"orchid"0xDA70D6);
SetTrieValue(hTrie"palegoldenrod"0xEEE8AA);
SetTrieValue(hTrie"palegreen"0x98FB98);
SetTrieValue(hTrie"paleturquoise"0xAFEEEE);
SetTrieValue(hTrie"palevioletred"0xD87093);
SetTrieValue(hTrie"papayawhip"0xFFEFD5);
SetTrieValue(hTrie"peachpuff"0xFFDAB9);
SetTrieValue(hTrie"peru"0xCD853F);
SetTrieValue(hTrie"pink"0xFFC0CB);
SetTrieValue(hTrie"plum"0xDDA0DD);
SetTrieValue(hTrie"powderblue"0xB0E0E6);
SetTrieValue(hTrie"purple"0x800080);
SetTrieValue(hTrie"red"0xFF4040); // same as RED/Terrorist team color
SetTrieValue(hTrie"rosybrown"0xBC8F8F);
SetTrieValue(hTrie"royalblue"0x4169E1);
SetTrieValue(hTrie"saddlebrown"0x8B4513);
SetTrieValue(hTrie"salmon"0xFA8072);
SetTrieValue(hTrie"sandybrown"0xF4A460);
SetTrieValue(hTrie"seagreen"0x2E8B57);
SetTrieValue(hTrie"seashell"0xFFF5EE);
SetTrieValue(hTrie"selfmade"0x70B04A); // same as Self-Made item quality in TF2
SetTrieValue(hTrie"sienna"0xA0522D);
SetTrieValue(hTrie"silver"0xC0C0C0);
SetTrieValue(hTrie"skyblue"0x87CEEB);
SetTrieValue(hTrie"slateblue"0x6A5ACD);
SetTrieValue(hTrie"slategray"0x708090);
SetTrieValue(hTrie"slategrey"0x708090);
SetTrieValue(hTrie"snow"0xFFFAFA);
SetTrieValue(hTrie"springgreen"0x00FF7F);
SetTrieValue(hTrie"steelblue"0x4682B4);
SetTrieValue(hTrie"strange"0xCF6A32); // same as Strange item quality in TF2
SetTrieValue(hTrie"tan"0xD2B48C);
SetTrieValue(hTrie"teal"0x008080);
SetTrieValue(hTrie"thistle"0xD8BFD8);
SetTrieValue(hTrie"tomato"0xFF6347);
SetTrieValue(hTrie"turquoise"0x40E0D0);
SetTrieValue(hTrie"unique"0xFFD700); // same as Unique item quality in TF2
SetTrieValue(hTrie"unusual"0x8650AC); // same as Unusual item quality in TF2
SetTrieValue(hTrie"valve"0xA50F79); // same as Valve item quality in TF2
SetTrieValue(hTrie"vintage"0x476291); // same as Vintage item quality in TF2
SetTrieValue(hTrie"violet"0xEE82EE);
SetTrieValue(hTrie"wheat"0xF5DEB3);
SetTrieValue(hTrie"white"0xFFFFFF);
SetTrieValue(hTrie"whitesmoke"0xF5F5F5);
SetTrieValue(hTrie"yellow"0xFFFF00);
SetTrieValue(hTrie"yellowgreen"0x9ACD32); 


Donski 02-17-2014 08:34

Re: Custom Votes Redux (v1.1 - 2/16/14)
 
Very nice. Can't wait to try it out!

Powerlord 02-17-2014 19:55

Re: Custom Votes Redux (v1.1 - 2/16/14)
 
So... (and you knew this was going to eventually come up)... does this plugin support NativeVotes? Or should I wait and ask again once NativeVotes 1.0 is done?

butaford 02-18-2014 02:11

Re: Custom Votes Redux (v1.1 - 2/16/14)
 
ReFlexPoison, please add:
1. "Semi-colon delimited list of ban reasons"
2. "Interval in seconds between another vote cast"
3. immunegroups
4. Custom prefix, example:
Spoiler

5. and does not work votemap chattrigger?
Spoiler
Sorry for my English, wrote as he could:)

krispx 02-19-2014 03:35

Re: Custom Votes Redux (v1.1 - 2/16/14)
 
hi, jus errors logs:

Code:

L 02/18/2014 - 20:12:02: [SM] Native "PushArrayString" reported: Invalid Handle 0 (error: 4)
L 02/18/2014 - 20:12:02: [SM] Displaying call stack trace for plugin "customvotes-redux.smx":
L 02/18/2014 - 20:12:02: [SM]  [0]  Line 500, C:\TF2DedicatedServer\tf\addons\sourcemod\scripting\customvotes-redux.sp::MenuHandler_PlayersVote()
L 02/18/2014 - 20:12:48: [SM] Plugin encountered error 15: Array index is out of bounds
L 02/18/2014 - 20:12:48: [SM] Displaying call stack trace for plugin "customvotes-redux.smx":
L 02/18/2014 - 20:12:48: [SM]  [0]  Line 902, C:\TF2DedicatedServer\tf\addons\sourcemod\scripting\customvotes-redux.sp::GetVoteCount()
L 02/18/2014 - 20:12:48: [SM]  [1]  Line 404, C:\TF2DedicatedServer\tf\addons\sourcemod\scripting\customvotes-redux.sp::Menu_MakeChoice()
L 02/18/2014 - 20:12:48: [SM]  [2]  Line 304, C:\TF2DedicatedServer\tf\addons\sourcemod\scripting\customvotes-redux.sp::MenuHandler_Vote()


ReFlexPoison 02-19-2014 15:20

Re: Custom Votes Redux (v1.1 - 2/16/14)
 
Quote:

Originally Posted by krispx (Post 2101966)
hi, jus errors logs:

Code:

L 02/18/2014 - 20:12:02: [SM] Native "PushArrayString" reported: Invalid Handle 0 (error: 4)
L 02/18/2014 - 20:12:02: [SM] Displaying call stack trace for plugin "customvotes-redux.smx":
L 02/18/2014 - 20:12:02: [SM]  [0]  Line 500, C:\TF2DedicatedServer\tf\addons\sourcemod\scripting\customvotes-redux.sp::MenuHandler_PlayersVote()
L 02/18/2014 - 20:12:48: [SM] Plugin encountered error 15: Array index is out of bounds
L 02/18/2014 - 20:12:48: [SM] Displaying call stack trace for plugin "customvotes-redux.smx":
L 02/18/2014 - 20:12:48: [SM]  [0]  Line 902, C:\TF2DedicatedServer\tf\addons\sourcemod\scripting\customvotes-redux.sp::GetVoteCount()
L 02/18/2014 - 20:12:48: [SM]  [1]  Line 404, C:\TF2DedicatedServer\tf\addons\sourcemod\scripting\customvotes-redux.sp::Menu_MakeChoice()
L 02/18/2014 - 20:12:48: [SM]  [2]  Line 304, C:\TF2DedicatedServer\tf\addons\sourcemod\scripting\customvotes-redux.sp::MenuHandler_Vote()


I'll give that look. I'm probably going to release another small update today.

Lucky_luck 02-19-2014 16:14

Re: Custom Votes Redux (v1.1 - 2/16/14)
 
How can i add mute and Silence Option? Have someone example pls :) THX

ReFlexPoison 02-19-2014 16:22

Re: Custom Votes Redux (v1.1 - 2/16/14)
 
Quote:

Originally Posted by Lucky_luck (Post 2102235)
How can i add mute and Silence Option? Have someone example pls :) THX

Just create another vote in the config and set the "command" to something like "sm_silence {TARGET_NAME}"

Lucky_luck 02-19-2014 16:31

Re: Custom Votes Redux (v1.1 - 2/16/14)
 
Ok thx

robotortoise 02-19-2014 19:01

Re: Custom Votes Redux (v1.1 - 2/16/14)
 
FYI, I got my config working. Thanks. :)

I'm glad someone's finally taking the time to update Players' Votes. The only request I have: The original players' votes allowed people to make a "yes" or "no" vote that, when created, wouldn't ask players to choose "yes" or "no" until the amount of people required to initiate it was fulfilled, THEN and only then would it ask the vote to all players on the server. And then, of course, it would only activate the command if it passed.

For instance:
"Rob types "voteprops" in chat. Lisa types "voteprops" in chat. There were two people required to trigger that vote. So a message "Turn everyone into props?" "Yes" "No" appears on the server.
If "yes" wins, then the command "sm_propplayer @all" will be executed and the message "YOU'RE ALL PROPS NOW! HIDE!" will be displayed. If the vote FAILS, then no command will be executed and the message "Vote Prop has failed." would appear.

Would it be possible adding this functionality back to the updated Custom Votes Redux please?

Thanks for reading this lengthy post!

-Robotortoise

ReFlexPoison 02-19-2014 22:56

Re: Custom Votes Redux (v1.1 - 2/16/14)
 
Quote:

Originally Posted by robotortoise (Post 2102297)
FYI, I got my config working. Thanks. :)

I'm glad someone's finally taking the time to update Players' Votes. The only request I have: The original players' votes allowed people to make a "yes" or "no" vote that, when created, wouldn't ask players to choose "yes" or "no" until the amount of people required to initiate it was fulfilled, THEN and only then would it ask the vote to all players on the server. And then, of course, it would only activate the command if it passed.

For instance:
"Rob types "voteprops" in chat. Lisa types "voteprops" in chat. There were two people required to trigger that vote. So a message "Turn everyone into props?" "Yes" "No" appears on the server.
If "yes" wins, then the command "sm_propplayer @all" will be executed and the message "YOU'RE ALL PROPS NOW! HIDE!" will be displayed. If the vote FAILS, then no command will be executed and the message "Vote Prop has failed." would appear.

Would it be possible adding this functionality back to the updated Custom Votes Redux please?

Thanks for reading this lengthy post!

-Robotortoise

You could simply set the command for the vote in the configuration to start a vote with the sm_vote command.

Like I said this plugin is meant to support almost anything.

robotortoise 02-20-2014 10:58

Re: Custom Votes Redux (v1.1 - 2/16/14)
 
I'm not sure I understand. Could you give me an example please?

Sorry.

Mata Patos 02-20-2014 11:17

Re: Custom Votes Redux (v1.1 - 2/16/14)
 
Hello,

This Plugin Works in CS:GO?

Thanks,

Lucky_luck 02-20-2014 17:08

Re: Custom Votes Redux (v1.1 - 2/16/14)
 
is this ok?

Code:

// Custom Votes Redux
// By: ReFlexPoison
//
// Thank you for downloading Custom Votes Redux. If you like my work and want to help out send me a donation. https://forums.alliedmods.net/member.php?u=149090
//
// How to edit this file: (Not all values will effect every type of vote. Ex: "currentmap" won't change anything in "players" type votes)
//
// "Custom Votes"                                                                                <--        Leave this alone
// {                                                                                                        <--        Add all votes after first bracket (Leave this alone)
//                "Say something funny!"                                                        <--        This is the name of the vote. This will be shown in the vote menu
//                {
//                        "type"                                        "list"                                <--        This is the type of vote. Valid types: players, map, list
//                                                                                                                        players - Populates the vote with online players
//                                                                                                                        map - Populates the vote with a list of maps from a specific map list
//                                                                                                                        list - Populates the vote with a custom list of choices
//
//                        "options"                                                                        <-- These are your list options
//                        {
//                                "lol                "LOL"                                                <-- Option name: lol | Option result: LOL
//                                "rofl"                "ROFL"                                                <-- Option name: rofl | Option result: ROFL
//                        }
//
//                        "override"                                "sm_lol"                        <--        This is the admin override of the vote. Use this with admin_overrides.cfg to prohibit access to this vote from specific players
//                        "immunity"                                "0"                                        <--        This determines what admins are removed from the vote. If an admin's immunity level is higher or equal to this, they are can not be selected upon
//
//                        "delay"                                        "60"                                <-- This is the delay in seconds before players can call a vote after the map has changed
//                        "team"                                        "0"                                        <-- This determines if a players vote can only be voted upon by a member of the same team
//                        "bots"                                        "0"                                        <-- This determines if bots are included in the players vote
//                        "ratio"                                        "0.6"                                <-- This is the ratio of players required to call a vote for the vote to pass
//                        "multiple"                                "0"                                        <-- This determines if players can choose more than one option for a specific vote
//                        "minimum"                                "4"                                        <-- This is the minimum amount of players required to call a vote for the vote to pass (Overrides ratio)
//                        "maxcalls"                                "3"                                                                <-- This is the maximum amount of times a player can vote for that specific item (0 = No limit)
//                        "command"                                "sm_csay {OPTION_RESULT}"                <-- This determines what commands will be ran when a vote is passed. (View formatting below)
//
//                        "call_notify"                        "Voted for {OPTION_NAME}.                <-- This determines what is print to everyone's chat when a vote is called
//                        "pass_notify"                        "Vote passed!"                                        <-- This determines what is print to everyone's chat when a vote is passed
//
//                        "maplist"                                "default"                        <-- This determines what maplist to use for map votes (See maplist.cfg)
//                        "currentmap"                        "0"                                        <-- This determines if players are allowed to vote for the current map in map votes
//                        "recentmaps"                        "3"                                        <-- This determines how many recent maps will be removed from map votes
//
//                        "chattrigger"                        "vote"                                <-- This determines what the chat trigger of the vote will be. Do not include ! or / in the trigger, the plugin will handle the removal of them for non admin players.
//                }                                                                                                <--        Leave this alone
//        }                                                                                                        <--        Leave this alone
//
// Formatting:
//
// Place these in command, call_notify, pass_notify to your liking
// {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_NAME} - Voter name
//
// {TARGET_INDEX} - Target client index
// {TARGET_ID} - Target user id
// {TARGET_NAME} - Target name
//
// {MAP_NAME} - Map name
// {CURRENT_MAP_NAME} - Current map name
//
// {OPTION_NAME} - Option name
// {OPTION_RESULT} - Option result
//
// Formatting Examples:
//
// "call_notify"        "{olive}[SM] {VOTER_NAME}{default} voted to ban {green}{TARGET_NAME}{default}."
// "command"                "kickid {TARGET_ID};sm_csay Kicked {TARGET_NAME}"
//

"Custom Votes"
{
        "Kick player"
        {
                "type"                        "players"
                "command"                "sm_kick {TARGET_ID}"
                "team"                        "1"
                "bots"                        "1"
                "immunity"                "99"
                "multiple"                "1"
                "minimum"                "4"
                "ratio"                        "0.6"
                "call_notify"        "{olive}{VOTER_NAME}{default} voted to kick {olive}{TARGET_NAME}{default} [{green}{VOTE_AMOUNT}{default}/{green}{VOTE_REQUIRED}{default}]"
                "pass_notify"        "{olive}Vote to kick passed. Kicked {olive}{TARGET_NAME}{default}."
                "chattrigger"        "votekick"
        }
        "Ban player"
        {
                "type"                        "players"
                "command"                "sm_ban {TARGET_ID} 0"
                "team"                        "0"
                "bots"                        "0"
                "immunity"                "99"
                "minimum"                "4"
                "ratio"                        "0.7"
                "multiple"                "1"
                "call_notify"        "{olive}{VOTER_NAME}{default} voted to ban {olive}{TARGET_NAME}{default} [{green}{VOTE_AMOUNT}{default}/{green}{VOTE_REQUIRED}{default}]"
                "pass_notify"        "{olive}Vote to ban passed. Banned {olive}{TARGET_NAME} Permanently{default}."
                "chattrigger"        "voteban"
        }
        "Mute player"
        {
                "type"                        "players"
                "command"                "sm_mute {TARGET_ID}"
                "team"                        "0"
                "bots"                        "0"
                "immunity"                "99"
                "minimum"                "4"
                "ratio"                        "0.5"
                "multiple"                "1"
                "call_notify"        "{olive}{VOTER_NAME}{default} voted to mute {olive}{TARGET_NAME}{default} [{green}{VOTE_AMOUNT}{default}/{green}{VOTE_REQUIRED}{default}]"
                "pass_notify"        "{olive}Vote to mute passed. Mute {olive}{TARGET_NAME}{default}."
                "chattrigger"        "votemute"
        }
        "Silence player"
        {
                "type"                        "players"
                "command"                "sm_silence {TARGET_ID}"
                "team"                        "0"
                "bots"                        "0"
                "immunity"                "99"
                "minimum"                "4"
                "ratio"                        "0.5"
                "multiple"                "1"
                "call_notify"        "{olive}{VOTER_NAME}{default} voted to silence {olive}{TARGET_NAME}{default} [{green}{VOTE_AMOUNT}{default}/{green}{VOTE_REQUIRED}{default}]"
                "pass_notify"        "{olive}Vote to silence passed. Silence {olive}{TARGET_NAME}{default}."
                "chattrigger"        "votesilence"
        }
}


robotortoise 02-20-2014 17:46

Re: Custom Votes Redux (v1.1 - 2/16/14)
 
Quote:

Originally Posted by ReFlexPoison (Post 2102350)
You could simply set the command for the vote in the configuration to start a vote with the sm_vote command.

Like I said this plugin is meant to support almost anything.

So like this?

" "Make everyone props!"
{
"type" "list"
"command" "sm_vote; sm_propplayer {OPTION_RESULT}"
"bots" "1"
"immunity" "0"
"minimum" "5"
"ratio" "0.8"
"call_notify" "{olive}{VOTER_NAME}{default} wants to make half the server pissed off by turning everyone into props. {olive}{default} [{VOTE_AMOUNT}/{VOTE_REQUIRED}]"
"pass_notify" "{olive}Vote passed. Everyone is a prop! HIDE YO KIDS! HIDE YO WIFE!{default}."
"chattrigger" "voteprops"
"delay" "95"
}"

ReFlexPoison 02-20-2014 18:48

Re: Custom Votes Redux (v1.1 - 2/16/14)
 
Quote:

Originally Posted by robotortoise (Post 2102662)
So like this?

" "Make everyone props!"
{
"type" "list"
"command" "sm_vote; sm_propplayer {OPTION_RESULT}"
"bots" "1"
"immunity" "0"
"minimum" "5"
"ratio" "0.8"
"call_notify" "{olive}{VOTER_NAME}{default} wants to make half the server pissed off by turning everyone into props. {olive}{default} [{VOTE_AMOUNT}/{VOTE_REQUIRED}]"
"pass_notify" "{olive}Vote passed. Everyone is a prop! HIDE YO KIDS! HIDE YO WIFE!{default}."
"chattrigger" "voteprops"
"delay" "95"
}"

I didn't take into consideration that there isn't a way to get the result of sm_vote. The vote will be called but nothing will happen when the vote ends. A seperate plugin could be created for that to function like that but at the moment I'd suggest just using the plugin the way it is right now.

On other note...

Yay updates!

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

robotortoise 02-20-2014 19:39

Re: Custom Votes Redux (v1.1 - 2/16/14)
 
Quote:

Originally Posted by ReFlexPoison (Post 2102689)
I didn't take into consideration that there isn't a way to get the result of sm_vote. The vote will be called but nothing will happen when the vote ends. A separate plugin could be created for that to function like that but at the moment I'd suggest just using the plugin the way it is right now.[/LIST]

Aww. :(

The only reason I'd suggest adding it is because the original players' votes had it and my server doesn't function very well without it. :(

sipster19 02-22-2014 22:40

Re: Custom Votes Redux (v1.2 - 2/20/14)
 
I would like to see this added:

confirm - Displays a simple "Yes" or "No" vote. If "Yes" wins, the command will be executed (although no result parameter is returned); if "No" wins, nothing is executed.

ReFlexPoison 02-22-2014 23:38

Re: Custom Votes Redux (v1.2 - 2/20/14)
 
Quote:

Originally Posted by sipster19 (Post 2103501)
I would like to see this added:

confirm - Displays a simple "Yes" or "No" vote. If "Yes" wins, the command will be executed (although no result parameter is returned); if "No" wins, nothing is executed.

Why not just use the options vote and set "no" to do nothing...?

zanyda12 02-23-2014 00:59

Re: Custom Votes Redux (v1.2 - 2/20/14)
 
HL2DM Error
[SM] Unable to load plugin "playersvotes-redux.smx": Native "CustomVotes_OpenVote" was not found

ReFlexPoison 02-23-2014 01:45

Re: Custom Votes Redux (v1.2 - 2/20/14)
 
Quote:

Originally Posted by zanyda12 (Post 2103520)
HL2DM Error
[SM] Unable to load plugin "playersvotes-redux.smx": Native "CustomVotes_OpenVote" was not found

Stop using playersvotes and change to this.

robotortoise 02-23-2014 21:12

Re: Custom Votes Redux (v1.2 - 2/20/14)
 
Quote:

Originally Posted by ReFlexPoison (Post 2103508)
Why not just use the options vote and set "no" to do nothing...?

Because then you have to choose "yes" or "no" when initiating the vote, which looks absurd to the end user.

ReFlexPoison 02-25-2014 10:36

Re: Custom Votes Redux (v1.2 - 2/20/14)
 
Quote:

Originally Posted by robotortoise (Post 2103908)
Because then you have to choose "yes" or "no" when initiating the vote, which looks absurd to the end user.

Quote:

Originally Posted by sipster19 (Post 2103501)
confirm - Displays a simple "Yes" or "No" vote. If "Yes" wins, the command will be executed (although no result parameter is returned); if "No" wins, nothing is executed.


Creampuffyness 02-25-2014 18:26

Re: Custom Votes Redux (v1.2 - 2/20/14)
 
Reflex I have a question. How to I set votes to be allowed to called by a single vote?

For example, if I want anyone to be able to cast a vote to kick a player, I currently have:
{
"Kick player"
{
"type" "players"
"command" "sm_kick {TARGET_ID}"
"team" "1"
"bots" "1"
"immunity" "99"
"multiple" "1"
"minimum" "4"
"ratio" "0.6"
"call_notify" "{olive}{VOTER_NAME}{default} voted to kick {olive}{TARGET_NAME}{default} [{green}{VOTE_AMOUNT}{default}/{green}{VOTE_REQUIRED}{default}]"
"pass_notify" "{olive}Vote to kick passed. Kicked {olive}{TARGET_NAME}{default}."
"chattrigger" "votekick"
}

Looking at the options, there only seems to be "minimum" and "ratio". Minimum is the number of players needed to make a current vote succeed, and ratio is how many voted "yes" to pass. But do I set this so anyone can call a vote?

I saw this:
// Place these in command, call_notify, pass_notify to your liking
// {VOTE_AMOUNT} - Amount of votes called for that item
// {VOTE_REQUIRED} - Required vote calls for that vote to pass

But how can I set them?


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

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