Custom Votes v0.5.6 (1/07)
3 Attachment(s)
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: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.changelevel - Vote to change the map immediately.Chat Votes (replaces PlayersVotes, do not use both together without disabling these votes in configs/customvotes/playervotes.vote.cfg): Detailed Usage Documentation CVars: All cvars have sane defaults, and most admins will not need a separate configuration file for this plugin.Admin Commands:sm_cvote_version - Plugin version.Custom Votes also uses the value of sm_vote_delay (from basevotes) as a minimum delay between votes. sm_cvote <votename> <params>Console Commands: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 sm_votemenuConfiguration:Displays a menu of votes the player is allowed to initiate. !votemenu in chat. 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 Types: onoff - Displays a simple "On" or "Off" vote, which returns the values "1" or "0" as the result parameter.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.)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.Configuration Examples: Vote parameters:Integration With Admin Menu:Chat Vote: 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/Changelog: 0.1 - Initial releaseCredits: Developed by chundo. |
Re: Custom Votes v0.1 (6/2)
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. |
Re: Custom Votes v0.1 (6/2)
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? |
Re: Custom Votes v0.1 (6/2)
Perfect.
Otto n00bsalad.net |
Re: Custom Votes v0.1 (6/2)
Quote:
Quote:
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. |
Re: Custom Votes v0.1 (6/2)
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... Code:
"Votes" |
Re: Custom Votes v0.1 (6/2)
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 :) |
Re: Custom Votes v0.1 (6/2)
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). |
Re: Custom Votes v0.2 (6/5)
Ok, chat triggers and vote delays are added in v0.2.
|
Re: Custom Votes v0.2 (6/5)
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 |
All times are GMT -4. The time now is 10:22. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.