Description
Allow players to vote whether to enable/disable default respawn times.
This plugins works around
"mp_disable_respawn_times". Players can initiate a vote typing
!voterespawn (also
/voterespawn) in the chat to change the current value.
If enough people vote "Yes", the value will change. If not, well, guess what happens... XD
There is a cooldown between each vote, so people cant' spam it, but you can manage the cooldown time using a cvar.
This plugin uses NativeVotes, by Powerlord. If you don't have NativeVotes installed, you should still be able to use the plugin, using the "classic" voting interface that SourceMod has.
CVars
- sm_voterespawn_cooldown - Sets the cooldown time, in seconds, before another vote can take place. (Default: 300).
To Do
- Make the "sm_voterespawn_enabled" cvar work, so you can enable/disable the plugin on the fly.
- Add a cvar to decide which minimum percentage of votes you need for the vote to pass.
The plugin also has
translation files, currently, just English and Spanish.
This is
my first plugin from scratch. I took inspiration from code by Powerlord (
NativeVotes) and Seb3pg (
TF2 Vote Scramble).
I'm aware that the code may have some mistakes and it may not be the most optimal, so feel free to criticize, but in a constructive way, please.