GB.CritVote
Do you want to crit today?
Description
This plugin displays a vote at the beginning of each map, allowing the players on the server to decide if they want to enable, disable or have no preference in regards to random crits (normally set by the convar tf_weapon_criticals) for the upcoming round.
It also makes it possible for a given player to store a vote preference, so they will vote their preference automatically on each round start.
REMEMBER! Disabling random crits sets the
nocrit servertag, which deduces points in quickplay for your server.
Inspiration
This plugin is inspired by
TF2 Permanent Critvote by Sillium, which in turn was inspired by
TF2 Critvote by r5053.
I started by modifying Silliums script, but, as I got more comfortable, I rewrote the script entirely, and have just copied a couple of his good ideas, like vote-delays.
Installation
Simply unpack the ZIP file into your TF2 folder, everything should end up where it belongs.
Edit
\cfg\sourcemods\gb_critvote.cfg to your liking, and load the plugin, or restart your server, whichever you prefer.
Dependencies
Sourcemod 1.3.8+
Clientprefs, if you want to use permanent votes.
The plugin makes use of
colors.inc by excel, which is included in the ZIP file.
Incompatabilities
Its not directly incompatible, but it should go without saying that you should not run any plugins that modify tf_weapon_criticals alongside this, especially on of the two plugs mentioned in the
Inspiration section
Settings
Quote:
- gb_critvote_initial_vote_delay
default: 30
The delay, in seconds, from first client connects to an empty server, until the vote starts.
-
- gb_critvote_vote_length
default: 20
Length, in seconds, of the vote.
-
- gb_critvote_allow_permanent_votes
default: 1
Allows or disallows the users being able to permanently set a vote (Need clientprefs enabled on server).
-
- gb_critvote_vote_choice_order
default: 0
The order of the votechoices (0 lists Crits On first, 1 list Crits Off first)
-
- gb_critvote_player_join_info_delay
default: 20
Delay, in seconds, before we inform a new player of the current crit status.
-
- gb_critvote_vote_on_no_vote
default: 2
If a player doesn't vote, what should his vote count as?
Set to either the desired value of the tf_criticals convar (0 or 1), or to 2 to not let the vote count.
-
- gb_critvote_value_on_tie
default: 1
What tf_weapon_criticals will be set to in case of a tie. (0 or 1)
-
- gb_critvote_reset_vote_when_empty
default: 1
If you want the vote to reset when the server empties, set to 1, else to 0. (Meaning, the next connecting player will start a new vote on the given map)
-
- gb_critvote_set_crits_when_empty
default: 2
Should the value of tf_weapon_criticals be changed when the server empties. Set to value it should be changed to (0 or 1), or set to 2 to leave as is.
-
- gb_critvote_value_on_mapchange
default: 2
If set to 0 or 1, the tf_criticals convar is reset to this value on mapchange, if set to 2, will retain the value from the previous round.
|
Ingame commands
!crit Shows the current random crit setting, and if the player has a vote preference, shows it to him.
!deletecrit Deletes the players vote preference, if set.
Translation
Plugin is ready for translation, if you want to submit a translation file, PM me.
ToDo
-
Changelog- 1.1.0, 2011-08-03
- Made the vote menu translateable also, so now the entire plugin is translateable.
- 1.1.1, 2011-08-08
- Replay and SourceTV bots does not start the vote anymore.
- Added Danish translation.
- 1.2.0, 2011-08-21
- Added convar gb_critvote_vote_choice_order so you can list Crits Off as the first choice in the votemenu (suggested by snelvuur)
- 1.3.0, 2011-09-01
- Added convar gb_critvote_set_crits_when_empty to control the value of tf_weapon_criticals when the server empties.
- 1.3.5, 2011-09-08
- Added convar gb_critvote_allow_permanent_votes
- Changed chat commands to real SM commands.
- Removed clientprefs dependency. (If clientprefs isn't available, permanent votes are disabled)
- Added check for Team Fortress 2 on startup.
- Cleaned the code up a little bit, for approval purposes.