********************************************* *******************************
*
* Version 0.3 - Date: 03/17/2006
*
* Created by: jtp10181 <
[email protected]>
* Homepage:
http://www.jtpage.net
*
********************************************* *******************************
This plugin allows you to add a custom vote for virtually anything. All you need to know is the cvar or server command to turn the plugin on and off.
Features:- Add any amount of votes to the config file and it loads them on map changes
- Nearly all aspects of the votes are customizable
- Different timer/delay modes to suit your needs
- Reads the vote delay from the standard AMXx cvar setting
- Easy console menu system for admins to start votes and change settings
- Matrix style jumping is done entirely by this vote plugin because only a CVAR needs to be changed
- Config file included for all plugins written or maintained by me
Admin Commands:
amx_custvote - Console menu system for changing vote settings
Examples:
amx_custvote - Shows the console admin vote menu
amx_custvote #2 - Starts vote #2
amx_custvote matrix - Starts the vote with trigger "matrix"
amx_custvote #2 off - Disable public voting for #2
amx_custvote #2 save - Save the current public voting status as the default for #2
amx_custvote #2 on save - Enable public voting for #2 AND save that as the default
amx_custcancelvote - Cancels current voting session
Client Command:
say vote_<trigger> - Starts a vote if public voting is enabled
Config File: This should be located at <configs_dir>/custvote.cfg
Here is an example config file that could be used
Code:
//Config file for amx_customvotes.sma
//Created by jtp10181
//This file belongs at <configs_dir>/custvote.cfg
//Sample Config Entry
//The vote can be activated by saying "vote_trigger"
//[trigger]
//D "Description used in results"
//Q "Vote question?"
//Y "YES question choice"
//N "NO Answer choise"
//H "Help line to be displayed if vote succeeds"
//The following two can be cvars settings or any server command
//YC "server command to run if vote passes"
//NC "server command to run if vote failes"
//The following can be set to different modes and is optional
// * -1 - No timer checking
// * 0 - Use plugin global timer (default if not set)
// * 1 - Use server global timer (same as adminvote)
// * 2 - Use vote specific timer
//TM 0
[matrix]
D "Matrix Jumping"
Q "Do you want Matrix style jumping?"
Y "Hand me the red pill!"
N "No thanks"
YC "sv_airaccelerate -15"
NC "sv_airaccelerate 10"
[hook]
D "Grappling Hook"
Q "Allow the Grappling Hook?"
Y "Yes, I want to Hook
N "No, the Hook is stupid"
YC "sv_hook 1"
NC "sv_hook 0"
H "- Say /hook for help"
TM 2
CVARs: Paste the following into your amxx.cfg to change defaults.
You must uncomment cvar lines for them to take effect
Code:
// ****************** Custom Vote Settings ******************
//Custom Vote Admin Override (CVAO)
// 0 - admins are forced to obey vote timers
// 1 - vote timers are ignored for the console admin commands
//amx_cvao 0
Changelog:
v0.3 - JTP10181 - 03/17/06
- Added option for custom vote ratio
v0.2 - JTP10181 - ??/??/??
- Allowed more chars to be read from config file
- Made use of plugin_cfg native to delay the reading of the config file
v0.1 - JTP10181 - 07/10/04
Thanks to the AMXX Dev Team for the orginal adminvote plugin.
The core voting code for this plugin was borrowed from there.
********************************************* **************************
This is my first major plugin I coded mostly from scratch. I know that this is kind of redundant of another plugin but I feel this one has an easier to use config file and I belive it has more features when it comes to the custom voting part.
Please give me some feedback. I am interested in feature requests and bug reports and anything else you want to say about this plugin.
********************************************* **************************
Votes Included in Sample Config File********************************************* **************************