ferret
06-14-2007, 15:19
Basic Votes
Version 1.3
By: ferret!
Description
This plugin adds a range of voting commands. Admins must have the Admin_Vote flag to use. They include kick, ban, and map commands, as well as a custom vote. Please note that an admin does not have to have admin_kick or admin_ban to use these.
Installation
Place the basevotes.smx file inside of the addons/sourcemod/plugins/ folder.
Place the plugins.basevotes.txt file inside of the addons/sourcemod/translations/ folder.Commands
sm_votemap <mapname> [mapname2] ... [mapname5]
Issues a vote for map change. Map will change after the map.
Single map votes will display as a Yes or No vote.
Up to five maps may be specified.
See sm_vote_map cvar.
sm_votekick <player> [reason]
Issues a vote to kick a player. Player is kicked at vote completion.
Optional reason will be displayed to the target when kicked.
See sm_vote_kick cvar.
sm_voteban <player> [reason]
Issues a vote to ban a player. Player is banned and kicked afterwards.
Ban lasts for 30 minutes.
Reason if specified will be shown to user when kicked
See sm_vote_ban cvar.
sm_vote <question> [Answer1 .. [Answer5]
Issues a custom vote.
If no answers are specified, they will default to Yes and No.
Remember to use quotes around questions or answers with a space in them.
sm_votecancel
Cancels any vote currently in progress.
Cvars
sm_vote_master
Overrides all other sm_vote cvars for controlling the percentage of votes needed, when set to non-zero.
Default is 0.0.
Ranges from 0.0 (0%) to 1.0 (100%)
sm_vote_map
Percentage of votes needed to change the map for single map votes.
Default is 0.60 (60%)
Ranges from 0.05 (5%) to 1.0 (100%)
sm_vote_kick
Percentage of votes needed to kick a player
Default is 0.60 (60%)
Ranges from 0.05 (5%) to 1.0 (100%)
sm_vote_ban
Percentage of votes needed to ban a player.
Default is 0.60 (60%)
Ranges from 0.05 (5%) to 1.0 (100%)
sm_vote_show
Controls whether or not player's choices are broadcast to everyone.
Default is 1. Set to 0 to turn off.
Changelog
Version 1.3
Abandoned hungarian notation
New cvar: sm_vote_say. Default is off. Allows players to use votekick and voteban by saying them. "say votekick player". Personally, I would NOT use it. But it was requested, so there you go. Don't get yourself banned!
New cvar: sm_vote_master: Default is 0.0. If you set this, all other vote percentage Cvars will be ignored, and this will be used instead.
Fixed Kick Failed message, displayed sm_vote_map instead of sm_vote_kick
Fixed Ban Failed message, displayed sm_vote_map instead of sm_vote_ban
Fixed failed votes showing reversed percentages
Added natives necessary for ExtendedVotes to hook in.
Version 1.2 (June 29th)
Conform to plugin submission standards
Add version cvar sm_basevotes_version
Version 1.1 (June 28th)
Several fixes due to bad "Replace All"
June 18th
German Translations by Fisch.666
June 17th Part 2
French Translations by magicyan (Redownload plugin.basevotes.cfg)
June 17th
Requires SourceMod build R981 or higher
Took out timers that force cancel of menus, fixed in R981
Added a "no votes received" message if no one voted.
Took out vote counter variables, added to MenuAPI in R965
June 16th
Fixed vote failure percents being 61%
using a time to force votes to end in 20 seconds until MENU Api is fixed.
Other little tweaks (Make sure to get the translation file)
Changed ALL commands to ADM_VOTE access.
Bugs, Requests, Translations, or Other Issues
Please use my project area on the Allied Modders Bug Tracker (http://bugs.alliedmods.net/?project=10) to report any issues or make requests. Your login for the bug tracker is the same as your forum login. Set the category to this plugin's name.
Version 1.3
By: ferret!
Description
This plugin adds a range of voting commands. Admins must have the Admin_Vote flag to use. They include kick, ban, and map commands, as well as a custom vote. Please note that an admin does not have to have admin_kick or admin_ban to use these.
Installation
Place the basevotes.smx file inside of the addons/sourcemod/plugins/ folder.
Place the plugins.basevotes.txt file inside of the addons/sourcemod/translations/ folder.Commands
sm_votemap <mapname> [mapname2] ... [mapname5]
Issues a vote for map change. Map will change after the map.
Single map votes will display as a Yes or No vote.
Up to five maps may be specified.
See sm_vote_map cvar.
sm_votekick <player> [reason]
Issues a vote to kick a player. Player is kicked at vote completion.
Optional reason will be displayed to the target when kicked.
See sm_vote_kick cvar.
sm_voteban <player> [reason]
Issues a vote to ban a player. Player is banned and kicked afterwards.
Ban lasts for 30 minutes.
Reason if specified will be shown to user when kicked
See sm_vote_ban cvar.
sm_vote <question> [Answer1 .. [Answer5]
Issues a custom vote.
If no answers are specified, they will default to Yes and No.
Remember to use quotes around questions or answers with a space in them.
sm_votecancel
Cancels any vote currently in progress.
Cvars
sm_vote_master
Overrides all other sm_vote cvars for controlling the percentage of votes needed, when set to non-zero.
Default is 0.0.
Ranges from 0.0 (0%) to 1.0 (100%)
sm_vote_map
Percentage of votes needed to change the map for single map votes.
Default is 0.60 (60%)
Ranges from 0.05 (5%) to 1.0 (100%)
sm_vote_kick
Percentage of votes needed to kick a player
Default is 0.60 (60%)
Ranges from 0.05 (5%) to 1.0 (100%)
sm_vote_ban
Percentage of votes needed to ban a player.
Default is 0.60 (60%)
Ranges from 0.05 (5%) to 1.0 (100%)
sm_vote_show
Controls whether or not player's choices are broadcast to everyone.
Default is 1. Set to 0 to turn off.
Changelog
Version 1.3
Abandoned hungarian notation
New cvar: sm_vote_say. Default is off. Allows players to use votekick and voteban by saying them. "say votekick player". Personally, I would NOT use it. But it was requested, so there you go. Don't get yourself banned!
New cvar: sm_vote_master: Default is 0.0. If you set this, all other vote percentage Cvars will be ignored, and this will be used instead.
Fixed Kick Failed message, displayed sm_vote_map instead of sm_vote_kick
Fixed Ban Failed message, displayed sm_vote_map instead of sm_vote_ban
Fixed failed votes showing reversed percentages
Added natives necessary for ExtendedVotes to hook in.
Version 1.2 (June 29th)
Conform to plugin submission standards
Add version cvar sm_basevotes_version
Version 1.1 (June 28th)
Several fixes due to bad "Replace All"
June 18th
German Translations by Fisch.666
June 17th Part 2
French Translations by magicyan (Redownload plugin.basevotes.cfg)
June 17th
Requires SourceMod build R981 or higher
Took out timers that force cancel of menus, fixed in R981
Added a "no votes received" message if no one voted.
Took out vote counter variables, added to MenuAPI in R965
June 16th
Fixed vote failure percents being 61%
using a time to force votes to end in 20 seconds until MENU Api is fixed.
Other little tweaks (Make sure to get the translation file)
Changed ALL commands to ADM_VOTE access.
Bugs, Requests, Translations, or Other Issues
Please use my project area on the Allied Modders Bug Tracker (http://bugs.alliedmods.net/?project=10) to report any issues or make requests. Your login for the bug tracker is the same as your forum login. Set the category to this plugin's name.