PDA

View Full Version : Custom Votes v0.5.6 (1/07)


Pages : [1] 2 3 4

chundo
06-03-2008, 00:11
Custom Votes v0.5.6 (1/07)

Custom votes allows you to initiate votes defined in a configuration file, without requiring any additional plugin coding. Votes will execute server actions depending on the result. The intent is to easily allow other plugin authors to add custom votes just by dropping a config file in the customvotes configuration directory. What Custom Admin Menus (formerly dynamicmenu/Super Menu) does for menus, Custom Votes does for voting.

Quick Install: Unzip customvotes.zip into your server root. Vote configurations are stored in configs/customvotes, and show up in the "Voting Commands" admin menu.Included Vote Configurations: Normal Votes:changelevel - Vote to change the map immediately.
extend - Vote to extend the map 20 minutes.
scrambleteams - Vote to scramble the teams and restart the round.
setnextmap - Vote to set the next map.
crits - Vote to turn crits on or off.
Chat Votes (replaces PlayersVotes, do not use both together without disabling these votes in configs/customvotes/playervotes.vote.cfg):voteban - Vote to ban a player. Type "voteban" in chat.
votekick - Vote to kick a player. Type "votekick" in chat.
votemap - Vote to change the map. Type "votemap" in chat.
votealltalk - Vote to turn alltalk on or off.
This is all you need to get started. For changes since the last version, see the change log at the bottom of this post. Continue reading for more comprehensive usage documentation.

Detailed Usage Documentation

CVars: All cvars have sane defaults, and most admins will not need a separate configuration file for this plugin.sm_cvote_version - Plugin version.
sm_cvote_showstatus - Show vote results to players as they occur. "0" is off, "1" displays aggregate results in a side panel, "2" displays votes anonymously in chat, "3" displays votes with player names in chat. (default 1)
sm_cvote_triggers - Allow votes to be triggered by regular chat keywords (i.e. "votegravity".) (default 1)
sm_cvote_triggerdelay - The delay in seconds between non-admin initiated votes. (default 60)
sm_cvote_mapdelay - The delay in seconds after a map starts before a vote can be initiated. This can be overridden on a per-vote basis in the vote configuration. (default 0)
sm_cvote_executedelay - The delay in seconds after a vote succeeds before the resulting command is executed. (default 3.0)
sm_cvote_minpercent - The minimum percentage needed for a vote to be considered successful. This can be overridden on a per-vote basis in the vote configuration. (default 60)
sm_cvote_minvotes - The minimum votes needed for a vote to be considered sucessful. This can be overridden on a per-vote basis in the vote configuration. (default 0)
sm_cvote_adminonly - Only allow admins to initiate votes (except chat votes), even if they don't define an "admin" configuration parameter.
sm_cvote_resetonmapchange - Clears all pending votes on map change (as opposed to retaining the status of chat-votes like votekick, voteban, etc). (default 0)
Custom Votes also uses the value of sm_vote_delay (from basevotes) as a minimum delay between votes.
Admin Commands:sm_cvote <votename> <params> Initiates the named vote. If no name is specified, a menu of valid votes will be presented. Extra parameters can be passed from the console if the vote requires it (see "Parameters" below), but if omitted the player will be prompted for them via menus. This can also be launched from chat with "/cvote <votename> <params>".
sm_cvote_reload Check configuration directory for changes.
Console Commands:
sm_votemenu Displays a menu of votes the player is allowed to initiate. !votemenu in chat.
Configuration: Custom Votes loads every configuration file it finds in configs/customvotes. For example, if you wanted to add a gravity vote, you could add "gravity.vote.cfg" to addons/sourcemod/configs/customvotes/. The section name should be a unique name that is used to identify the vote. See the "Configuration Examples" section below for samples, or look at the included vote configurations in the attached customvotes.zip.

Vote configuration: Required attributes:title - The vote title that will display to users when it is initiated.
type - The type of vote (see "Vote Types" below.) Defaults to "list".
cmd - The command to execute when the vote succeeds. Parameters are specified by #1, @2, etc. (see "Parameters" below.)
options (required for list votes only) - A KeyValues subsection that contains key/value pairs for the vote options to be displayed.
Optional attributes:admin - The name of a server command that determines who can initiate this vote. For example, if this is set to "sm_kick", only admins with the "kick" permission can initiate this vote.
target - The users that this vote will display to. In addition to the standard target strings, you may also use "@admins". For a "chat" type vote, Custom Votes will only register the votes of players that are part of the target string.
delay - The delay in seconds betweens two votes of this type.
mapdelay - The delay in seconds after a map starts before this vote can be initiated.
percent - The minimum percentage of votes the winning choice needs to have to be considered the winner.
abspercent - The minimum percentage of all in-game players that the winning choice needs to pass. This differs from percent because it looks at all in-game players, rather than just the ones that chose to vote.
votes - The minimum number of votes the winning choice needs to have to be considered the winner.
approve - Who must approve the vote result before it is finalized. Can be either "sender", "admins", or "none." Defaults to "none".
Launch parameters:params - A KeyValues subsection specifying the type of each numbered parameter. These are parameters that must be passed to the vote, and are not displayed to voters. A parameter can take the form of a numbered subsection specifying the possible values and descriptions (similar to "options" section for list-type votes), or a single numbered parameter type to use built-in parameter types. See the "Parameters" section below for examples. Built-in parameter types are:mapcycle - Parameter is a map from the mapcycle. Custom mapcycles can be used by adding a section to maplist.cfg called "sm_cvote <votename>".
player - Parameter is a single player
group - Parameter is a group of players
groupplayer - Parameter is a single player OR group of players.
onoff - Either "on" (1) or "off" (0).
yesno - Same as onoff, except the prompt menu will display "Yes" or "No" instead of "On" or "Off".
Chat triggers:trigger - A KeyValues subsection defining the chat-keyword trigger for this vote. The following options control how the chat trigger works:command - The chat keyword that triggers the vote
delay - The amount of time that must pass between chat-triggered votes of this type. Equivalent to the previous (now deprecated) "playerdelay" parameter.
notice - The message that will be printed to chat as users enter triggers (useful when requiring triggers from multiple users, see "percent" and "count" below). "%u" is replaced with the triggering player's name. Uses "title" if omitted.
percent - The minimum percent of current connected users that must enter this trigger for the vote to launch. Defaults to 0.
count - The minimum number of current connected users that must enter this trigger for the vote to launch. Defaults to 0.
expires - How long (in seconds) before a user's vote trigger is expired (so that vote triggers do not build infinitely). Users that disconnect have their votes removed automatically. Defaults to 300 (5 minutes).
Vote Types:onoff - Displays a simple "On" or "Off" vote, which returns the values "1" or "0" as the result parameter.
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.
list - Displays a vote using the name/value pairs from the "options" subsection for the vote. Option keys and values can also use expression substitution (and parameter substitution, if parameters are passed from the console.) The winning option value is returned as the result parameter.
chat - The vote is carried out using only chat triggers. A trigger section must be defined, and once the trigger threshold is reached, the command is executed without a menu vote.
Chat Triggers: If sm_cvote_triggers is on, you can specify chat keywords to launch a vote. Triggers are significantly different in 0.5 from 0.4, in that they have separate vote percent/vote count minimums from the vote itself. As a result if a "trigger" section exists, it ignores the "admin" parameter when deciding who can use the trigger in order to enable PlayersVotes-style chat voting. If you want your admins to directly launch votes from chat, they must now use the "/cvote <votename>" method. See the configuration examples section below. If a vote requires additional parameters, they can also be passed in chat (i.e. "votenextmap cp_badlands".)
Parameters: Vote titles, vote commands, trigger notices, option keys and option values can all use parameter replacements. The actual vote result will always be the last parameter. Similar to Custom Admin Menus, parameters take the format #1, #2, #3, etc. (or @1, @2, @3 to display parameters unquoted.)

Example: "sm_setnextmap #1"

If any parameters are defined in the "params" section of the vote configuration, sm_cvote will require that you pass in additional parameters from the console, or it will prompt you for them via menus. For example, take the following command/params example:

"cmd" "sm_ban #1 #2 votedbanned"
"params"
{
"1" "player"
"2"
{
"5" "5 minutes"
"30" "30 minutes"
"60" "60 minutes"
"0" "Permanently"
}
}This would require that you pass in the userid (#1) and the ban time parameter (#2). If you omit any parameters, Custom Votes will ask you to select them via menus.

Note that with "confirm" type votes (Yes/No), the vote does not produce a parameter from the result, it only determines whether to execute the command string or not. Because of this, all parameters used in a "confirm" vote need to be defined in the "params" section (even the last one.)
Expressions: In addition to parameter replacement, Custom Votes has a handy expression replacement feature, which allows you to insert CVar values. Vote titles, vote commands, trigger notices, option keys and option values can all contain expressions.

Example title: "Turn all talk {!sv_alltalk|onoff}?"

This would parse to "Turn all talk on?" or "Turn all talk off?", depending on the current value of sv_alltalk.

Syntax: {[!]cvar_name[|modifier(s)]}

An initial "!" reverses the value of boolean CVars (useful for toggle votes). Any modifiers after the CVar determine how the variable displays. Current modifiers are "onoff", "yesno", "upper", "lower", and "capitalize." Multiple modifiers can be strung together (i.e. {sv_alltalk|onoff|capitalize}).
Configuration Examples: Vote parameters: "changelevel"
{
"title" "Change map to #1?"
"type" "confirm"
"admin" "sm_setnextmap"
"cmd" "changelevel #1"
"params"
{
"1" "mapcycle"
}
}Chat Vote: "voteban"
{
"title" "Ban #1 for 30 minutes?"
"type" "chat"
"cmd" "sm_ban #1 30 \"Banned by vote.\""
"trigger"
{
"command" "voteban"
"notice" "%u voted to ban #1"
"percent" "75"
"count" "4"
}
"params"
{
"1" "player"
}
}List Vote: "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"
}
}For more vote configuration examples, see the attached configuration files in customvotes.zip.
Integration With Admin Menu: Custom votes will automatically show up in the "Voting Commands" admin menu. Votes will prompt the user for any extra parameters they require. For sorting purposes (with adminmenu_sorting.txt), menus have the identifier of "cvote_<votename>", where <votename> is the section name defining the vote - so for example, for the first example in the Configuration Examples section above, the menu identifier would be "cvote_changelevel".
Installing: customvotes.smx -> addons/sourcemod/plugins/
customvotes.sp -> addons/sourcemod/scripting/
customvotes.phrases.txt -> addons/sourcemod/translations/
*.vote.cfg -> addons/sourcemod/configs/customvotes/

Or, you can just unzip the attached customvotes.zip into your server root.
Changelog: 0.1 - Initial release
0.2 - Added chat triggers
- Added vote delay configuration
- Bugfix: some votes were inheriting configuration values from other votes
0.3 - Added menu prompts for vote parameters (maps, groups/players, etc)
- Added votemenu command
- Fixed "player" parameters ignoring immunity
0.4 - Added admin menu integration
0.4.1 - Fixed bug where setting sm_cvote_showstatus to 1 resulted in terminating the vote after a single vote
- Added detailed error logging for configuration file errors
- Commented out "voteban", "votekick", and "votemap" chat triggers in basevotes.vote.cfg by default to avoid conflicts with PlayersVotes.
0.5 - Revamped chat triggers to allow PlayersVote-style votes
- Added playersvotes.vote.cfg to integrate PlayersVotes functionality. IF YOU USE THIS CONFIGURATION, DISABLE THE PLAYERSVOTES PLUGIN.
- Significantly modified vote configuration parameters, although it should be backwards-compatible with 0.4.1.
- New vote type (chat) and vote parameter types (yesno, onoff).
- Added sm_cvote_reload and auto-reloading on map change
- Fixed vote status panel blocking weapon switches
- Hide vote status panel until vote completes if user hits "0".
- Added "Quick Start" section in this post to avoid scaring people with excessive documentation.
0.5.1 - Fixed bug parsing "command"
0.5.2 - Fixed targeting logic for non-admins
- Added list-style parameters
0.5.3 - Fixed votes stalling if they required approval
- Reset current vote pointer before executing command to allow chaining votes together
0.5.4 - Fixed bug resulting in multiple event hooks, causing chat spam and potentially misbehaving votes
0.5.5 - Added abspercent configuration directive
- Added 3 second delay (configurable via sm_cvote_executedelay) before executing a command after a successful vote
- Added sm_ban_auto command as a helper for the included voteban vote (handles banning disconnected players as well)
- Fixed custom mapcycle feature
0.5.6 - Fixed security hole with !votemenu command
- Added "target" support to chat votes
- Fixed a problem were votes were improperly disabled
Credits: Developed by chundo.
Idea inspired by pRED's custom admin menus.
Thanks to The Resident for PlayersVotes and providing me with chat voting requirements for voteban/votekick/votemap.

FunTF2Server
06-03-2008, 04:20
I want to make it for players on my server can call a vote to turn alltalk on and off, and also turn friendly fire on and off, when no admin is present... that way it's a democracy and the majority can get what they want for most people are happy, even when an admin is not on the server.

can I do that with this plugin, if so, how?

I want it for when a player types vote_ff in the chat, it will call a vote to turn friendly fire on and off. Also vote_alltalk to turn alltalk on and off. Also I want to make it for a vote for each one can only be called once every 5 minutes.

chundo
06-03-2008, 11:20
Yes, it's just a console command so anyone can run it - it does its own permission checking based on the "admin" attribute of the vote. If you omit that attribute, any user can initiate it.

For example, just setup an alltalk vote like in example2.vote.cfg but omit the "admin" attribute, and users will be able to launch it with "/cvote alltalk" in chat.

I'm considering adding a chat alias option to the config as well that would allow you to launch votes with a simple chat keyword - "votealltalk", "voteff", etc.

Right now I use the global vote delay (controlled by the sm_vote_delay CVar). I will look into adding a longer delay for user votes though. Do you mean one vote period per five minutes, or one vote of each TYPE per five minutes?

ottobohn
06-03-2008, 11:39
Perfect.

Otto
n00bsalad.net

FunTF2Server
06-03-2008, 17:36
I'm considering adding a chat alias option to the config as well that would allow you to launch votes with a simple chat keyword - "votealltalk", "voteff", etc.

Yes please add that, it would be awesome. A lot of users can be n00bs and don't have console enabled, so won't be able to call votes, and can't figure out how to open console.


Right now I use the global vote delay (controlled by the sm_vote_delay CVar). I will look into adding a longer delay for user votes though. Do you mean one vote period per five minutes, or one vote of each TYPE per five minutes?

One vote of each type per 5 minutes, or however many minutes I set with an integer value.

Maybe we could configure it for the delay is per type of vote in the config file, like alltalk vote could only be called every 5 minutes, friendly fire vote can only be called every 10 minutes, mapchange vote can only be called every 30 minutes, etc.

bakaideda
06-04-2008, 08:09
I want that players write something in chat and trigger vote for something...
For example: DEATHMATCH... But when admins are not on server.
I started with this but I dont know what they must write in chat to trigger this voting...


"Votes"
{
"DM VOTING"
{
"title" "DEATHMATCH {!cssdm_enabled|onoff}?"
"admin" "sm_kick"
"target" "@all"
"percent" "70"
"type" "confirm"
"cmd" "cssdm_enabled {!cssdm_enabled}"
}
}

DJ Tsunami
06-04-2008, 10:54
As chundo said, it's currently not yet possible to trigger a vote through chat. This will be added in 0.2 (as the first post says).

@chundo: awesome plugin, I was actually thinking of doing this myself but couldn't figure out what the best way would be to do it. I hope this will become part of the SM core so we can do away with the stock voting plugins, and can easily make custom votes too.

Idea: make a timeleft option to run a vote x minutes before the map ends. Would make it possible to replace rtv :)

chundo
06-04-2008, 11:10
bakaideda -

If you remove the "admin" parameter in the vote, it makes it so anyone can launch it. And although you can't specify a user-friendly chat keyword (yet), you can launch it from chat with the standard SourceMod method, i.e.:

/cvote "DM VOTING"

(Assuming the space in the name doesn't throw it off, haven't tested that.)

Thanks DJ Tsunami. I've added the chat keywords (and a few other features) to the Todo list for v0.2, which will be out this week yet. Closer custom admin menu integration is planned for 0.3 (allowing cvote to prompt the user for required parameters via menus when none are given).

chundo
06-05-2008, 12:26
Ok, chat triggers and vote delays are added in v0.2.

FunTF2Server
06-05-2008, 15:40
thx so much chundo you are our hero.

can anyone make me a sample cfg for votekick and voteban that anyone can call with exactly those keywords?

i already made the voteff and votealltalk which is awesome but i cant figure how to get the votekick and voteban working, oh and votemap

Nomarky
06-05-2008, 16:21
i cant figure how to get the votekick and voteban working, oh and votemap

Perhaps try Players Votes: http://forums.alliedmods.net/showthread.php?t=72058
These functions are built in to the plugin

chundo
06-05-2008, 19:32
thx so much chundo you are our hero.

can anyone make me a sample cfg for votekick and voteban that anyone can call with exactly those keywords?

i already made the voteff and votealltalk which is awesome but i cant figure how to get the votekick and voteban working, oh and votemap

"Votes"
{
"ban"
{
"title" "Ban #1 for 30 minutes?"
"type" "confirm"
"trigger" "voteban"
"percent" "75"
"votes" "4"
"approve" "admins"
"cmd" "sm_ban #1 30 voteban"
}
}The downsides to this method are:

1) The vote initiator must specify the target in the command (i.e. "voteban chundo"). v0.3 (almost done, hooray for days off) solves this by prompting for missing parameters via menus.

2) When passing a user as a parameter, I don't check for immunity (yet), so a regular user can start a voteban on an admin. This is mitigated in the above example by requiring an admin to approve the vote result. This will also be resolved in v0.3.

Of course, if you have PlayersVotes installed, the above trigger (voteban) will conflict with it.

With v0.3, I'll also include a "stock votes" configuration file, which so far includes:

alltalk
crits
gravity
setnextmap
ban
changelevel
extend
kick
ban
scrambleteams

FunTF2Server
06-05-2008, 21:19
"Votes"
{
"ban"
{
"title" "Ban #1 for 30 minutes?"
"type" "confirm"
"trigger" "voteban"
"percent" "75"
"votes" "4"
"approve" "admins"
"cmd" "sm_ban #1 30 voteban"
}
}The downsides to this method are:

1) The vote initiator must specify the target in the command (i.e. "voteban chundo"). v0.3 (almost done, hooray for days off) solves this by prompting for missing parameters via menus.

2) When passing a user as a parameter, I don't check for immunity (yet), so a regular user can start a voteban on an admin. This is mitigated in the above example by requiring an admin to approve the vote result. This will also be resolved in v0.3.

Of course, if you have PlayersVotes installed, the above trigger (voteban) will conflict with it.

With v0.3, I'll also include a "stock votes" configuration file, which so far includes:

alltalk
crits
gravity
setnextmap
ban
changelevel
extend
kick
ban
scrambleteams
sweet you rock kthx bye, ill be looking forwerd to 0.3

chundo
06-06-2008, 03:52
Went quicker than I thought - 0.3 is out. With this release I think it pretty much has all the functionality needed to duplicate basevotes and funvotes voting behavior.

Here is a voteban example using 0.3:

"Votes"
{
"ban"
{
"title" "Ban #1 for 30 minutes?"
"type" "confirm"
"trigger" "voteban"
"percent" "75"
"votes" "4"
"approve" "admins"
"cmd" "sm_ban #1 30 voteban"
"params"
{
"1" "player"
}
}
}Comments and bug reports appreciated!!

FunTF2Server
06-06-2008, 04:22
should i use the .smx attached to post "get plugin", or the one in the .zip which is attached. They are different size.

thx

chundo
06-06-2008, 11:42
It's probably because I'm compiling against a slightly different snapshot than the forum server - they're both based on the same source though. They should both work the same, but the best idea is probably always to compile it yourself against the SM version you're using.

chundo
06-06-2008, 16:39
v0.4 is released. Added automatic integration with admin "Voting Commands" menu.

I don't have any other features planned for this plugin, so if you have any suggestions or requests, let me know. And as always, let me know if you run across any bugs.

FunTF2Server
06-09-2008, 04:35
hmm not working, i get this when i load plugin

L 06/09/2008 - 02:43:30: [SM] Plugin encountered error 4: Invalid parameter or parameter type
L 06/09/2008 - 02:43:30: [SM] Native "LogError" reported: Language phrase "Configuration error" not found
L 06/09/2008 - 02:43:30: [SM] Debug mode is not enabled for "customvotes.smx"
L 06/09/2008 - 02:43:30: [SM] To enable debug mode, edit plugin_settings.cfg, or type: sm plugins debug 52 on
L 06/09/2008 - 02:43:30: [customvotes.smx] Errors were encountered while loading configuration. The plugin may not work as expected.

FunTF2Server
06-09-2008, 04:36
here my cfg file, it's called tfc.vote.cfg

"Votes"
{
"alltalk"
{
"title" "Turn all talk {!sv_alltalk|onoff}?"
"trigger" "votealltalk"
"type" "confirm"
"cmd" "sv_alltalk {!sv_alltalk}"
}
"burn"
{
"title" "Set #1 on fire?"
"type" "confirm"
"trigger" "voteburn"
"cmd" "sm_burn #1 20"
"params"
{
"1" "groupplayer"
}
}
"crits"
{
"title" "Turn crits {!tf_weapon_criticals|onoff}?"
"trigger" "votecrits"
"type" "confirm"
"cmd" "tf_weapon_criticals {!tf_weapon_criticals}"
}
"ff"
{
"title" "Turn friendly fire {!mp_friendlyfire|onoff}?"
"trigger" "voteff"
"type" "confirm"
"cmd" "mp_friendlyfire {!mp_friendlyfire}"
}
"gravity"
{
"title" "How much gravity should we use?"
"trigger" "votegravity"
"type" "list"
"cmd" "sv_gravity #1"
"options"
{
"200" "Very Low"
"400" "Low"
"800" "Normal"
"1600" "High"
"3200" "Very High"
}
}
"slay"
{
"title" "Slay #1?"
"type" "confirm"
"trigger" "voteslay"
"cmd" "sm_slay #1 20"
"params"
{
"1" "groupplayer"
}
}
"ban"
{
"title" "Ban #1 for 30 minutes?"
"type" "confirm"
"trigger" "voteban"
"percent" "75"
"votes" "4"
"approve" "admins"
"cmd" "sm_ban #1 30 voteban"
"params"
{
"1" "player"
}
}
"changelevel"
{
"title" "Change map to #1?"
"type" "confirm"
"trigger" "votemap"
"admin" "sm_setnextmap"
"approve" "admins"
"cmd" "changelevel #1"
"params"
{
"1" "mapcycle"
}
}
"extend"
{
"title" "Extend current map 30 minutes?"
"trigger" "voteextend"
"type" "confirm"
"cmd" "sm_extend 30"
}
"kick"
{
"title" "Kick #1?"
"type" "confirm"
"trigger" "votekick"
"percent" "75"
"votes" "4"
"approve" "admins"
"cmd" "sm_kick #1 votekick"
"params"
{
"1" "player"
}
}
"scrambleteams"
{
"title" "Scramble teams?"
"trigger" "votescramble"
"type" "confirm"
"cmd" "mp_scrambleteams 1"
}
"setnextmap"
{
"title" "Set next map to #1?"
"type" "confirm"
"trigger" "votenextmap"
"cmd" "sm_setnextmap #1"
"params"
{
"1" "mapcycle"
}
}
}

chundo
06-09-2008, 11:10
Your config file parses fine for me. I've made the parsing errors more descriptive in the attached version, try it and let me know what it says.

bakaideda
06-09-2008, 15:57
In my case one player triggers the vote... He chooses YES or NO and that's all... Then starts command from vote... I want that every player can vote...

chundo
06-09-2008, 16:15
In my case one player triggers the vote... He chooses YES or NO and that's all... Then starts command from vote... I want that every player can vote...

How many players are online at the time? It could be a bug in the "target" configuration logic - can you post your config file(s), and let me know which vote it's happening for?

FunTF2Server
06-09-2008, 17:45
alright i got my problem working, i had to changed the encoding of the cfg file from UNICODE to ANSI

FunTF2Server
06-09-2008, 18:35
now I'm having the same problem that guy is having, the vote ends after only 1 vote, doesn't matter who votes, as soon as the vote gets 1 person vote, it takes effect to what ever they voted for

chundo
06-09-2008, 18:40
Does the vote show up to all users, or just the one voter? And is this just for confirm-type votes, or all votes?

chundo
06-10-2008, 00:24
Ha. I was being so clever using pretty menu panels to display vote results that I didn't remember to only display it to those who already voted - so when the panel showed up, the vote menu died, and the plugin viewed that as "no response" from all the other clients. :| I've confirmed this does not happen if you use sm_cvote_showstatus of anything but 1.

Will have a new version soon. Thanks for the report.

chundo
06-10-2008, 00:54
Updated to 0.4.1. Let me know if this fixes the issue (in my limited testing it seems to.)

flubber
06-10-2008, 08:44
I'm pretty intersted with this plug in, but i was wondering if it was possible to do a vote scramble in the same way the votemap work (for example 10 people have to enter "scramble" in order to launch the vote scramble).

chundo
06-10-2008, 11:12
No, good idea though. It will go well with chat triggers, I'll add it.

flubber
06-10-2008, 11:14
sweet, thx

chundo
06-10-2008, 12:09
Actually, how would you see this working? After 10 (or 70%, or whatever) people type "scramble" the vote launches, or it just scrambles automatically?

flubber
06-10-2008, 12:13
I was thinking of a rtv like, when xx people (defined by a cvar, let's say 10 for exemple) type scramble then the vote is launched.

I was also thinking (since some of my vote are made for the public) maybe you can add a specified number of vote allowed for each player.

DJ Tsunami
06-10-2008, 18:24
Just try to mimic something like sm_rtv_minplayers and sm_rtv_needed, where a vote can only be started if x people are in the server, and where a vote can only be started if x people type the chat trigger.

chundo
06-10-2008, 18:37
I was just thinking about how "voteban" works on some servers (not sure how PlayersVotes handles it), where having X% of users typing "voteban [user]" IS the vote - so once a certain percentage threshold is reached the action is just taken automatically rather than launching the "official" menu-style vote.

We can probably support both though. It's approaching "replacing PlayersVotes" territory now, so I'm trying to decide whether it makes more sense to 1) ask The Resident expand the functionality of PlayersVotes to be a more generic "chat vote" system that just runs commands after a certain threshold of triggers are received (one of which could be an sm_cvote vote), or 2) merge the PlayersVotes system into Custom Votes, rendering it obsolete.

I'm leaning towards #2 now just because it seems like there would be a lot of duplicated effort otherwise, since a generic chat-vote system would also need to have configurable parameter types (the user to ban, etc.) that the user is prompted for via menus.

DJ Tsunami
06-10-2008, 19:51
#2 sounds awesome, as I've said before I'd love to see this integrated into SM core, so the more features it has, the better.

The Resident
06-10-2008, 19:54
I was just thinking about how "voteban" works on some servers (not sure how PlayersVotes handles it), where having X% of users typing "voteban [user]" IS the vote - so once a certain percentage threshold is reached the action is just taken automatically rather than launching the "official" menu-style vote.

We can probably support both though. It's approaching "replacing PlayersVotes" territory now, so I'm trying to decide whether it makes more sense to 1) ask The Resident expand the functionality of PlayersVotes to be a more generic "chat vote" system that just runs commands after a certain threshold of triggers are received (one of which could be an sm_cvote vote), or 2) merge the PlayersVotes system into Custom Votes, rendering it obsolete.

I'm leaning towards #2 now just because it seems like there would be a lot of duplicated effort otherwise, since a generic chat-vote system would also need to have configurable parameter types (the user to ban, etc.) that the user is prompted for via menus.

I've been giving this some thought also. It ultimately makes the most sense to have a unified voting system.

The trick is that voteban/kick/map can have weird hidden requirements that make them a little less generic or straightforward to implement. For example, one of the trickiest things is actually the most recent bug report- Manni noted that voteban is easily circumvented if the targeted client just disconnects/reconnects. (It pretty much requires a total overhaul of how ban votes are managed in PlayersVotes. Bans would have to be by Steam ID or, if the client never authenticates, by IP addr.) There's a number of hidden little specialized "gotchas" in there that make a good generic implementation of voteban/kick/map kinda hard to do without sacrificing some other functionality.

Anyway, FYI, PlayersVotes is a sessionless voting system. It has no concept of a vote having been started because it's always running. Once the required votes for an action has been reached, the action is taken. The key restrictions are that players may not cast multiple votes to kick/ban one person (although they may have multiple votes for kick/banning different people). A player can also have only one "active" map vote at any time (although they are allowed to CHANGE their vote after it has been made).

I've also considered adding a generic vote capability to PlayersVotes. It could definitely be done, but that idea's just kind of on the back-burner at the moment.

I haven't looked too hard at Custom Votes (yet), but I suspect that CV could take the place of PV by selectively importing some of PV's more specialized capabilities...? I'll take a closer look at CV and see which of #1 or #2 would work best for me.

chundo
06-10-2008, 20:56
If we do add this stuff into CV, the main thing would be the sessionless tracking that you have in PV (who triggered what, with what parameters, is their vote expired, clear their vote if they disconnect, etc.)

I'll dig around the PV code a bit too and see what's going on in there. If you can think of any of the other gotchas you ran across, let me know. As long as you're planning to overhaul a big chunk of PV's internals, it might make sense to just join forces.

rahmie
06-14-2008, 04:51
This mod doesn’t allow anyone who isn’t an admin to player params for votekick/voteban. Is this correct?

DJ Tsunami
06-14-2008, 06:28
No, that's what Player Votes is for. As you can see in the posts above you they might be merged together.

willy1234x1
06-16-2008, 08:35
I'm not sure if I made the commands right I wanted to create a votemute
so I coded it like so
"mute"
}
"title" "Mute #1?"
"type" "comfirm"
"admin" "sm_gag"
"trigger" "votemute"
"cmd" "sm_gag #1"
"params"
}
"1" "groupplayer"
}

Is that right for having players type votemute and having a box show up asking who they want to vote to mute/gag? Also when voteban is typed nothing showed up. Is this because there is a requirement of 4 clients online to get it to work?

chundo
06-16-2008, 10:47
Yes, your configuration looks good - except that since you have an admin check of "sm_gag" only admins with permission to run "sm_gag" directly can initiate the vote. If you want anyone to be able to launch the vote, remove the "admin" line.

Also, "confirm" is misspelled.

I disabled the "voteban" keyword in the default config files to avoid conflicts with PlayersVotes for now.

willy1234x1
06-16-2008, 15:12
Yes, your configuration looks good - except that since you have an admin check of "sm_gag" only admins with permission to run "sm_gag" directly can initiate the vote. If you want anyone to be able to launch the vote, remove the "admin" line.

Also, "confirm" is misspelled.

I disabled the "voteban" keyword in the default config files to avoid conflicts with PlayersVotes for now.
Yeah, the lack of sleep really messes with my spelling :D I noticed that you did that for both voteban and votekick you set the triggers to comments, I was just very tired at the time of that writing and couldn't figure out what the hell that meant :D

red!
06-16-2008, 17:49
Hey dude, cool plugin!

Maybe you could think about an option for random maps out of the maplist file so people could initiate random map votes. I think no other plugin does this yet. And maybe you could add an option to allow players not to participate in the vote displaying a 0-option like "cancel" to the voters.

r3dh3adkid
06-17-2008, 09:53
chundo your going to hate me >_<....

I created a custom vote to turn melee on or off using bl4nk's classchooser plugin.

here is the code for the vote:

"Melee Mode"
{
"title" "Turn melee mode {!sm_classchooser_enable|onoff}?"
"type" "confirm"
"admin" "sm_kick"
"trigger" "votemelee"
"cmd" "sm_classchooser_class none; sm_classchooser_enable {!sm_classchooser_enable}; sm_msay If you're bugged, suicide and change weapon."
}

Whenever i type votemelee it spams about 5 times "A vote is already in progress" or something like that.

I've added a few other custom votes but I dont know if its the votes that I created that are causing this or if its custom vote itself. Last that I looked there were no errors in my log files.

chundo
06-17-2008, 11:54
chundo your going to hate me >_<....
Whenever i type votemelee it spams about 5 times "A vote is already in progress" or something like that.

I've added a few other custom votes but I dont know if its the votes that I created that are causing this or if its custom vote itself. Last that I looked there were no errors in my log files.

You know, I've seen this with several plugins (not all my own) - occasionally a plugin that prints a message to chat will show up 5-10 times in a row, even though the command was only executed once. I was starting to wonder if it's something in SM. Does it happen every time for you with this vote? Did it happen before you upgraded your SourceMod?

r3dh3adkid
06-17-2008, 11:57
I'm pretty sure it still did it with 2200 but I know it does it w/ 2255.

I ususally dont do the command more than once per map but i'll go try it a few times and see if it works.

willy1234x1
06-18-2008, 02:08
Yes, your configuration looks good - except that since you have an admin check of "sm_gag" only admins with permission to run "sm_gag" directly can initiate the vote. If you want anyone to be able to launch the vote, remove the "admin" line.

Also, "confirm" is misspelled.

I disabled the "voteban" keyword in the default config files to avoid conflicts with PlayersVotes for now.
Having issues mate. My voteburn, voteslay and votemute all seem to not work. I want them to do basically the same thing as a voteban/kick where it brings up a list to choose and then asks all players yes or no. Voteburn works but brings up the list and effectively gives anyone typing it in that admin power. The rest do nothing. I'll grab the code if you need it but otherwise what's the way it should look?

willy1234x1
06-18-2008, 02:33
Would these work as is?
Burn I'm considering experimental because asshats would abuse it.
"burn"
{
"title" "Burn #1?"
"type" "confirm"
"trigger" "voteburn"
"percent" "75"
"votes" "4"
"approve" "admins"
"cmd" "sm_burn 20 #1 voteburn"
"params"
{
"1" "player"
}
}
Same thing here experimental.
"slay"
{
"title" "Slay #1?"
"type" "confirm"
"trigger" "voteslay"
"percent" "75"
"votes" "4"
"approve" "admins"
"cmd" "sm_slay #1 voteslay"
"params"
{
"1" "player"
}
}
I really want this one working.
"mute"
{
"title" "Mute #1?"
"type" "confirm"
"trigger" "votemute"
"percent" "75"
"votes" "4"
"approve" "admins"
"cmd" "sm_gag #1 votemute"
"params"
{
"1" "player"
}
} I'm trying to set the voteburn to only 20 seconds would that be correct or would it be sm_burn #1 20 for the cmd line? I'm thinking it might be more like sm_burn #1 20 because the first character group #1 points to target then the 20 tells it time.

r3dh3adkid
06-18-2008, 02:38
er, i dunno what that space and voteX after the cmd is....

willy1234x1
06-18-2008, 02:40
Where? point it out by putting the line of code in but bold the section I can't seem to get what you mean.

r3dh3adkid
06-18-2008, 02:47
"cmd" "sm_gag #1 votemute"

willy1234x1
06-18-2008, 03:04
"cmd" "sm_gag #1 votemute"
In his voteban/kick scripts he has the same thing done.
"kick"
{
"title" "Kick #1?"
"type" "confirm"
// Uncomment if you do not use PlayersVotes
//"trigger" "votekick"
"percent" "75"
"votes" "4"
"approve" "admins"
"cmd" "sm_kick #1 votekick"
"params"
{
"1" "player"
}
}
See? Ignore the comments I use playersvote and I'm not going to have anything conflict.

willy1234x1
06-18-2008, 03:39
Oh shit still having errors. votemute and slay seem to not even work.
And voteburn brings up a menu I don't want to allow clients to see.http://img296.**************/img296/4898/ctf2fort0000tgaoj1.jpg

r3dh3adkid
06-18-2008, 04:18
try taking out what i bolded and tell me how it goes. (for votemute)

willy1234x1
06-18-2008, 05:05
Will do man, I'm really starting to get the hang of all the SM stuff and really like it. :D These three votes are the ones I want to set up to make some custom kind of stuff to add some things to my server to make it different. I want to make a plugin that enables my current idea to keep my server clean of class spam(achievement release rushes) by making a plugin that every thursday turns the server into a 24 hour Achievementbox_b3 then back to regular rotation. I've been working on it for the past two days and need to test it out before it's released here. It's part of my "Achievementbox Thursdays" event.

willy1234x1
06-18-2008, 06:17
try taking out what i bolded and tell me how it goes. (for votemute)
Tested it, didn't work. I think it's something in the params. sm_gag <player> according to console when I typed just sm_gag so I think I need two params first for the list then for the command.

chundo
06-18-2008, 11:15
No, your config looks fine (FYI, the extra parameters on "votekick" and "voteban" are the reasons for kicking/banning). A "player" parameter shouldn't display the groups you're seeing though - do you have a duplicate vote definition somewhere that's interfering?

What version of SM are you using?

willy1234x1
06-18-2008, 11:58
I'm running snapshot 2255, here's the basevotes.cfg as is. As well as an attachment
"Votes"
{
"ban"
{
"title" "Ban #1?"
"type" "confirm"
// Uncomment if you do not use PlayersVotes
//"trigger" "voteban"
"percent" "75"
"votes" "4"
"approve" "admins"
"cmd" "sm_ban #1 voteban"
"params"
{
"1" "player"
}
}
"changelevel"
{
"title" "Change map to #1?"
"type" "confirm"
"admin" "sm_setnextmap"
// Uncomment if you do not use PlayersVotes
//"trigger" "votemap"
"approve" "admins"
"cmd" "changelevel #1"
"params"
{
"1" "mapcycle"
}
}
"extend"
{
"title" "Extend current map 20 minutes?"
"type" "confirm"
"trigger" "voteextend"
"cmd" "sm_extend 20"
}
"kick"
{
"title" "Kick #1?"
"type" "confirm"
// Uncomment if you do not use PlayersVotes
//"trigger" "votekick"
"percent" "75"
"votes" "4"
"approve" "admins"
"cmd" "sm_kick #1 votekick"
"params"
{
"1" "player"
}
}
"setnextmap"
{
"title" "Set next map to #1?"
"type" "confirm"
"trigger" "votenextmap"
"cmd" "sm_setnextmap #1"
"params"
{
"1" "mapcycle"
}
}
"burn"
{
"title" "Burn #1?"
"type" "confirm"
//"trigger" "voteburn"
"percent" "75"
"votes" "4"
"approve" "admins"
"cmd" "sm_burn #1 20 voteburn"
"params"
{
"1" "player"
}
}
"slay"
{
"title" "Slay #1?"
"type" "confirm"
//"trigger" "voteslay"
"percent" "75"
"votes" "4"
"approve" "admins"
"cmd" "sm_slay #1 voteslay"
"params"
{
"1" "player"
}
}
"mute"
{
"title" "Mute #1?"
"type" "confirm"
"trigger" "votemute"
"percent" "75"
"votes" "4"
"approve" "admins"
"cmd" "sm_gag #1"
"params"
{
"1" "player"
}
}
}I know the burn and slay both have comments over the trigger it's because of the errors and the possibility of them being abused.

Is it possible it's conflicting with any of my plugins?
10:02:24 [SM] Listing 33 plugins:
01 "Fun Commands" (1.1.0-svn) by AlliedModders LLC
02 "Nextmap" (1.1.0-svn) by AlliedModders LLC
03 "Map Rate" (0.9) by Ryan "FLOOR_MASTER" Mannion
04 "Admin File Reader" (1.1.0-svn) by AlliedModders LLC
05 "SourceMod Radio" (1.0.0.12) by dubbeh
06 "Basic Comm Control" (1.1.0-svn) by AlliedModders LLC
07 "Basic Info Triggers" (1.1.0-svn) by AlliedModders LLC
08 "Anti-Flood" (1.1.0-svn) by AlliedModders LLC
09 "Aimbot Detection" (0.0.2.0) by devicenull
10 "Spray tracer" (3.1) by Nican132
11 "Fun Votes" (1.1.0-svn) by AlliedModders LLC
12 "RandomCycle" (1.0.2.2236) by AlliedModders LLC
13 "Basic Ban Commands" (1.1.0-svn) by AlliedModders LLC
14 "Custom Votes" (0.4.1) by chundo
15 "Custom Tab Work Around" (0.2) by The-Killer
16 "Basic Commands" (1.1.0-svn) by AlliedModders LLC
17 "Admin Help" (1.1.0-svn) by AlliedModders LLC
18 "Fair Team Balancer" (2.7) by MistaGee
19 "Admin Menu" (1.1.0-svn) by AlliedModders LLC
20 "In-game Help Menu" (0.1) by chundo
21 "SlapSlay Commands" (1.1.0-svn) by AlliedModders LLC
22 "Admin List" (1.1) by Fredd
23 "Basic Votes" (1.1.0-svn) by AlliedModders LLC
24 "Client Preferences" (1.1.0-svn) by AlliedModders LLC
25 "Web Shortcuts" (1.0.1) by James "sslice" Gray
26 "Basic Chat" (1.1.0-svn) by AlliedModders LLC
27 "Reserved Slots" (1.1.0-svn) by AlliedModders LLC
28 "Kigen's Anti-Cheat" (1.1.3) by Kigen
29 "Advertisements" (0.5.5) by Tsunami
30 "Players Votes" (1.2.5) by pZv!, The Resident
31 "Client Execute" (1.0.0.3) by dubbeh
32 "Advanced Menu Say" (2.0) by MoggieX
33 "TF2 Stats" (1.4.2) by R-Hehl

chundo
06-18-2008, 13:04
Ok, I'll test your config. I did notice some other problems with triggers earlier that I'm resolving, I have another version almost ready that I'll get this into.

willy1234x1
06-18-2008, 13:20
Good to here man. Love the plugin though it's great. I'll beta test if you need it.

chundo
06-20-2008, 03:24
New version attached - if some of you brave ones could help test it a little before I release the next version, I would appreciate it.

Fixes/features since 0.4:
sm_cvote is now an admin command. Users must now use !votemenu or vote chat triggers. Admins using chat triggers are treated the same as any other user; to launch a vote immediately they should use sm_cvote <votename> or the Voting Commands menu. Only votes that users can initiate directly (determined by "admin" vote parameter) will show up in !votemenu; votes requiring chat triggers don't appear there (yet).
Deprecated "triggers" value in config file, added "triggers" section (still backwards-compatible). See playervotes.vote.cfg for an example. Available trigger parameters:
"command" - the chat trigger keyword
"delay" - equivalent to previous "playerdelay" parameter, which has been deprecated.
"notice" - the chat message to display when a user types a trigger (only used if multiple requests are required to start a vote). "%u" is replaced with the player name. You can also use parameter and expression replacement. If omitted, will default to vote title (not desirable except for chat-type votes.)
"count" - the minimum number of players that need to request a vote before it is launched.
"percent" - the minimum percentage of players that need to request a vote before it is launched. If this number evaluates to be larger than "count", it is used instead.
Chat triggers ignore the "admin" vote parameter. It provides a group-consensus alternative to requiring an admin to launch it.
Added playervotes.vote.cfg to the default config directory, and moved basevotes/funvotes to "disabled" directory since most are duplicates of existing votes (the few new votes were moved into core.vote.cfg).
Two new parameter types: "yesno" and "onoff". See "votealltalk" in playervotes.vote.cfg for an example.
New vote type: "chat". If this vote type is used, you must define a "trigger" section, and users must vote by typing the trigger in chat. Once the trigger threshold is reached, the command is automatically executed. See playervotes.vote.cfg for examples.
Added "sm_cvote_reload" command to check for config changes and add any new votes. Also executed on map change.
Added "sm_cvote_resetonmapchange" CVAR which clears all pending votes on map change (as opposed to retaining the status of chat-votes like votekick, voteban, etc). Defaults to 0.
Fixed vote status panel (sm_cvote_showstatus = 1) blocking weapon changes until it disappeared.
If users close the vote status panel with "0", it will not reappear as new votes come in.
Allows votes targetting users that have already disconnected (useful for voteban/etc.) A vote targetting the user must have been started before they disconnect, however. Disconnected targets should show up at the end of the player menu with an asterisk (*) before their name.In theory this version has all the changes needed to support votekick / voteban from PlayersVotes (thanks to help from The Resident), and all existing base/funvotes. It also can support votemap easily enough, with the exception that it wouldn't have an "extend map" option.

If this tests well enough on some live servers I'll roll a 0.5 for release in the next couple days.

EDIT: posted 0.5 to main post, removed attachment.

willy1234x1
06-20-2008, 03:53
Did my config work with this one? Or was I doing something wrong?

chundo
06-20-2008, 03:57
I can only guess that you had a conflicting configuration file somewhere. The original burn vote configuration I released used a "groupplayer" parameter (like was displayed in your screenshot), while your config uses "player". It seems like its loading both, but the first is taking precedence.

In any case there were a lot of trigger inconsistencies that have been fixed. Try it out.

willy1234x1
06-20-2008, 04:00
Sweet dude thanks for the update and on such a good day :D I'm learning how to make some plugins too now as well but right now I'm waiting for putty to finish updating my server :(

willy1234x1
06-20-2008, 05:56
Works like a charm, I tested out my votemute works beautifully as do voteburn/slay but I don't have those two enabled ingame I'm getting feedback from my community to see if they like them they're easier to abuse I guess. I planned them to be one for asshats that don't get it and the other for campers(you need a fire you don't want hypothermia :D) Great job Chundo.

chundo
06-22-2008, 17:27
0.5 released in main post.

Jamster
06-22-2008, 19:18
Thanks. Though it seems none of my votes work any more. ;_;
You can actually initiate the vote fine and people can vote fine but it WON'T change the cvar.
Maybe my config is setup wrong, I GATHER I got it right.

Here's the error log:
L 06/22/2008 - 16:59:57: SourceMod error session started
L 06/22/2008 - 16:59:57: Info (map "cp_well") (file "errors_20080622.log")
L 06/22/2008 - 16:59:57: [SM] Plugin encountered error 4: Invalid parameter or parameter type
L 06/22/2008 - 16:59:57: [SM] Native "VFormat" reported: Language phrase "Option Won The Vote" not found
L 06/22/2008 - 16:59:57: [SM] Debug mode is not enabled for "customvotes.smx"
L 06/22/2008 - 16:59:57: [SM] To enable debug mode, edit plugin_settings.cfg, or type: sm plugins debug 35 on
L 06/22/2008 - 17:03:18: [SM] Plugin encountered error 4: Invalid parameter or parameter type
L 06/22/2008 - 17:03:18: [SM] Native "VFormat" reported: Language phrase "Option Won The Vote" not found
L 06/22/2008 - 17:03:18: [SM] Debug mode is not enabled for "customvotes.smx"
L 06/22/2008 - 17:03:18: [SM] To enable debug mode, edit plugin_settings.cfg, or type: sm plugins debug 35 on
L 06/22/2008 - 17:14:03: Error log file session closed.
L 06/22/2008 - 17:14:04: SourceMod error session started
L 06/22/2008 - 17:14:04: Info (map "cp_dustbowl") (file "errors_20080622.log")
L 06/22/2008 - 17:14:04: [SM] Native "RemoveFromArray" reported: Invalid index 1 (count: 0)
L 06/22/2008 - 17:14:04: [SM] Debug mode is not enabled for "customvotes.smx"
L 06/22/2008 - 17:14:04: [SM] To enable debug mode, edit plugin_settings.cfg, or type: sm plugins debug 35 on
L 06/22/2008 - 17:59:14: Error log file session closed.
L 06/22/2008 - 17:59:15: SourceMod error session started
L 06/22/2008 - 17:59:15: Info (map "pl_goldrush") (file "errors_20080622.log")
L 06/22/2008 - 17:59:15: [SM] Native "RemoveFromArray" reported: Invalid index 1 (count: 0)
L 06/22/2008 - 17:59:15: [SM] Debug mode is not enabled for "customvotes.smx"
L 06/22/2008 - 17:59:15: [SM] To enable debug mode, edit plugin_settings.cfg, or type: sm plugins debug 35 on

and my config is attched.

Thanks.

I am on Windows, TF2, SM 1.0.x svn latest.

chundo
06-22-2008, 21:51
I forgot to update the translation file. The missing phrase is displayed just before the vote command is executed, so that error is blocking any action from being taken after a vote.

The "RemoveFromArray" error - I'm guessing this happens immediately on map change? I updated the plugin to fix what I think the problem was - but can you enable debug mode on the plugin so I can verify the line number I think it's happening on?

Please reinstall again from the main post, as I've updated the .sp and the translation file. You'll also have to reload sourcemod, since it caches the translation files and doesn't reload them even if you reload the Custom Votes plugin.

willy1234x1
06-22-2008, 22:53
Hey umm might want to add a download link to the new version.

chundo
06-22-2008, 23:34
Guess the uploads didn't get saved. Should be back again.

crazychicken
06-23-2008, 00:52
how do i stop some votes ebing accessible to players?

like voteban, just delete the lines from the cfg file?


also i made a cfg file as i want to make a vote for jetpacks, the vote comes up ok but the command doesnt work when the vote is successful. i can only get the command to change ingame thru rcon, typing sm_jetpack 0 says unrecognised command and nothing happens. It happens with alltalk too, the vote wins but the command doesnt get executed. Is it because its an rcon not an sm command?


"Votes"
{
"Jetpacks"
{
"title" "Turn Jetpacks {!sm_jetpack|onoff}?"
"type" "confirm"
"admin" "sm_kick"
"command" "sm_jetpack {!sm_jetpack}"
"trigger"
{
"command" "votejetpacks"
"notice" "%u wants to to initiate a jetpacks vote"
"percent" "55"
}
}
}

willy1234x1
06-23-2008, 01:07
Great Job chundo it's running beautifully. Yet another great release.

chundo
06-23-2008, 03:22
crazychicken - did you upgrade from 0.4, or is this the first version you installed? Sounds like the translation error Jamster ran into - if so make sure you have the latest translations file installed and restart your server. Your vote config looks fine, please post any output from your error logs if it keeps happening.

To remove a vote, just comment it out (put // at the beginning of each line). If you just want it to be available to admins, remove the trigger section and add an "admin" parameter in the config.

crazychicken
06-23-2008, 04:20
thx

this is first version ive installed; i tried the newer files sp and phrases but still no joy. not sure why, no errors listed, think its weird how sm commands arent having an effect in console only with rcon in front of them

willy1234x1
06-23-2008, 04:24
Well looking at your code

"Votes"
{
"Jetpacks"
{
"title" "Turn Jetpacks {!sm_jetpack|onoff}?"
"type" "confirm"
"admin" "sm_kick"
"command" "sm_jetpack {!sm_jetpack}"
"trigger"
{
"command" "votejetpacks"
"notice" "%u wants to to initiate a jetpacks vote"
"percent" "55"
}
}
} You see to have an undefined trigger for one thing and for the command you're supposed to put cmd when refering to sm_jetpack. That's just a few things I see.

crazychicken
06-23-2008, 04:42
yeah dont tell me all the things that would be useful and helpful :P

i copied that layout from the plugin cfg files, i assumed the trigger was the command and text next to it. when you say cmd do you mean replace command with cmd?

at the moment the vote is working so the trigger works but the command isnt kicking in, or if it is it isnt working for some reason

Jamster
06-23-2008, 09:12
This works beautifully now, thank you very much. :]

chundo
06-23-2008, 11:49
yeah dont tell me all the things that would be useful and helpful :P

i copied that layout from the plugin cfg files, i assumed the trigger was the command and text next to it. when you say cmd do you mean replace command with cmd?

at the moment the vote is working so the trigger works but the command isnt kicking in, or if it is it isnt working for some reason

"command" or "cmd" are both supported actually, so that should be fine.

Can you please post your error / console logs? I can't help you until I see those.

willy1234x1
06-23-2008, 15:04
Oh on your first post you had cmd meaning the admin or server command to run while the command would be for textchat commands.

chundo
06-23-2008, 15:06
Yeah, I started allowing them both in the latest version. I should probably call it "execute" by default for clarity, but if so it will remain backward compatible.

flubber
06-24-2008, 10:12
I got a problem with the votescramble include in the zipp file. I'd just modified it to test with 1 vote needed since i'm alone on the server. The vote is working great but the command never launches.

"scrambleteams"
{
"title" "Scramble teams?"
"type" "confirm"
"percent" "50"
"votes" "1"
"command" "mp_scrambleteams 1"
"trigger"
{
"command" "votescramble"
"notice" "%u wants to scramble teams."
"percent" "50"
"count" "1"
}
}

chundo
06-24-2008, 10:14
Need to see logs.

flubber
06-24-2008, 10:15
Nothing special in the log :
L 06/24/2008 - 16:13:19: [psychostats_threaded_uni.smx] Psychostats calculate stats by worldid
L 06/24/2008 - 16:13:35: [customvotes.smx] [CSSCPC]Flubber<2><STEAM_0:1:5xxxxx4><> initiated a scrambleteams vote
L 06/24/2008 - 16:13:35: [customvotes.smx] "Yes" (1) won with 100% of the vote (1 votes)

Nothing in error log

chundo
06-24-2008, 10:39
That was a truly stupid error. It was looking for "commmand" (with 3 m's). Updated main post with new version.

flubber
06-24-2008, 21:46
Got two other problems (i've post my cfg, maybe i made a mistake while creating it):
- First people who are not admin or in the reserved slot list (adminsimple.cfg (i've even test with no flag just the name in the list : "STEAM_0:1:2xxxxxx" "" /username) can't launch votekick voteban or votedrug, but they can launch every other vote.
- Secondly for my alltalk vote, i probably made a mistake, because i don't have a second vote after 4people enter votealltalk it's immediatly activated.

"Votes"
{
"voteban"
{
"title" "Ban #1 for 30 minutes?"
"type" "chat"
"command" "sm_ban #1 30 \"Banned by vote.\""
"percent" "51"
"trigger"
{
"command" "voteban"
"notice" "%u voted to ban #1"
"percent" "70"
"count" "4"
}
"params"
{
"1" "player"
}
}
"votekick"
{
"title" "Kick #1?"
"type" "chat"
"command" "sm_kick #1 \"Kicked by vote.\""
"percent" "60"
"trigger"
{
"command" "votekick"
"notice" "%u voted to kick #1"
"percent" "51"
"count" "4"
}
"params"
{
"1" "player"
}
}
"votealltalk"
{
"title" "Turn alltalk #1?"
"type" "chat"
"command" "sv_alltalk #1"
"percent" "51"
"trigger"
{
"command" "votealltalk"
"notice" "%u wants to turn alltalk #1"
"percent" "51"
}
"params"
{
"1" "onoff"
}
}
"votemap"
{
"title" "Change map to #1?"
"type" "chat"
"command" "changelevel #1"
"percent" "51"
"trigger"
{
"command" "votemap"
"notice" "%u wants to change the map to #1"
"delay" "300"
"percent" "51"
"count" "4"
}
"params"
{
"1" "mapcycle"
}
}
"votedrug"
{
"title" "Drug #1?"
"type" "chat"
"command" "sm_drug #1 \"Drugged by vote.\""
"percent" "51"
"trigger"
{
"command" "votedrug"
"notice" "%u voted to drug #1"
"percent" "51"
"count" "4"
}
"params"
{
"1" "player"
}
}
"scrambleteams"
{
"title" "Scramble teams?"
"type" "confirm"
"percent" "51"
"votes" "4"
"command" "mp_scrambleteams 1"
"trigger"
{
"command" "votescramble"
"notice" "%u wants to scramble teams."
"percent" "51"
"count" "4"
}
}
"votesetnext"
{
"title" "Change nextmap to #1?"
"type" "chat"
"command" "sm_setnextmap #1"
"percent" "51"
"trigger"
{
"command" "votenextmap"
"notice" "%u wants to change the nextmap to #1"
"percent" "51"
"count" "4"
}
"params"
{
"1" "mapcycle"
}
}
"gonext"
{
"title" "Go to the next map?"
"type" "confirm"
"percent" "51"
"votes" "4"
"command" "sm_change2nextmap"
"trigger"
{
"command" "gonext"
"notice" "%u wants to change to the next map."
"percent" "51"
"count" "4"
}
}
}

chundo
06-24-2008, 22:58
1) I'll test your config - I did most of my testing as an admin, so it may be a bug that didn't show up on my server. Do players get a server response in chat? Is there anything in your logs?
2) "chat" type votes don't trigger a menu vote after they reach the trigger threshold, they just execute the command - if you want it to work the way you're talking about, change the vote type to "confirm". Is it 4 votes no matter how many people are online though? 'Cause that shouldn't be happening with your config, it should be 51% of online players.

Also, I'm guessing from your config that you're editing the playervotes.vote.cfg file. It might be better to add custom votes to a different config file, so it doesn't get overwritten when you upgrade.

crazychicken
06-25-2008, 01:59
k so ive got most of it working but one problem i have is the vote that comes up is just a yes or no then 1 or 2 to choose. there is no description as to what the vote is about


"Votes"
{


"Jetpacks"

{
"title" "Turn jetpacks #1?"
"type" "chat"
"command" "sm_jetpack #1"
"trigger"
{
"command" "votejetpacks"
"notice" "%u wants to turn jetpacks #1"
"percent" "70"
}
"params"
{
"1" "onoff"
}
}
}

willy1234x1
06-25-2008, 03:14
Does it ask turn on jetpacks? It should with the way you configured it.

flubber
06-25-2008, 06:28
1) I'll test your config - I did most of my testing as an admin, so it may be a bug that didn't show up on my server. Do players get a server response in chat? Is there anything in your logs?
2) "chat" type votes don't trigger a menu vote after they reach the trigger threshold, they just execute the command - if you want it to work the way you're talking about, change the vote type to "confirm". Is it 4 votes no matter how many people are online though? 'Cause that shouldn't be happening with your config, it should be 51% of online players.

Also, I'm guessing from your config that you're editing the playervotes.vote.cfg file. It might be better to add custom votes to a different config file, so it doesn't get overwritten when you upgrade.

1 - i've just tested after removeing me from every admin list i got :"No players can be targeted" even with someone who is not into any admin list (when there's admin they just don't appear)
2 - ok :)

I created a cpc.user.vote.cfg.

chundo
06-25-2008, 10:30
OH - yeah, that's intended. Users can't target themselves or anyone above their immunity level for player parameters. This is because most votes targeting users are to punish them; if you could target anyone, a bunch of random asshats could fill the server and kick/ban an admin.

Non-admins should be able to target each other though, right?

I could add a separate param type that ignores player immunity if it's needed for votes.

Also, if you change your alltalk vote to "confirm", you'll probably also want to remove the parameter and just make it a toggle vote. See funvotes.vote.cfg in configs/customvotes/disabled for an example.

flubber
06-25-2008, 11:05
I totally understand the "admin protection" but it's a problem for vip list who just have the "a" flag (or even no flag, just put the name in the list like "STEAM_0:1:600xxxx5" "" // Toast is protected) who can't be target.
It was working fine with playervotes also people coule kick anybody but true admin with a real immunity.

I ve just try a votedrug against a classic user (non vip non admin) without any of my admin right, and i can't target anyone.

Resuming :
gonext : admin/vip & user can launch it
votenext : admin/vip & user can launch it
votescramble : admin/vip & user can launch it
votedrug : only admin & vip can launch it
votemap : admin/vip & user can launch it
votealltalk : admin/vip & user can launch it
votekick : only admin & vip can launch it
voteban : only admin & vip can launch it

chundo
06-25-2008, 13:18
Yeah, it just has to do with votes that take a "player"-type parameter.

What immunity level do your VIPs have? Does setting them to "0" allow them to be targeted?

I could add an "immunity threshold" cvar that treats everyone under X immunity as a non-admin.

flubber
06-25-2008, 15:27
My VIp does not have any immunity there are just readers from our forum, they just have reservations flag. But why couldn't i target a regular player when i was defined as a regular player too?

I think you should define immunity to the admin define flag.

red!
06-25-2008, 17:15
gets better and better. but i am still missing the possibility to vote for one out of a list of random maps selected by random.

chundo
06-25-2008, 18:25
I'm not planning to replace rockthevote or anything. What other scenario would this be useful for?

flubber
06-26-2008, 05:13
I think replacing rtv is useless since the actual plug in has everything it need.

Chundo, any thinking on the fact that non admin user can't target each other with a vote drug?

chundo
06-26-2008, 09:48
It's on my list. I think I have a fundamental misunderstanding of how ProcessTargetString works with non-admins. Targeting logic will be reworked for next version.

Update: Yep (http://forums.alliedmods.net/showthread.php?t=73316). Looks like I'll have to rework the targeting function. Hopefully will have something out by the weekend.

Arcano
06-28-2008, 22:16
i would like to request the ability to have a chat initiated vote to launch a list vote

otherwise if you do not want to do that i could make separate vote functions and have a chat where if its successfull it manually launches a list vote and set the admin level to root or whatever, but this would be more convenient to everyone im sure :D

"Votes"
{
"droptheawp"
{
"title" "Lower the awp?"
"type" "chat"
"cmd" "sm_restrict weapon_awp #1"
"trigger"
{
"command" "droptheawp"
"notice" "%u voted to lower the awp to #1."
"percent" "55"
//"count" "4"
}
"options"
{
"0" "No AWPs"
"1" "1 AWP per team."
}
}

"rocktheawp"
{
"title" "Raise the awp?"
"type" "chat"
"cmd" "sm_restrict weapon_awp #1"
"trigger"
{
"command" "rocktheawp"
"notice" "%u voted to raise the awp to #1."
"percent" "55"
//"count" "4"
}
"options"
{
"2" "Default AWPs"
"3" "3 AWPs per team."
"4" "4 AWPs per team."
}
}
}thats the code/idea im trying to implement into our d2 server. just hit me up with whether you want to add it or not.

chundo
06-29-2008, 04:17
It's already supported. Just change the vote type to "list". All vote types can use triggers to launch the vote; "chat" type votes just bypass that last step.

Binksy
06-29-2008, 12:51
so what is the working votemute cfg please anyone :)

Arcano
06-29-2008, 14:09
roger, good to know, reading through all the settings i figured i couldnt use a chat to open a list, didnt wanna throw onto the pub before working out the bugs, thankyou

Edit: have it running fine except one thing, it was spamming messages 3 times when i tried to vote too early in the map, so i compiled the plugin to fix the error, then i couldnt get the regular delay between votes to work

sm_cvote_playerdelay and also the delay wasnt working properly, ill try the latest snapshot and compile but if you have any other suggestions please let me know.

chundo
06-29-2008, 17:07
The cvar changed to sm_cvote_triggerdelay a few versions ago, I forgot to update the docs. Try that instead.

Arcano
06-29-2008, 17:33
thank you this should work perfectly :up::up:

chundo
06-29-2008, 20:27
Released 0.5.2. This should resolve the targeting issues for votekick/voteban. Also added list-style parameters - this lets you specify a list of possible values for vote parameters that the user can be prompted for via menus. See "Parameters" section in main post for an example.

willy1234x1
07-01-2008, 01:24
Great Job once again Chundo. I just can't wait till I actually start scripting plugins hopefully they'll be half as good as yours.

GriMz
07-02-2008, 17:07
so what is the working votemute cfg please anyone :)

"Votes"
{
"votemute"
{
"title" "mute #1"
"type" "chat"
"command" "sm_mute #1 \"Muted by vote.\""
"trigger"
{
"command" "votemute"
"notice" "%u voted to mute #1"
"percent" "60"
"count" "4"
}
"params"
{
"1" "player"
}
}
}

this is the playervote.cfg i am using.

it isnt hard to set up, but i would have prefered a seperate plug in myself, but lookign back on it, this is more flexible, so may be better anyways.

my question with this plug in is is it capable of sending our rcon commands as well?

chundo
07-02-2008, 18:05
It's all server-side (rcon) commands, since most of these voting commands are for things players could not normally execute on their own.

willy1234x1
07-02-2008, 18:18
If you're trying for a votemute that works like voteban add this to either your basevotes.votes.cfg or funvotes.votes.cfg
"mute"
{
"title" "Mute #1?"
"type" "confirm"
"trigger" "votemute"
"percent" "75"
"votes" "4"
"approve" "admins"
"cmd" "sm_gag #1"
"params"
{
"1" "player"
}
}

GriMz
07-05-2008, 20:25
It's all server-side (rcon) commands, since most of these voting commands are for things players could not normally execute on their own.

thank you, i see a much better use for this now, can it deliver 2 commands at once by chance?

if not maybe i can hack up both plugins and compile them into one..

willy1234x1
07-05-2008, 20:28
so what is the working votemute cfg please anyone :)
It all depends on what you mean by votemute. Do you mean a vote that the admin can start through the admin menu or a chat vote that allows players to vote to mute someone like voteban or votekick?

chundo
07-06-2008, 01:47
thank you, i see a much better use for this now, can it deliver 2 commands at once by chance?

if not maybe i can hack up both plugins and compile them into one..

Sure, just separate commands with a semicolon in the "command" parameter.

Bury
07-07-2008, 14:46
Hi, i want some help in doing this and if it is actually possible (which i'm sure it is)

Basically i wanted an in depth mapvote with categories:
First the users pick from the "options"/categories of say these
"Traditional"
"Fun"
"Skill"
"Deathmatch"

and each of the categories have a .cfg with the mapnames. Once the category gets chosen, it roles out the map names and the users vote for the map, so essentially you are voting twice, i'm not too sure if you can do it in one command option or have it relay onto another, i'm unsure and any help would be appreciated.

chundo
07-07-2008, 17:36
It's possible (well, except for the file reading part - you'll have to hardcode map lists in the vote config), but it's a little messy. This is a very basic example, you'll want to customize the vote options to suit your server, and you'll also need to set sm_vote_delay to "0" since it involves two subsequent votes.

"Votes"
{
"votemap_categories"
{
"title" "Choose a map category"
"command" "sm_cvote votemap_#1"
"options"
{
"traditional" "Traditional"
"fun" "Fun"
"skill" "Skill"
"deathmatch" "Deathmatch"
}
}
"votemap_traditional"
{
"title" "Choose a map"
"command" "changelevel #1"
"options"
{
"cp_dustbowl" "cp_dustbowl"
"pl_goldrush" "pl_goldrush"
... etc ...
}
}
"votemap_fun"
{
... etc ...
}
... etc ...
}

Bury
07-07-2008, 19:42
It works in a sense, but there are a few issues that isn't making the vote complete.

It is reading it as non-continuous votes

For example, they vote for the category and say Skill wins, then it shows that skill won- but no skill maps appear after to be able to vote for. I put it into a .cfg called mapvoting and put this inside it

"Votes"
{
"votemap_categories"
{
"title" "for the next map please choose a category"
"command" "sm_cvote votemap_#1"
"options"
{
"traditional" "Traditional"
"fun" "Surf"
"skill" "Fun/Other"
"deathmatch" "Deathmatch"
}
}
"votemap_traditional"
{
"title" "Choose a traditional map"
"command" "sm_setnextmap #1"
"options"
{
"cp_dustbowl" "cp_dustbowl"
"pl_goldrush" "pl_goldrush"
"cp_gravelpit" "cp_gravelpit"
"ctf_2fort" "ctf_2fort"
"cp_fastlane" "cp_fastlane"
"ctf_turbine" "ctf_turbine"
"cp_badlands" "cp_badlands"
"cp_granary" "cp_granary"
"cp_well" "cp_well"
"tc_hydo" "tc_hydo"
}
}
"votemap_surf"
{
"title" "Choose a surf map"
"command" "sm_setnextmap #1"
"options"
{
"surf_air_arena_v3" "surf_air_arena_v3"
}
}
"votemap_fun"
{
"title" "Choose a fun map"
"command" "sm_setnextmap #1"
"options"
{
"ctf_hallofdeath" "ctf_hallofdeath"
"falling_cp" "falling_cp"
"MARIO_KART" "MARIO_KART"
}
}
"votemap_deathmatch"
{
"title" "Choose a deathmatch map"
"command" "sm_setnextmap #1"
"options"
{
"gpt_classrestrict_tdm" "gpt_classrestrict_tdm"
}
}

}

chundo
07-08-2008, 02:50
Looks like I wasn't resetting the current vote record before executing the command, so it thought the first vote was still taking place and aborted the second vote. It'll be changed in the next release to accommodate multi-level votes.

willy1234x1
07-08-2008, 03:13
You can set it up so it first has a four option vote for your four groups then it that vote initializes a second vote that picks maps from the group.

Bury
07-08-2008, 07:37
You can set it up so it first has a four option vote for your four groups then it that vote initializes a second vote that picks maps from the group.

How? and does it trigger the relevant map pool for the category?

chundo
07-08-2008, 11:08
You can set it up so it first has a four option vote for your four groups then it that vote initializes a second vote that picks maps from the group.

That's what my example did. :) And it won't work yet.

GriMz
07-08-2008, 15:04
Sure, just separate commands with a semicolon in the "command" parameter.

thank you chundo, the players will love this.

mryoung
07-10-2008, 07:41
Hi !

First of all, thanks for this plugin ... Well made!

I would like to create a setnextmap vote based on a custom maplist file ... but I don't get what should be done with the following:

mapcycle - Parameter is a map from the mapcycle. Custom mapcycles can be used by adding a section to maplist.cfg called "cvote_<votename>".

Can you show me an example of what has to be done to achieve this kind of configuration ?

Thanks in advance for your answer.
Cya!

EDIT: Nevermind ... I just find the maplists.cfg file ... I didn't understand that you talk about this sourcemod file

MaximReapage
07-10-2008, 08:31
Would there be any way to get this to be completely stand alone and actually replace the basevotes and funvotes plugin? To be honest, I love the way this plugin is set up, but I don't like the fact that I have to keep basevotes and funvotes in and override them so that not all admins on the server have access to those votes.

chundo
07-10-2008, 11:41
You should be able to just move the basevotes.smx and funvotes.smx plugins to the "disabled" directory, and use Custom Votes for everything.

chundo
07-10-2008, 18:18
Uploaded 0.5.3 in main post.

Changes:
- Fixed votes stalling if they required approval ("approve" config parameter)
- Reset vote pointer earlier to allow chaining together votes (Bury, see if this fixes your problem)

MaximReapage
07-11-2008, 03:11
Not trying to start a flame war or anything, but you would have thought I would have tried that before posting this....

Anyway, no, custom votes completely fails to work at all if at least basevotes.smx is not present. Hence, the reason I'm asking =)

chundo
07-11-2008, 11:31
Not trying to start a flame war or anything, but you would have thought I would have tried that before posting this....

Anyway, no, custom votes completely fails to work at all if at least basevotes.smx is not present. Hence, the reason I'm asking =)

Then no. My server actually crashed when they were missing (although this may have more to do with trying to initiate a vote from console with no players connected, haven't tested in depth yet). But Custom Votes doesn't use any functionality from basevotes, so I'm not sure why there would be a problem.

spacedkadet
07-12-2008, 15:20
Hi, Love the plugin, its very usefull indeed. One thing i am trying to do with it and am atm failing to do is to extend the setnextmap vote to multiple maps (3). As default the setnextmap vote is only for 1 vote but i would like to make a choice of 3 maps to vote for. I have tried a few things but it wont work, i managed to get it to pick from my maplist.txt so all the maps are there to choose from but i cant make 3 choices available. If someone could point me in the right direction that would be great, thank you.Lee.

Kroimpa
07-12-2008, 18:42
I cant get this to work, i unzipped the files from package, set the "count" parameter in playersvotes.cfg to 0 and checked if chat voting was enabled with the cvar, but it doesnt work.
Im running a fresh install of the HL2 Synergy mod, and this plugin would really help me out making the gameplay more fun.
I dont know why it is not working, i restarted the server, joined it and typed in chat votemap and tried votemap "mapname", but i dont get any reaction on the server or console.
I checked if the plugin was loaded and it was , im really confused because it should be working right?
If u have time, could you help me out?

Did i miss something?

Bury
07-14-2008, 10:05
My vote still isn't working, i've attatched the .cfg to see if you can determine what's wrong, and so you can see what is happening first hand.

chundo
07-16-2008, 12:12
Hi, Love the plugin, its very usefull indeed. One thing i am trying to do with it and am atm failing to do is to extend the setnextmap vote to multiple maps (3). As default the setnextmap vote is only for 1 vote but i would like to make a choice of 3 maps to vote for. I have tried a few things but it wont work, i managed to get it to pick from my maplist.txt so all the maps are there to choose from but i cant make 3 choices available. If someone could point me in the right direction that would be great, thank you.Lee.

Try using this configuration - I haven't tested it, but this is roughly the way you'd need to set it up:


"setnextmapmulti"
{
"title" "Which map should be next?"
"type" "list"
"command" "sm_setnextmap #4"
"params"
{
"1" "mapcycle"
"2" "mapcycle"
"3" "mapcycle"
}
"options"
{
"#1" "#1"
"#2" "#2"
"#3" "#3"
}
}

chundo
07-16-2008, 12:14
I cant get this to work, i unzipped the files from package, set the "count" parameter in playersvotes.cfg to 0 and checked if chat voting was enabled with the cvar, but it doesnt work.
Im running a fresh install of the HL2 Synergy mod, and this plugin would really help me out making the gameplay more fun.
I dont know why it is not working, i restarted the server, joined it and typed in chat votemap and tried votemap "mapname", but i dont get any reaction on the server or console.
I checked if the plugin was loaded and it was , im really confused because it should be working right?
If u have time, could you help me out?

Did i miss something?

Does running "sm_cvote votemap" in console do anything?

Bury
07-17-2008, 13:46
Any idea or update to my issue chundo?

abelp
07-21-2008, 05:01
Noob question
how do i make it so all the effects ( player on drugs ) can affect everyone?
I have to manually select everyone to give them timefirebomb.

Thanks..

flubber
07-21-2008, 08:25
define the target as @all

chundo
07-21-2008, 10:06
"target" in config actually just defines who gets to vote on it, not who it affects.

For the vote to affect multiple players, make sure that the appropriate parameter is defined as "groupplayer" rather than just "player", and pass "@all" as the parameter (or select "All" from the menu prompt).

abelp
07-21-2008, 14:05
Sorry 4 my noobness Chundo..
Where to type this?
looked in the .txt found nowhere to put it. I searched for timebomb because i felt if i could find that i may get somewhere.
Didn't find it.

:(

spacedkadet
07-21-2008, 18:00
Try using this configuration - I haven't tested it, but this is roughly the way you'd need to set it up:


"setnextmapmulti"
{
"title" "Which map should be next?"
"type" "list"
"command" "sm_setnextmap #4"
"params"
{
"1" "mapcycle"
"2" "mapcycle"
"3" "mapcycle"
}
"options"
{
"#1" "#1"
"#2" "#2"
"#3" "#3"
}
}


It sort of works but not quite, firstly it doesnt setnextmap it just tells you what won the vote like a question vote and secondly is there a way to make it pick from my maplist.txt instead of the limited mapcycle?

thanks,

Lee.

mryoung
07-26-2008, 08:31
Hi there,

I just did a French translation ... If you're interested, see attached file.

Cya!

chundo
07-26-2008, 10:05
It sort of works but not quite, firstly it doesnt setnextmap it just tells you what won the vote like a question vote and secondly is there a way to make it pick from my maplist.txt instead of the limited mapcycle?

thanks,

Lee.

See the original post for info on customizing the mapcycle.

If it doesn't execute the command it sounds like you have an error somewhere. Did you check your console or logs?

Kroimpa
07-30-2008, 11:29
Hey chundo!
Awesome plugin man, but i missed something when i set up my votes.
There is no cvar that sets the minimum ratio of players on the server that must vote.
So with my total noobass i modded sm_cvote_votepercent into your existing mod and i tested it on list, confirm and chat type of votes, chat type seems to be not working properly somehow.
But anyway just wanted to shate it with u.

OziOn
07-30-2008, 19:42
Thanks for an awesome plugin.
Though, I seem to be having one small issue... Every time someone triggers a vote, it spams the "notice" a whole lot. The number of "spam" messages seems to increase by the number of map changes. In fact, the issue seems to be very similar to the one with Olly's most recent version of his IRC plugin... ( http://forums.alliedmods.net/showthread.php?p=650083#post650083 )
Has anyone else been having this problem, and does anybody know how to fix it, if possible?

willy1234x1
07-30-2008, 20:35
Thanks for an awesome plugin.
Though, I seem to be having one small issue... Every time someone triggers a vote, it spams the "notice" a whole lot. The number of "spam" messages seems to increase by the number of map changes. In fact, the issue seems to be very similar to the one with Olly's most recent version of his IRC plugin... ( http://forums.alliedmods.net/showthread.php?p=650083#post650083 )
Has anyone else been having this problem, and does anybody know how to fix it, if possible?
I did but it disappeared once I disabled the file that conflicted with players vote.

OziOn
07-30-2008, 20:40
I did but it disappeared once I disabled the file that conflicted with players vote.
Which file might that be?

willy1234x1
07-30-2008, 20:48
playervotes.cfg inside the sourcemod/configs/custom votes folder.

OziOn
07-30-2008, 20:55
Hm, that one I already deleted. Only got core.vote.cfg in that folder.

Bury
07-31-2008, 12:56
I decided to redo my mapvoting style, but i bump into another issue

If Traditional wins, it executes mapvoting_traditional
but i get this problem, it gets as far as executing and it doesn't appear, chaining votes is still bugged?
L 07/31/2008 - 16:44:46: [customvotes.smx] KILLBOT<2><STEAM_0:1:2537786><> initiated a Voting vote
L 07/31/2008 - 16:44:47: [customvotes.smx] "Traditional" (traditional) won with 100% of the vote (1 votes)
L 07/31/2008 - 16:44:47: [customvotes.smx] Executing "sm_cvote mapvoting_"traditional""It doesn't work because the #1 tag converts the command to contain speech marks, is there a way around this?Fixed by replacing with @, sorry but this may be for use with anyone else.

Is there a way to trigger the vote automatically after a timelimit or before maxrounds is reached?

chundo
07-31-2008, 14:26
Thanks for an awesome plugin.
Though, I seem to be having one small issue... Every time someone triggers a vote, it spams the "notice" a whole lot. The number of "spam" messages seems to increase by the number of map changes. In fact, the issue seems to be very similar to the one with Olly's most recent version of his IRC plugin... ( http://forums.alliedmods.net/showthread.php?p=650083#post650083 )
Has anyone else been having this problem, and does anybody know how to fix it, if possible?

I've seen this too, but I couldn't figure out what the number of messages were related to. Map changes, huh - thanks for giving me a starting point, I'll look into it again.

chundo
07-31-2008, 14:28
Fixed by replacing with @, sorry but this may be for use with anyone else.

Is there a way to trigger the vote automatically after a timelimit or before maxrounds is reached?

No, sorry. I think that should be a job for a different plugin - I want to keep this to just the necessities for voting.

chundo
07-31-2008, 14:46
The multi-message thing is due to calling HookEvent / HookConVarChange in OnConfigsExecuted(), which I did not realize was being called once per map change. I'll have an update shortly (it affects my other plugins too, thanks for catching it).

chundo
07-31-2008, 15:40
Chat spam fixed.

cLutch
08-01-2008, 00:02
Is there a way to disable votealltalk/votemap but keep voteban/votekick/votemute enabled?

chundo
08-01-2008, 01:59
Remove them from the config files?

OziOn
08-01-2008, 06:43
Chat spam fixed.
Nice!
Thanks for the fast support :P

HanoverFist
08-03-2008, 09:01
I know this is a real simple question. But how do I get it to use the maplist.txt instead of the mapcycle? We want the server to automatically change maps using the mapcycle but voting and setnextmap and things to use the mapslist

gH0sTy
08-07-2008, 09:49
I've a problem with my votealltalk (it's the only vote I actually use).
So when I type votealltalk in the chat window it shows me saying "votealltalk", the vote window comes up and all you can see is:
1 On
2 Off
0 Exit

There's no Title displayed which type of vote it is, also there's no notice displayed.
Here's my cvar.vote.cfg
"Votes"
{
"votealltalk"
{
"title" "Turn alltalk #1?"
"type" "chat"
"command" "sv_alltalk #1"
"trigger"
{
"command" "votealltalk"
"notice" "%u wants to turn alltalk #1"
"percent" "60"
"expires" "180"
}
"params"
{
"1" "onoff"
}
}
}Any ideas somebody ?


I know this is a real simple question. But how do I get it to use the maplist.txt instead of the mapcycle? We want the server to automatically change maps using the mapcycle but voting and setnextmap and things to use the mapslist
Have you tried maplist in params instead of mapcycle ?

chundo
08-07-2008, 10:42
I know this is a real simple question. But how do I get it to use the maplist.txt instead of the mapcycle? We want the server to automatically change maps using the mapcycle but voting and setnextmap and things to use the mapslist

You'll need to add a new entry to maplists.cfg in sourcemod's config/ directory which uses maplist.txt instead of mapcycle.txt. The new section should be called "cvote_<votename>" as detailed in the main post.

chundo
08-07-2008, 10:44
ghosty - it's prompting you for a parameter, and since parameters don't have descriptive names in the config, there's no way for it to create a sensible title. In this case, isn't it fairly apparent what it's asking for since you just typed "votealltalk" though?

gH0sTy
08-07-2008, 11:00
ghosty - it's prompting you for a parameter, and since parameters don't have descriptive names in the config, there's no way for it to create a sensible title. In this case, isn't it fairly apparent what it's asking for since you just typed "votealltalk" though?
Yes it's of course apparent for me as I initiated the Vote but it's not apparent for the others if they don't notice the chat cause they're in heavy action.
Finally what is
"title" "Turn alltalk #1?"and
"notice" "%u wants to turn alltalk #1"for if it doesn't show up anywhere.
To me it looks like I can specify a title for my vote menu but it's not used by the plugin.

chundo
08-07-2008, 11:14
Yes, but that doesn't show up to others - just to you, asking what YOU want alltalk to be. It's not initiating a regular menu vote, it's a chat-type vote.

In order for other players to take part in a chat-type vote, they must also type "votealltalk" and select whether they want it to be on or off. If you want it to launch a regular menu vote, look in configs/customvotes/disabled/funvotes.vote.cfg for an example.

"notice" "%u wants to turn alltalk #1"

This is displayed in chat AFTER you select the parameter value. %u is replaced with your player name. So, it would say "ghosty wants to turn alltalk on" in chat after you select "On". The "title" parameter is not used in chat-type votes since it never displays a full vote menu.

gH0sTy
08-07-2008, 11:34
Ok, got it :idea:... thx

Crap
08-07-2008, 15:40
You'll need to add a new entry to maplists.cfg in sourcemod's config/ directory which uses maplist.txt instead of mapcycle.txt. The new section should be called "cvote_<votename>" as detailed in the main post.

This doesn't seem to work. I'm not certain if I am making a mistake somewhere, or just misunderstanding what is possible.

If I add a section to maplists.cfg like below:

/* For the "customvotes" plugin */
"cvote_funmaps"
{
"file" " /* For the "customvotes" plugin */
"cvote_funmaps"
{
"file" "votefunmaps.txt"
}"
}This should have the "funmaps" vote only use the list of maps in votefunmaps.txt (as a test I have three maps in there) correct?

Because this doesn't work. It still reads from whatever the default mapcycle location/file is.

chundo
08-07-2008, 16:51
Is that copied and pasted from your maplists.cfg? Because it looks like you have some syntax problems there.

Badi
08-07-2008, 20:26
Hi all!

I have the same problems. My "normal" mapcycle only list ctf_2fort as map. For voting i would like to use a special maplist. Everytime i do a "votemap" only ctf_2fort is listet in menu.. Scrennshots attached.

Any help?

Badi

HanoverFist
08-07-2008, 21:43
this is what i put in, doesnt work


/* For the customvotes plugin */
"cvote_votemap"
{
"file" "maplist.txt"
}

Crap
08-07-2008, 22:16
Is that copied and pasted from your maplists.cfg? Because it looks like you have some syntax problems there.

It was supposed to be a direct copy but somehow the copy on the board had a couple of extra characters.

Should be:



/* For the "customvotes" plugin */
"cvote_funmaps"
{
"file" "votefunmaps.txt"
}


Does this have syntax problems as well, because I literally just copied one of the entries for the default plugins and changed the votename and filename?

Assuming there are no errors in the syntax above, does this work for other people? Possibly not working because I have several of the default plugins disabled?

spacedkadet
08-08-2008, 02:34
I also can't get it to pick from my maplist.txthere is what i have: first the vote:

"Votes"
{
"setnextmapmulti"
{
"title" "Build next map vote?"
"type" "list"
"command" "sm_setnextmap #4"
"params"
{
"1" "mapcycle"
"2" "mapcycle"
"3" "mapcycle"
}
"options"
{
"#1" "#1"
"#2" "#2"
"#3" "#3"
}
}
}
now my maplists.cfg


/* For the Custom Votes plugin */
"cvote_setnextmap"
{
"target" "maplist.txt"
}

/* For the Custom Votes plugin */
"cvote_setnextmapmulti"
{
"target" "maplist.txt"
}

/* For the Custom Votes plugin */
"cvote_sm_setnextmap"
{
"target" "maplist.txt"
}

There are 3 sections there that i have added one at a time but i just cannot get it to work. I would of thought one of those should work but nope. the maplist.txt file is there and upto date becuse the rest of my entrties work - like this one:


/* Admin menu, map voting menu */
"sm_setnextmap menu"
{
"file" "maplist.txt"
}

works fine.Any ideas??

Lee.

Guardia Republicano
08-10-2008, 03:02
My playervotes.cfg

"votemap"
{
"title" "Change map to #1?"
"type" "chat"
"command" "changelevel #1"
"trigger"
{
"command" "votemap"
"notice" "%u wants to change the map to #1"
"delay" "300"
"percent" "60"
"count" "4"
}
"params"
{
"1" "mapcycle"
}
}
My maplists.cfg


"cvote_votemap"
{
"file" "maplist.txt"
}
It is not working.
I am using maplist because I want all maps in my server available to vote by players.

Chundo:
Have you tried the votemap with a custom file?

I have read many posts about this issue and no success.

Regards,
Pablo.

Ballerman23
08-12-2008, 13:24
warum kann ein admin den vote erstellen und wenn gewonnen, jeder andere admin auf dem Server den vote nicht annehmen, reicht es nicht wenn ein admin den vote animmt

chundo
08-13-2008, 12:45
warum kann ein admin den vote erstellen und wenn gewonnen, jeder andere admin auf dem Server den vote nicht annehmen, reicht es nicht wenn ein admin den vote animmt

I don't speak German and Google's translation is not very clear either - please post in English if you need help with something. Thanks!

Guardia Republicano
08-13-2008, 20:16
I don't speak German and Google's translation is not very clear either - please post in English if you need help with something. Thanks!

Why don't you answer any post about custom mypcycle?
We need support. Nobody could succeed.

chundo
08-14-2008, 00:35
Why don't you answer any post about custom mypcycle?
We need support. Nobody could succeed.

1. I've answered posts about custom mapcycles from others. And your last message was the first you posted on this.
2. This issue will take testing and bugfixing time I don't have at the moment.

If you want to write a patch to fix it, I'll happily include it. Otherwise, be patient until I have time for it.

Guardia Republicano
08-14-2008, 08:59
1. I've answered posts about custom mapcycles from others. And your last message was the first you posted on this.
2. This issue will take testing and bugfixing time I don't have at the moment.

If you want to write a patch to fix it, I'll happily include it. Otherwise, be patient until I have time for it.

1. I could not find a post where you said that a patch is needed to fix custom mapcycles.
It was my first post because I just find the answer: "read documentation at first post" about custom mapcycles.
I did not know if I was making a mistake or there was a bug.

2. Ok, that is I wanted to know. There is an issue and you are aware of that.

Of course I can wait now you are aware of the issue and you gave an answer about that.

Thanks.

Badi
08-14-2008, 13:24
Found a workaround for this Problem:

The section in maplists.cfg MUST be named "sm_cvote"! Example:

/* For the custom vote plugin */
"sm_cvote"
{
"file" "addons/sourcemod/configs/cvmaps.txt"
}Looks like its hardcoded in the plugin (i think):

ReadMapList(g_mapList, g_mapSerial, "sm_cvote", MAPLIST_FLAG_CLEARARRAY);Badi

Crap
08-14-2008, 17:35
Found a workaround for this Problem:

The section in maplists.cfg MUST be named "sm_cvote"! Example:

/* For the custom vote plugin */
"sm_cvote"
{
"file" "addons/sourcemod/configs/cvmaps.txt"
}Looks like its hardcoded in the plugin (i think):

ReadMapList(g_mapList, g_mapSerial, "sm_cvote", MAPLIST_FLAG_CLEARARRAY);Badi

That limits you to only being able to define one file which the plugin will read from doesn't it?

If you want to do multiple votes reading from separate files, it's still impossible with the current plugin right?

Guardia Republicano
08-14-2008, 18:35
Found a workaround for this Problem:

The section in maplists.cfg MUST be named "sm_cvote"! Example:

/* For the custom vote plugin */
"sm_cvote"
{
"file" "addons/sourcemod/configs/cvmaps.txt"
}Looks like its hardcoded in the plugin (i think):

ReadMapList(g_mapList, g_mapSerial, "sm_cvote", MAPLIST_FLAG_CLEARARRAY);Badi

You are right!
It was not working because of the hardcode.
Have I tried your solution and it is working now. :up:

Thanks a lot.

chundo
08-14-2008, 18:57
Interesting - that must be a sourcemod enforced thing. Try "sm_cvote cvote_<votename>" then and see if it works.

Badi
08-15-2008, 05:26
Interesting - that must be a sourcemod enforced thing. Try "sm_cvote cvote_<votename>" then and see if it works.

Had no luck with this at an first attempt...

Badi
08-15-2008, 05:31
That limits you to only being able to define one file which the plugin will read from doesn't it?

If you want to do multiple votes reading from separate files, it's still impossible with the current plugin right?

Yes i think so.

Nomarky
08-17-2008, 18:24
Hi

I'm trying to add a gravity vote to the votemenu, using this code:
"gravity"
{
"title" "Gravity Vote"
"type" "list"
"cmd" "sv_gravity #1"
"options"
{
"200" "200"
"250" "250"
"375" "375"
"600" "600"
"800" "800"
}
}The vote shows up fine, but only seems to need 1 vote to change the grav: [customvotes.smx] "250" (250) won with 100% of the vote (1 votes). There were 4 players on the server at the time of this vote. sm_cvote_minpercent is set to 60. If sm_cvote_minvotes is set to 0, does this mean a vote is won by only one vote, regardless of how many players are on the server? I like to keep minimum number of votes to 1 at most so lone players can still votemap.

Or am I missing something?

Isias
08-18-2008, 08:23
German Translation added - see attachment

omgiafs
08-22-2008, 10:15
Little question - how to make a delay after end of vote ?

Because after successful votemap winning map immediately changes, so users can't see nothing about the voting results. How make delay after end of vote, like PlayersVotes do ?

playervotes.cfg
"Votes"
{
"votemap"
{
"title" "Change map to #1?"
"type" "chat"
"command" "changelevel #1"
"trigger"
{
"command" "votemap"
"notice" "%u wants to change the map to #1"
"delay" "300"
"percent" "55"
"count" "0"
}
"params"
{
"1" "mapcycle"
}
}
"extend"
{
"title" "Extend current map 20 minutes?"
"type" "confirm"
"trigger"
{
"command" "voteextend"
"delay" "120"
}
"command" "sm_extend 20"
}
"votekick"
{
"title" "Kick #1?"
"type" "chat"
"command" "sm_kick #1 \"Kicked by vote.\""
"trigger"
{
"command" "votekick"
"notice" "%u voted to kick #1"
"percent" "60"
"count" "3"
}
"params"
{
"1" "player"
}
}
"votemute"
{
"title" "Mute #1?"
"type" "chat"
"command" "sm_mute #1"
"trigger"
{
"command" "votemute"
"notice" "%u voted to mute #1"
"percent" "30"
"count" "3"
}
"params"
{
"1" "player"
}
}
"votealltalk"
{
"title" "Turn alltalk #1?"
"type" "chat"
"command" "sv_alltalk #1"
"trigger"
{
"command" "votealltalk"
"notice" "%u wants to turn alltalk #1"
"percent" "60"
}
"params"
{
"1" "onoff"
}
}
}

plugin.customvotes.cfg
sm_cvote_showstatus "3"
sm_cvote_triggers "1"
sm_cvote_triggerdelay "10"
sm_cvote_mapdelay "10"
sm_cvote_minpercent "60"
sm_cvote_minvotes "1"
sm_cvote_resetonmapchange "0"

Nomarky
08-23-2008, 06:57
Is it possible to set up this plugin so it works only by percentage of players voting, without needing a minimum number of players set? I would like to set the percentage to 60%, so regardless of how many players are on the server 60% need to vote yes (or w/e) for the vote to be carried. Then if only one player is on, they can successfully vote to change map etc

Crap
08-23-2008, 08:01
Is it possible to set up this plugin so it works only by percentage of players voting, without needing a minimum number of players set? I would like to set the percentage to 60%, so regardless of how many players are on the server 60% need to vote yes (or w/e) for the vote to be carried. Then if only one player is on, they can successfully vote to change map etc

Set the minimum number players required to 1? I don't imagine there will be many votes with 0 players on the server :wink:

Nomarky
08-23-2008, 09:32
Set the minimum number players required to 1? I don't imagine there will be many votes with 0 players on the server :wink:

But then it seems only one player has to vote for the vote to be won?!?

Crap
08-24-2008, 00:47
But then it seems only one player has to vote for the vote to be won?!?

Is that right? I thought that it was the minimum number of players required for a vote to take place, not a number of players needed for the vote to win?

Nomarky
08-24-2008, 07:27
Is that right? I thought that it was the minimum number of players required for a vote to take place, not a number of players needed for the vote to win?

"sm_cvote_minvotes" = "0"
- Minimum number of votes the winner must receive to be considered the winner.

"sm_cvote_minpercent" = "60"
- Minimum percentage of votes the winner must receive to be considered the winner.


I had hoped by setting minvotes to 0 would mean all votes are won/lost by percentage, but it doesn't seem to work like that for me...

Crap
08-24-2008, 09:03
"sm_cvote_minvotes" = "0"
- Minimum number of votes the winner must receive to be considered the winner.

"sm_cvote_minpercent" = "60"
- Minimum percentage of votes the winner must receive to be considered the winner.


I had hoped by setting minvotes to 0 would mean all votes are won/lost by percentage, but it doesn't seem to work like that for me...

Sorry, I didn't realize you were talking about the cvar. Setting it to 0, or rather leaving it at 0 since that is the default, does work that way for me. Are you maybe setting the "votes" or "count" parameters in the individual votes?

Nomarky
08-24-2008, 10:55
I removed all percentages and minvotes from the cfg, and that seems to have made it work better.

The problem I've found now is that if I votemap from chat, votemap doesn't show for other players unless they say votemap themselves. Once they do it seems to work as expected.

If I select votemap form the votemenu however, it changes map as soon as I select a map, without asking the other players on the server to vote.

Getting very confused now...

Crap
08-24-2008, 12:20
I removed all percentages and minvotes from the cfg, and that seems to have made it work better.

The problem I've found now is that if I votemap from chat, votemap doesn't show for other players unless they say votemap themselves. Once they do it seems to work as expected.

If I select votemap form the votemenu however, it changes map as soon as I select a map, without asking the other players on the server to vote.

Getting very confused now...

Set the votemap vote type to "confirm". That will show everyone a yes-no prompt.

Nomarky
08-24-2008, 12:28
Ahh, now I see. I'll test this tonight.

Thanks!

Edit: The confirm type worked great thanks. Problem I still have is that sm_cvote_minpercent only seems to apply to votes cast, not number of players on the server, so 1 vote can still change map if no other players vote. Is there any chance of an update to the voting system, to include a setting for ratio of players on the server?

mpain55
08-24-2008, 23:22
sm_vote_delay not saving after map change

Once the map change vote delay goes back to 30 seconds.

I want it to stay at 420 seconds. I looked in every source file involving basvotes and i couldn't find a place to edit the default time anywhere. Also the delay "300" on the customvote's votes are really a 30 second delay not 300 delay.

How do i change the defaulted 30 seconds via a source or config file so that the delay time i want isn't reset every map change?

chundo
08-25-2008, 09:31
sm_vote_delay is not created or set by Custom Votes - it is part of Base Votes, and Custom Votes just reads it. SM defaults it to 30, so you need to set it in your sourcemod.cfg or server.cfg if you don't want that.

chundo
08-25-2008, 13:17
Wow, I completely misread Badi's response awhile back. Turns out I'm a moron, and the mapcycle fix will be easy. Should have a new version out soon.

chundo
08-25-2008, 18:34
Version 0.5.5 released.

- Fixes custom mapcycle feature
- Adds configurable delay before executing commands after a vote
- Adds "abspercent" configuration directive to require a vote pass with a percentage of all in-game players, not just those that voted

See main post for details.

curlefry
08-25-2008, 21:13
Quick question:

When using !votemenu, (Let's say we're voting to ban someone for 30 minutes.) it shows a nice little menu to every player..."Would you like to ban X for X minutes?"

When I type voteban in chat, it does something totally different...It makes it to where EVERYONE has to type in voteban and choose the player I did. How do I fix that?

Crap
08-26-2008, 08:24
Quick question:

When using !votemenu, (Let's say we're voting to ban someone for 30 minutes.) it shows a nice little menu to every player..."Would you like to ban X for X minutes?"

When I type voteban in chat, it does something totally different...It makes it to where EVERYONE has to type in voteban and choose the player I did. How do I fix that?

Change vote type to "confirm".

chundo
08-26-2008, 11:00
Quick question:

When using !votemenu, (Let's say we're voting to ban someone for 30 minutes.) it shows a nice little menu to every player..."Would you like to ban X for X minutes?"

When I type voteban in chat, it does something totally different...It makes it to where EVERYONE has to type in voteban and choose the player I did. How do I fix that?

Well, there's actually two different vote methods for banning. The chat vote (typing "voteban") is meant to duplicate behavior familiar to users from other voteban systems, whereas launching it from the admin or votes menu initiates a regular vote. It only shows up in the menu for admins that have permission to run it though, right?

But yes, you can change it to a "confirm" vote and lower the trigger percentage if you want it to show a normal vote to users after a certain number of users request a ban via chat.

HanoverFist
08-31-2008, 10:17
do I still need Badi's work around to get it to use a map file other than the mapcycle? I was wondering because since we redid the server the work around doesn't work either

chundo
08-31-2008, 11:15
Latest version fixed custom mapcycles. The directions in the original post work now.

HanoverFist
08-31-2008, 12:48
I've tried it like this to get it to use a cvmaps.txt

/* For the custom vote plugin */
"sm_cvote"
{
"file" "addons/sourcemod/configs/cvmaps.txt"
}
I've tried it like this to use the maps.ini file

/* For the custom vote plugin */
"sm_cvote"
{
"file" "addons/sourcemod/configs/maps.ini"
}
and I've tried it like this to use the maplist.txt

/* For the custom vote plugin */
"sm_cvote"
{
"file" "maplist.txt"
}

nothing seems to be working for me. Any ideas?

Crap
08-31-2008, 15:40
I've tried it like this to get it to use a cvmaps.txt

/* For the custom vote plugin */
"sm_cvote"
{
"file" "addons/sourcemod/configs/cvmaps.txt"
}
I've tried it like this to use the maps.ini file

/* For the custom vote plugin */
"sm_cvote"
{
"file" "addons/sourcemod/configs/maps.ini"
}
and I've tried it like this to use the maplist.txt

/* For the custom vote plugin */
"sm_cvote"
{
"file" "maplist.txt"
}

nothing seems to be working for me. Any ideas?

It works beautifully for me after the update. You have installed the updated version right?

I'd suggest adding the votename. My base vote is "votemap" so I have:

"votemap"
{
"title" "Votemap #1?"
"type" "confirm"
"cmd" "changelevel #1"
"percent" "60"
"trigger"
{
"command" "votemap"
"notice" "%u wants to change the map to #1"
"delay" "300"
}
"params"
{
"1" "mapcycle"
}
}

In the vote.cfg, and

/* For the "customvotes" plugin */
"sm_cvote votemap"
{
"file" "maplist.txt"
}

in maplists.cfg. Works perfect. I've got separate votes reading from different map files for almost every type of map (cp, ctf, etc.).

Cheers for the great plugin Chundo :up:

HanoverFist
08-31-2008, 17:17
ok i have this in my maplist.cfg

"MapLists"
{
/**
* Default requests go right to the mapcyclefile.
*/
"default"
{
"target" "mapcyclefile"
}

/* Admin menu, map menu */
"sm_map menu"
{
"file" "addons/sourcemod/configs/adminmenu_maplist.ini"
}

/* Admin menu, map voting menu */
"sm_votemap menu"
{
"file" "addons/sourcemod/configs/adminmenu_maplist.ini"
}

/* For the "randomcycle" plugin */
"randomcycle"
{
"target" "default"
}

/* For the "mapchooser" plugin */
"mapchooser"
{
"target" "default"
}

/* For the "rockthevote" plugin */
"rockthevote"
{
"target" "default"
}

/* For the "customvotes" plugin */
"sm_cvote votemap"
{
"file" "maplist.txt"
}
}





and this is in my playervotes.cfg

"Votes"
{
"voteban"
{
"title" "Ban #1 for 30 minutes?"
"type" "chat"
"command" "sm_ban_auto #1 30 \"Banned by vote.\""
"trigger"
{
"command" "voteban"
"notice" "%u voted to ban #1"
"percent" "70"
"count" "4"
}
"params"
{
"1" "player"
}
}
"votekick"
{
"title" "Kick #1?"
"type" "chat"
"command" "sm_kick #1 \"Kicked by vote.\""
"trigger"
{
"command" "votekick"
"notice" "%u voted to kick #1"
"percent" "70"
"count" "4"
}
"params"
{
"1" "player"
}
}
"votemute"
{
"title" "Mute #1?"
"type" "chat"
"command" "sm_mute #1"
"trigger"
{
"command" "votemute"
"notice" "%u voted to mute #1"
"percent" "70"
"count" "4"
}
"params"
{
"1" "player"
}
}
"votealltalk"
{
"title" "Turn alltalk #1?"
"type" "chat"
"command" "sv_alltalk #1"
"trigger"
{
"command" "votealltalk"
"notice" "%u wants to turn alltalk #1"
"percent" "60"
}
"params"
{
"1" "onoff"
}
}
"votemap"
{
"title" "Change map to #1?"
"type" "chat"
"command" "changelevel #1"
"trigger"
{
"command" "votemap"
"notice" "%u wants to change the map to #1"
"delay" "300"
"percent" "60"
"count" "4"
}
"params"
{
"1" "mapcycle"
}
}
}


and still it will only use my mapcycle.txt

Sorry for being a pain to you guys. Oh and yeah it's the latest version. Was wondering why there was a zip file inside the zip file of the plugin.

Crap
08-31-2008, 21:17
ok i have this in my maplist.cfg

[snip]and still it will only use my mapcycle.txt

Sorry for being a pain to you guys. Oh and yeah it's the latest version. Was wondering why there was a zip file inside the zip file of the plugin.



hmm, sorry, dunno. It works fine for me like that now, I suppose you'll have to wait for a more authoritative answer.


Dunno what the embedded zip files are about either. I am using the one in the main (not the embedded) zip. Never even bothered opening the second zip till I just read your message :shock:

omgiafs
08-31-2008, 21:17
About delay after voting complete.
There is no delay needed for voteban and votekick, for example. But it needs for votemap, or some other votes.

So i think that delay after voting complete must be optional for every vote.
If it will be included in vote config triggers (like command, delay, percent, count, expiers), it will be great.

chundo
09-01-2008, 02:05
The second zip was a result of botched automated packaging I guess. Just ignore it.

Not sure what to tell you on the mapcycles. Works fine for me now, and others apparently...

xYx
09-01-2008, 11:05
ok i have this in my maplist.cfg

"MapLists"
{
/**
* Default requests go right to the mapcyclefile.
*/
"default"
{
"target" "mapcyclefile"
}

/* Admin menu, map menu */
"sm_map menu"
{
"file" "addons/sourcemod/configs/adminmenu_maplist.ini"
}

/* Admin menu, map voting menu */
"sm_votemap menu"
{
"file" "addons/sourcemod/configs/adminmenu_maplist.ini"
}

/* For the "randomcycle" plugin */
"randomcycle"
{
"target" "default"
}

/* For the "mapchooser" plugin */
"mapchooser"
{
"target" "default"
}

/* For the "rockthevote" plugin */
"rockthevote"
{
"target" "default"
}

/* For the "customvotes" plugin */
"sm_cvote votemap"
{
"file" "maplist.txt"
}
}





and still it will only use my mapcycle.txt

Sorry for being a pain to you guys. Oh and yeah it's the latest version. Was wondering why there was a zip file inside the zip file of the plugin.

/* For the "customvotes" plugin */
"sm_cvote setnextmap"
{
"file" "maplist.txt"
}

Hi, I copied what you had into my maplist.cfg and the votemap option does nothing. I changed it to setnextmap and then the set next map to? option changed!!!!!!! This is all I wanted to do, is this what u wanna do?[/code

Crap
09-01-2008, 23:21
If you attach your mapcycle and vote files I'll try swapping them out with mine when my server is empty and seeing if they work on my install.

HanoverFist
09-02-2008, 06:03
31021

31022


31023

Here you go, and thanks

Crap
09-02-2008, 07:24
31021

31022


31023

Here you go, and thanks


Votemap works fine for me, which means it's not your config or mapcycle settings.

My first guess, and the easiest thing to figure out, is that maybe something else is grabbing the "votemap" trigger? Do you have another mod installed, like Beetle's or Mani, or maybe the default votemap plugin still enabled? If you use the votemap option from the admin menu does it work?

If that isn't the cause, I'd say either the plugin version is wrong (I know you said you're running the latest, but I'd delete it, redownload and reinstall just to be sure) or maybe something is up with the version of sourcemod you are running.

Also make sure you are putting the maps you want available for the vote into the maplist.txt that is just inside the TF folder (actually, are you running a TF server? I don't recall if you mentioned what game you are trying to get this working for), one map to a line, just the map name, no .bsp extensions.

Try testing a different vote using a file other than maplist.txt to see if you can get it working at all.

For example (assuming you are running tf2), make a mapsfun.txt and add the following to it:
cp_granary
cp_dustbowlthen add this to your vote.cfg (whichever)
"funmaps"
{
"title" "Change to FUNmap #1?"
"type" "confirm"
"command" "changelevel #1"
"abspercent" "60"
"trigger"
{
"command" "votefun"
"delay" "300"
}
"params"
{
"1" "mapcycle"
}
}and this to your maplist.cfg
/* For the "customvotes" plugin */
"sm_cvote funmaps"
{
"file" "mapsfun.txt"
}Then restart the server and type "votefun" in chat and see if a vote comes up with just granary and dustbowl available.

mpain55
09-02-2008, 16:31
Is it possible to make a vote that only players with reserved slots can intiate? there is no such thing as sm_reservation so how whould i go about doing that? And i can't give them kick, or slay permission for obvious reasons.

HanoverFist
09-02-2008, 17:06
Well could it be mapchooser and rockthevote.. also I've updated sourcemod 1.1 since and hasn't change the way it's working. oh yeah i'm running a tf2 server all i have is sourcemod installed.

chundo
09-02-2008, 20:52
rockthevote and mapchooser shouldn't matter; do you have PlayersVotes installed?

HanoverFist
09-02-2008, 21:44
i have playersvotes and core.votes installed. . since we redid the server it hasn't worked.

chundo
09-03-2008, 01:02
I'm not referring to the playersvotes.vote.cfg file, I'm talking about the completely separate PlayersVotes plugin.

HanoverFist
09-03-2008, 05:44
ok i'm sorrry. this is the only plugin for voting that i have installed

Crap
09-03-2008, 06:11
ok i'm sorrry. this is the only plugin for voting that i have installed

Try changing the trigger for your map vote in the vote cfg to something other than votemap, preferably something no other plugin etc. would ever use just to test that the trigger isn't being caught by something else ("votehamburger" or something).

HanoverFist
09-03-2008, 17:55
ok I got it to work

to get Change next map to <map>?
i did this in the maplist.cfg

/* For the "customvotes" plugin */
"sm_cvote changelevel"
{
"file" "maplist.txt"
}to get Set next map to <map>?
i did this to the maplist.cfg

/* For the "customvotes" plugin */
"sm_cvote setnextmap"
{
"file" "maplist.txt"
}
I know this is probably not the right way but it works.

Ska
10-12-2008, 09:58
Explain please how to get voteban, votekick, voteslay, votemute and other similar to work for simple players. I have only playervotes.vote.cfg in customvotes folder.

for example thats my voteban and votekick part of playervotes.vote.cfg

"voteban"
{
"title" "Ban #1 for 30 minutes?"
"type" "chat"
"command" "sm_ban #1 30 \"Banned with voteban.\""
"trigger"
{
"command" "voteban"
"notice" "%u voted to ban #1"
"percent" "70"
"count" "4"
}
"params"
{
"1" "player"
}
}
"votekick"
{
"title" "Kick #1?"
"type" "chat"
"command" "sm_kick #1 \"Kiked by votekick.\""
"trigger"
{
"command" "votekick"
"notice" "%u voted to kick #1"
"percent" "70"
"count" "4"
}
"params"
{
"1" "player"
}
}


When choosing name from list of players SM says "No matching client was found"

Nomarky
10-12-2008, 10:35
Still having trouble getting this plugin working the way I would like.

Basically if a player starts a votemap, the other players get a menu with the options yes and no, but without an indication of which map they are voting for. How can I set it up to work like that?

Playervotes.cfg:

"votemap"
{
"title" "Vote Map"
"type" "list"
"abspercent" "40.0"
"command" "changelevel #1"
"trigger"
{
"command" "votemap"
"notice" "%u wants to change the map to #1"
"delay" "30"
}
"params"
{
"1" "mapcycle"
}
}

Crap
10-12-2008, 11:01
Explain please how to get voteban, votekick, voteslay, votemute and other similar to work for simple players. I have only playervotes.vote.cfg in customvotes folder.

for example thats my voteban and votekick part of playervotes.vote.cfg

"voteban"
{
"title" "Ban #1 for 30 minutes?"
"type" "chat"
"command" "sm_ban #1 30 \"Banned with voteban.\""
"trigger"
{
"command" "voteban"
"notice" "%u voted to ban #1"
"percent" "70"
"count" "4"
}
"params"
{
"1" "player"
}
}
"votekick"
{
"title" "Kick #1?"
"type" "chat"
"command" "sm_kick #1 \"Kiked by votekick.\""
"trigger"
{
"command" "votekick"
"notice" "%u voted to kick #1"
"percent" "70"
"count" "4"
}
"params"
{
"1" "player"
}
}
When choosing name from list of players SM says "No matching client was found"

Does that method bring up the menu for everyone voting, or does everyone have to type in the name themselves? I use nearly the same vote, except I use

"type" "confirm"instead of

"type" "chat"
Doing it that way it brings up the menu with the player list for the person who initiates the ban, and all the other players just get a "ban #1? Yes No" menu.

Also the actual command to be executed on mine is written as
"cmd" "sm_ban #1 30 \"Banned by vote.\""not "command", since that is used again in the parameters section. Not sure if that's a problem or not.

Here's my voteban, kick and mute votes:



"voteban"
{
"title" "Ban #1 for 30 minutes?"
"type" "confirm"
"cmd" "sm_ban #1 30 \"Banned by vote.\""
"percent" "75"
"count" "3"
"trigger"
{
"command" "voteban"
"notice" "%u voted to ban #1"
}
"params"
{
"1" "player"
}
}
"votekick"
{
"title" "Kick #1?"
"type" "confirm"
"cmd" "sm_kick #1 \"Kicked by vote.\""
"percent" "70"
"count" "3"
"trigger"
{
"command" "votekick"
"notice" "%u voted to kick #1"
}
"params"
{
"1" "player"
}
}
"votemute"
{
"title" "Mute #1?"
"type" "confirm"
"cmd" "sm_mute #1 \"Muted by vote.\""
"percent" "80"
"count" "4"
"trigger"
{
"command" "votemute"
"notice" "%u voted to mute #1"
}
"params"
{
"1" "player"
}
}

Crap
10-12-2008, 11:04
Still having trouble getting this plugin working the way I would like.

Basically if a player starts a votemap, the other players get a menu with the options yes and no, but without an indication of which map they are voting for. How can I set it up to work like that?

Playervotes.cfg:

"votemap"
{
"title" "Vote Map"
"type" "list"
"abspercent" "40.0"
"command" "changelevel #1"
"trigger"
{
"command" "votemap"
"notice" "%u wants to change the map to #1"
"delay" "30"
}
"params"
{
"1" "mapcycle"
}
}

Mine shows the map name after the initial voter picks one.

Here's mine:

"votemap"
{
"title" "Votemap #1?"
"type" "confirm"
"cmd" "changelevel #1"
"percent" "60"
"trigger"
{
"command" "votemap"
"notice" "%u wants to change the map to #1"
"delay" "300"
}
"params"
{
"1" "mapcycle"
}
}

I'm guessing the difference is the title since yours doesn't have the "#1" in the title.

Try changing this:
"title" "Vote Map"

to this:
"title" "Vote Map #1?"

I don't think the "notice" section actually does anything on mine to be honest, can't recall offhand.

Ska
10-13-2008, 02:08
Here's my voteban, kick and mute votes

Thanks, I'll try

Hitman-
10-14-2008, 00:23
ok after reading some of this. Can i set these votes to be started by an admin only and some by a player or admin? If so how i would do that?

Crap
10-14-2008, 00:29
ok after reading some of this. Can i set these votes to be started by an admin only and some by a player or admin? If so how i would do that?

From the first post:

Optional attributes:admin - The name of a server command that determines who can initiate this vote. For example, if this is set to "sm_kick", only admins with the "kick" permission can initiate this vote.

Hitman-
10-14-2008, 08:59
From the first post:
ok im a moron...thanks for being nice about it :)



I just totally missed that

Crap
10-14-2008, 09:16
ok im a moron...thanks for being nice about it :)



I just totally missed that

It's alot of information and easy to miss. I just happen to be vote crazy and use this plugin way more than I probably should since no one on my server remembers all the vote commands besides me :wink:

As for being nice, just remember it next time I accidentally delete a file or something and you know the answer to my problem :mrgreen:

Hitman-
10-14-2008, 20:32
one more question.

I saw this question earlier but never found an answer:
I added this to my cfg file. But when their is a winning map in console it says: CModelLoader::MapIsValid: Empty mapname!!!

What do i need to change to set the map name correctly?


"setnextmapmulti"
{
"title" "Which map should be next (multi vote)?"
"type" "list"
"admin" "sm_setnextmap"
"command" "sm_setnextmap #4"
"params"
{
"1" "mapcycle"
"2" "mapcycle"
"3" "mapcycle"
}
"options"
{
"#1" "#1"
"#2" "#2"
"#3" "#3"
}
}

Crap
10-14-2008, 22:40
one more question.

I saw this question earlier but never found an answer:
I added this to my cfg file. But when their is a winning map in console it says: CModelLoader::MapIsValid: Empty mapname!!!

What do i need to change to set the map name correctly?


"setnextmapmulti"
{
"title" "Which map should be next (multi vote)?"
"type" "list"
"admin" "sm_setnextmap"
"command" "sm_setnextmap #4"
"params"
{
"1" "mapcycle"
"2" "mapcycle"
"3" "mapcycle"
}
"options"
{
"#1" "#1"
"#2" "#2"
"#3" "#3"
}
}




I think that error usually means you have blank lines in whatever file you are using as the maplist. The file should be a list of map names (minus the .bsp extension), one per line with no blank lines.

Hitman-
10-15-2008, 00:14
i just double checked the list. No extra lines....

I attached the file also.

Any other ideas?

Crap
10-15-2008, 04:05
i just double checked the list. No extra lines....

I attached the file also.

Any other ideas?

Hehe, only three maps I guess there wouldn't be a problem spotting extra lines eh? :wink:

I don't know if the way you have that setup works. There was some discussion of it earlier, but I never tried it.

However, while I'm not sure how to get it to work exactly the way you are trying to do it, if you are only trying to get it to work with 3 maps you could just add the maps directly as the options for the vote, like this:


"setnextmapmulti"
{
"title" "Which map should be next (multi vote)?"
"type" "list"
"admin" "sm_setnextmap"
"cmd" "sm_setnextmap #1"
{
"pl_badwater" "Badwater"
"pl_goldrush" "Goldrush"
"cp_dustbowl" "Dustbowl"
}
}


If you are wanting to set it up for more maps or are planning to constantly be adding/removing maps and want to use the mapfile, then this won't work, but if you only want a vote with those three choices, this should be fine (assuming I didn't screw up the formatting anywhere).

OTherwise you'll have to get help from Chundo I think.

Hitman-
10-15-2008, 09:26
yeah i do want to add more maps..this small mapfile was just for a test to make sure it worked how i wanted it.

Hopefully chundo will be able to help me out

sLuGo
10-15-2008, 11:07
I'm horrible with this.

Basically i have the sm_meleemode_enable and i want to make that into a customn vote, just a simple Melee Mode On/Off vote, which then does sm_meleemode_enable 0/1 on return of votes

Any help would be great :\

Jamster
10-15-2008, 11:15
Add this into your votes config slugo (In between "Votes" curly braces {}):

"meleemode"
{
"title" "Turn melee mode {!sm_meleemode_enable|onoff}"
"type" "confirm"
"percent" "65"
"cmd" "sm_meleemode_enable {!sm_meleemode_enable}"
"trigger"
{
"notice" "%u wants to make a melee mode vote"
}
}

sLuGo
10-15-2008, 11:23
Perfect, thanks so much for a fast reply as well!

Hitman-
10-15-2008, 14:27
one more question.

I saw this question earlier but never found an answer:
I added this to my cfg file. But when their is a winning map in console it says: CModelLoader::MapIsValid: Empty mapname!!!

What do i need to change to set the map name correctly?


"setnextmapmulti"
{
"title" "Which map should be next (multi vote)?"
"type" "list"
"admin" "sm_setnextmap"
"command" "sm_setnextmap #4"
"params"
{
"1" "mapcycle"
"2" "mapcycle"
"3" "mapcycle"
}
"options"
{
"#1" "#1"
"#2" "#2"
"#3" "#3"
}
}



If anyone else knows the answer this it would be appreciated

i think the command line is wrong "command" "sm_setnextmap #4" but i wouldnt know what to change #4 to

Ska
10-16-2008, 08:52
Another problem occured: when someone tryes to start a mapvote, the map changes instantly using votestarter's choice, without giving possibility for vote to other players.

Plugin runs with default cvar settings.

part of playervotes.vote.cfg

"votemap"
{
"title" "Change map to #1?"
"type" "chat"
"cmd" "changelevel #1"
"trigger"
{
"command" "votemap"
"notice" "%u want to change the map to #1"
"delay" "300"
"percent" "60"
"count" "4"
}
"params"
{
"1" "mapcycle"
}
}


anyone expirienced this problem?

p.s. I have rockthevote and mapchooser disabled if this matters.

Hitman-
10-17-2008, 00:05
If anyone else knows the answer this it would be appreciated

i think the command line is wrong "command" "sm_setnextmap #4" but i wouldnt know what to change #4 to
anyone know of a different way to do this without this plugin? With another one

Ska
10-17-2008, 10:52
i solved my issue

the problem was

"type" "chat"

replaced chat with confirm

harper
10-23-2008, 19:28
I need a way to run a cfg file. some VOTES need more then just one command. this is just some thing I was working on.

"auto-alltalk off"
{
"title" "autoalltalk off?"
"type" "confirm"
"percent" "60"
"votes" "4"
"command" "Auto-Alltalk off.cfg"
"trigger"
{
"command" "Auto Alltalk off"
"notice" "%u wants to turn off auto talk."
"percent" "60"
"count" "4"
}
}
"auto-alltalk on"
{
"title" "autoalltalk on?"
"type" "confirm"
"percent" "60"
"votes" "4"
"command" "Auto-Alltalk on.cfg"
"trigger"
{
"command" "Auto Alltalk on"
"notice" "%u wants to turn on auto talk."
"percent" "60"
"count" "4"
}
}


Is there a way to make this work?

Crap
10-24-2008, 02:45
I need a way to run a cfg file. some VOTES need more then just one command. this is just some thing I was working on.

"auto-alltalk off"
{
"title" "autoalltalk off?"
"type" "confirm"
"percent" "60"
"votes" "4"
"command" "Auto-Alltalk off.cfg"
"trigger"
{
"command" "Auto Alltalk off"
"notice" "%u wants to turn off auto talk."
"percent" "60"
"count" "4"
}
}
"auto-alltalk on"
{
"title" "autoalltalk on?"
"type" "confirm"
"percent" "60"
"votes" "4"
"command" "Auto-Alltalk on.cfg"
"trigger"
{
"command" "Auto Alltalk on"
"notice" "%u wants to turn on auto talk."
"percent" "60"
"count" "4"
}
}


Is there a way to make this work?

Change the command to "exec blablah.cfg" and make sure the cfg files are in the appropriate cfg directory.

gH0sTy
10-24-2008, 03:34
I need a way to run a cfg file. some VOTES need more then just one command. this is just some thing I was working on.

[CUT]

Is there a way to make this work?
You can also use the sm_execcfg command
"auto-alltalk off"
{
"title" "autoalltalk off?"
"type" "confirm"
"percent" "60"
"votes" "4"
"command" "sm_execcfg off.cfg"
"trigger"
{
"command" "Auto Alltalk off"
"notice" "%u wants to turn off auto talk."
"percent" "60"
"count" "4"
}
}
"auto-alltalk on"
{
"title" "autoalltalk on?"
"type" "confirm"
"percent" "60"
"votes" "4"
"command" "sm_execcfg on.cfg"
"trigger"
{
"command" "Auto Alltalk on"
"notice" "%u wants to turn on auto talk."
"percent" "60"
"count" "4"
}
}

MaximReapage
10-24-2008, 07:05
I'd like to take your plugin and replace the basevotes/funvotes with it...I would only be, basically, ripping your interface from it (the way it notifies you of the vote progress) and putting it in for basevotes and funvote, modifying it to use hsay instead of msay. Just wanted to make sure you were cool with this (I would credit you for your code, obviously). I'd also like for bailopan to consider making that part of the official sourcemod snapshot, since the current setup is abysmal.

harper
10-24-2008, 08:49
thanks gH0sTy I will try it later when I get home.

imported_sparky
10-24-2008, 21:05
Is it possible to set this plugin so regular players can type voteban, votekick.


I tried Players Votes (v1.2.6) Updated Sep 1 2008 in ins but the menu does not popup works fine with this plugin but I dont know how to make it for public players

imported_sparky
10-25-2008, 11:12
I tried with this config

"voteban"
{
"title" "Ban #1 for 30 minutes?"
"type" "confirm"
"cmd" "sm_ban #1 30 \"Banned by vote.\""
"percent" "75"
"count" "3"
"trigger"
{
"command" "voteban"
"notice" "%u voted to ban #1"
}
"params"
{
"1" "player"
}
}
"votekick"
{
"title" "Kick #1?"
"type" "confirm"
"cmd" "sm_kick #1 \"Kicked by vote.\""
"percent" "70"
"count" "3"
"trigger"
{
"command" "votekick"
"notice" "%u voted to kick #1"
}
"params"
{
"1" "player"
}
}
"votemute"
{
"title" "Mute #1?"
"type" "confirm"
"cmd" "sm_mute #1 \"Muted by vote.\""
"percent" "80"
"count" "4"
"trigger"
{
"command" "votemute"
"notice" "%u voted to mute #1"
}
"params"
{
"1" "player"
}
}

I get this

you do not have access to this command

gH0sTy
10-25-2008, 14:01
"voteban"
{
"title" "Ban #1 for 30 minutes?"
"type" "confirm"
"cmd" "sm_ban #1 30 voteban"
"percent" "75"
"count" "3"
"trigger"
{
"command" "voteban"
"notice" "%u voted to ban #1"
}
"params"
{
"1" "player"
}
}
"votekick"
{
"title" "Kick #1?"
"type" "confirm"
"cmd" "sm_kick #1 votekick"
"percent" "70"
"count" "3"
"trigger"
{
"command" "votekick"
"notice" "%u voted to kick #1"
}
"params"
{
"1" "player"
}
}
"votemute"
{
"title" "Mute #1?"
"type" "confirm"
"cmd" "sm_mute #1"
"percent" "80"
"count" "4"
"trigger"
{
"command" "votemute"
"notice" "%u voted to mute #1"
}
"params"
{
"1" "player"
}
}

imported_sparky
10-26-2008, 22:15
Thanks it worked

I was having problems with sourcebans had to update to the latest svn

My next question is how do I get it to add the bans to my sourcebans page I tested it and it just added a 30 min temp ban to the server memory

thanks in advance

DJ Tsunami
10-27-2008, 11:20
Unfortunately that's not possible currently. Either chundo will have to add specific SourceBans support to Custom Votes, or you'll have to wait for SourceBans 2.0. But there's no timeframe for that yet, so don't expect it to be released anytime soon.

monkie
11-01-2008, 23:41
sorry for error reporting:
L 11/01/2008 - 22:47:01: SourceMod error session started
L 11/01/2008 - 22:47:01: Info (map "dod_palermo") (file "errors_20081101.log")
L 11/01/2008 - 22:47:01: [SM] Native "RemoveFromArray" reported: Invalid index 1 (count: 0)
L 11/01/2008 - 22:47:01: [SM] Displaying call stack trace for plugin "customvotes.smx":
L 11/01/2008 - 22:47:01: [SM] [0] Line 1584, /home/groups/alliedmodders/forums/files/3/7/8/0/7/30672.attach::ClearCurrentVote()
L 11/01/2008 - 22:47:01: [SM] [1] Line 254, /home/groups/alliedmodders/forums/files/3/7/8/0/7/30672.attach::OnMapStart()
L 11/01/2008 - 23:32:23: Error log file session closed.
L 11/01/2008 - 23:32:24: SourceMod error session started
L 11/01/2008 - 23:32:24: Info (map "dod_colmar") (file "errors_20081101.log")
L 11/01/2008 - 23:32:24: [SM] Native "RemoveFromArray" reported: Invalid index 1 (count: 0)
L 11/01/2008 - 23:32:24: [SM] Displaying call stack trace for plugin "customvotes.smx":
L 11/01/2008 - 23:32:24: [SM] [0] Line 1584, /home/groups/alliedmodders/forums/files/3/7/8/0/7/30672.attach::ClearCurrentVote()
L 11/01/2008 - 23:32:24: [SM] [1] Line 254, /home/groups/alliedmodders/forums/files/3/7/8/0/7/30672.attach::OnMapStart()
L 11/02/2008 - 00:17:37: Error log file session closed.
L 11/02/2008 - 00:17:38: SourceMod error session started
L 11/02/2008 - 00:17:38: Info (map "dod_avalanche") (file "errors_20081102.log")
L 11/02/2008 - 00:17:38: [SM] Native "RemoveFromArray" reported: Invalid index 1 (count: 0)
L 11/02/2008 - 00:17:38: [SM] Displaying call stack trace for plugin "customvotes.smx":
L 11/02/2008 - 00:17:38: [SM] [0] Line 1584, /home/groups/alliedmodders/forums/files/3/7/8/0/7/30672.attach::ClearCurrentVote()
L 11/02/2008 - 00:17:38: [SM] [1] Line 254, /home/groups/alliedmodders/forums/files/3/7/8/0/7/30672.attach::OnMapStart()

these are from my sourcemod error logs, have a check on it?

Iron_Chef
11-12-2008, 12:50
I would like to do something similar to what I saw on the previous page by harper... exec a cfg based on a vote. Specifically this would be done to exec weapon restrictions and thus have a knife/pistol round or two. The only problem I can see with this, is there's no easy way to undo the weapon restrictions or exec another cfg after one round, or even a set time. I don't want them to vote for a knife round and then have to vote again to turn it off.

Does anyone have any ideas?

BrutalGoerge
11-24-2008, 15:38
im trying to get votemap and votenextmap to work for all players, and have no verification

I cannot connect to the server and get the code Im using as I am at school atm and the ip address time out for some reason, but in general, what do i need to do to get it to work, is it even possible?