Page 1 of 1

Master Vote v1.1 UPDATED 04-12-10

Posted: Mon Nov 22, 2021 11:28 pm
by greenie
/********************************************
AMX Master Vote
--------------------------------------------------------
Functionality:
Uses a vote that will last for however long you want. Could last two minutes could last 5 months.
The players in the server see in chat. Say /showvote to vote on the Master Vote.
This is only shown in chat if thay player hasnt voted for this vote yet.
Once a player has voted they can no longer see or vote for the vote.
--------------------------------------------------------
Commands:
amx_newvote (Must use either amx_rcon, rcon , or Server console for this command)
-Use server command amx_newvote and it will walk you thru the proccess of making a new vote.
*Note: It is advised to not use amx_rcon amx_newvote because you will not see the instructions.
*However I have the proccess written out below so you know what to do.

amx_mv_results [Optional] <Ending Date>
-If argument supplied it finds the vote that matches it and shows results.
-Nothing supplied shows results of current/most recent vote. If no vote is currently in progress it shows most recent.
If a vote is currently in progress it shows results of that vote.
---------------------------------------------------------
Cvars:
amx_mv_showtime (Time in minutes to show vote after connect)
-Special settings:
( -1 ) = Don't auto show vote. (Basically same as version 1.0)
( 0 ) = Show on first ResetHUD after connecting
---------------------------------------------------------
New Vote Walk-thru:
1) Use 'amx_newvote' with no argments to initiate new vote.
2) Use 'amx_newvote' followed by the ending date of the vote. (Must be in MM-DD-YY)
-Example of this step: amx_newvote 10-20-05
-Note: If your date is incorrect or outdated then it asks you to do it again but you may not see this. So be sure your date is correct.
3) Use 'amx_newvote' followed by the question. (Quotes are not needed for spacing)
-Example of this step: amx_newvote What's your favorite Half-life game?
-Note: The '?' isnt needed. When showing the vote if there is not '?' in your question it adds it to the end.
4) Use 'amx_newvote' followed by the answers to your question. (Answers must be in " (Quotes) regardless of spacing)
-Example for this step: amx_newvote "Half-life" "Counter-Strike" "DOD" "DeathMatch" "TFC" "NS" "Half-life 2" "CS:S" "DOD:S"
-Note: Max of 9 answers for question.
5) Use 'amx_newvote 1' as a confirmation that everything was correct.

-So the vote created here would be:
This is {Plugin Name}! You only get one vote.
Voting end: 10-20-05

What's your favorite Half-life game?

1) Half-life
2) Counter-Strike
3) DOD
4) DeathMatch
5) TFC
6) NS
7) Half-life 2
8) CS:S
9) DOD:S

0) Exit
---------------------------------------------------------
Side Notes:
-You shouldn't ever manually edit the files created by this plugin.
-|- The .log files show the people's AuthId and Name with their answer and is used to allow people to only vote once.
-|- They also contain the data needed when using amx_mv_results. So dont get rid of the comments at the top.
-|- The .mv file contains all the data for the current vote and should never be edited by hand.
---------------------------------------------------------
Required:
- Files - None.
- Directory - None.
---------------------------------------------------------
Suggested Files:
- amxmodx/configs/mv_results.htm You can edit this htm file as you please.
- The different things you can use in it are as follows:
+ {PLUGIN} - Gets replaced with Plugin Name
+ {VERSION} - Gets replaced with plugin version.
+ {CREATOR} - Gets replaced by me(the creator)
+ {END_DATE} - The vote's ending date
+ {QUESTION} - The vote's question.
+ {RESULTS} - This is the main part. The results are dumped out where this is locted. It's best done like

{RESULTS}</p>.
---------------------------------------------------------
Other Files:
- amxmodx/data/Mvote/vote.mv File that holds all the current vote data.
- amxmodx/data/Mvote/MM-DD-YY.log File that keeps track of the vote that ends on date MM-DD-YY.
---------------------------------------------------------
Changelog:
v1.0: 10-10-05 | 10-16-05
-Initial build.

v1.1: 10-24-05
-Removed required directory.
-Added cvar amx_mv_showtime.
extension 04-12-10
-Made sure the plugin can compile.

---------------------------------------------------------
Credits:
atomic - His initial idea

********************************************/
.zip