View Single Post
Plugin Info:     Modification:          Category:         
DynamicBits
Senior Member
Join Date: Sep 2007
Location: US
Old 01-28-2012 , 21:31   Deagles' Map Manager v3.25Beta
Reply With Quote #1

Description

"Deagles NextMap Management," "Nomination_style_voting," "Deagles' Map Management," etc. The name of this plugin has had as many variations as it has authors. For those of you who are not familiar, this plugin does nomination style voting. Players can nominate maps to be placed into a vote. All players will later participate in a vote to determine which map will be next. For various reasons, I had to start a new thread. The old thread is still available.

My main priority in maintaining this plugin is to fix bugs in the code and make the multilingual translations more robust while maintaining backwards compatibility as much as possible. If I had written this plugin from scratch, I would have done a lot of things differently. I didn't write this from scratch and I don't plan to rewrite the entire thing. Over time, I have optimized some parts of the plugin and I will probably continue to do so.

I don't plan to add every feature under the sun. There are several map voting plugins out there and each one shouldn't have the exact same features as the others. Variety is a good thing. Bloat isn't.

Changelog
Code:
v3.25Beta - 2012-12-28 by DynamicBits
	- Added check for enabled conflicting plugin ("Nextmap Chooser 4")
	- Added "say noms" as an alias for "say nominations"
	- Full status no longer displays when a setting is changed
	- Nomination messages no longer display when nominations are disabled
	- Sounds no longer play with dmap_quietmode set to SILENT
	- Using dmap_status no longer shows "Unknown command: dmap_status" error
	- RTV is now allowed on servers with mp_timelimit = 0
	- Relaxed dmap_nominations restrictions
	- Relaxed dmap_mapsurl restrictions
	- Relaxed dmap_messages restrictions
	- dmap_rtvwait now defaults to 5 (new installs only)
	- Consolidated/removed a number of redundant/unused translations
	- Localized a couple of strings (English only)
	- Moved lots of formatting/redundant text from dictionary file to code
	- Added support for longer strings in the translations (replaced client_print)
	- Replaced MOTD help window with better help in the console. (dmap_help)
	- Lots of various optimizations were performed
	- Added Slovak translation (Thanks to luki1412)
	- File logging level is now configurable at compile-time

v3.24 - 2012-01-28 by DynamicBits
	- Added check for enabled conflicting plugins
	    ("Nextmap Chooser", "NextMap", "Galileo", and "Crab's Map Manager")
	- Added check for incorrect/missing dictionary file
	- Added response to "say ff"
	- Added "listmaps" command override
	- Added "votemap" command override
	- Added "currentmap" command
	- Added "recentmaps" command
	- Relaxed dmap_rtvwait restrictions
	- The following commands can no longer (incorrectly) be called from config files:
	       dmap_rtvpercent, dmap_rtvplayers, dmap_rtvwait, dmap_messages, dmap_mapsnum,
	       dmap_nominations, dmap_maxcustom, dmap_quietmode, dmap_rtvtoggle, dmap_freeze,
	       dmap_cyclemode, dmap_votemode, dmap_banlastmaps, dmap_mapsurl
	- Removed "now" argument from dmap_rockthevote/amx_rockthevote/amx_rtv. (It never worked)
	- Total number of maps is now shown in console for "listmaps" command
	- Fixed display of time after successful vote to extend map
	- Fixed duplicate task IDs
	- Standardized name: "Deagles' Map Manager"
	- Minor code optimizations
	- Removed unused code
	- Updated help
	- Corrected various minor issues with all languages
	- Put quotes around all commands for all languages
	- Added Bosnian translation (Thanks to Superstar Games)
	- Added Croation translation (Thanks to tomba2k)
	- Added Czech translation (Thanks to RTG)
	- Added Hungarian translation (Thanks to kiki33hun)
	- Added Serbian translation (Thanks to JinX)

v3.23 - 2009-02-17 by DynamicBits
	- Fixed menu vote not working in some situations
	- Corrected Swedish Translation

v3.22 - 2009-01-21 by DynamicBits
	- Added live voting percentages
	- Added dmap_nominate command
	- Added Romanian translation (Thanks to dorin2oo7 and georgik57)
	- Added Russian translation (Thanks to mozart123)
	- Added Brazil-Portuguese translation (Thanks to Warden)
	- Added Swedish translation (Thanks to Trut)
	- Fixed a handful of strings not getting localized properly
	- Fixed a translation that was causing the SVC_BAD error
	- Fixed several buffer overflow issues
	- Many optimizations
	- Updated help
	- Added a bunch of comments to source code

v3.21 - 2008-09-17 by DynamicBits
	- Added support for extra tags in the vote menu (See details for dmaptags.ini)
	- Added two new localized strings (Only English and Polish versions are in the lang file so far)
	- Fixed some multilingual code
	- Fixed several mistakes in the lang file
	- Formatted a few strings to better match AMX Mod X's formatting
	- A few small code optimizations

v3.20 - 2008-08-15 by DynamicBits
	- Fixed indentation, spacing, semicolons, argument spacing, and missing
	    curly braces (these things: { }) to mostly match BSD KNF style.
	- Fixed return value in client_disconnect(). This may have affected any
	    other plugin that relied on client_disconnect().
	- Added some missing return values
	- Removed several sections of redundant code
	- New define: DEDICATED_LOG_ENABLED allows logging to be disabled by
	    commenting out one line (see source).

v3.1  - 4-05-08
	- Fixed issue with emptyserver portion giving errors and flooding console

v3.0  - 9-29-07
	- Changed txt file for German to supposedly stop the Kicking issue that so many people are having.
	- Added cvar weapon_delay to Enable/Disable "Voting for nextmap delayed to allow buying of weapons..."

v2.48 - 9-27-07
	- Added command rtv in chat for quick rock the votes (client)
	- Added cvar emptymap_allowed (1|0) To enable/disable this feature
	- Added cvar emptymap (mapname) For whatever map you want your server to switch to when nobody is on after reading the staytime cvar
	- Added cvar amx_staytime(in seconds): How long before the plugin changes the map.
	- Added cvar amx_idletime(in hours): How many hours a player can be connected to the server before being considered idle.
	- Added cvar nominations_allowed (Enable/Disable Accepting nominations)

	-Made the code look much prettier with proper indentation.
	-Removed cvar rtv_percent - Useless, when the command saves your settings

v2.47 - Changed a some code for issues occuring randomly

v2.46 - Now uses the file defined from cvar named 'mapcyclefile' and not the hardcoded mapcycle.txt, by _KaszpiR_

v2.45 - Multilingual & Cancel vote
	- Multilingual by Vlad
	- Cancel Vote command by Lt. Llama

v2.40 - JTP10181 - 3/12/2006
	- Major code cleanup
	- Added allmaps.txt generating back in and fixed it for linux
	- Added support for no nominations allowed
	- Fixed all admin commands to check using cmd_access

Installation
  1. Download the plugin below
  2. Place deagsmapmanager.amxx in your server's addons/amxmodx/plugins folder
  3. Place deagsmapmanager.txt in your server's addons/amxmodx/data/lang folder
  4. Open plugins.ini found in addons/amxmodx/configs
  5. Add the following line at the bottom of the file: deagsmapmanager.amxx
  6. Save and close plugins.ini
  7. Put the standardmaps.ini, mapstoban.ini, and mapchoice.ini files in the
    <mod>\addons\amxmodx\configs directory (where <MOD> is the path to your Half-life mod)
  8. When in-game, to see a list of commands, use command dmap_status or dmap_help in console.
  9. Restart your server or change the map
  10. Done!

Important Notes:
  • Be sure all other map chooser plugins are turned off, except for the mapmenu default plugin!
  • If you run CS 1.6, please define either these config files, or mapcycle.txt, otherwise NO VOTE WILL APPEAR
  • Also, you need to put the line: mapchangecfgfile server.cfg in your server.cfg file!
    Otherwise the timelimit might not be reset every map, if the last map was extended for a period of time.


Usage

Say Commands
  • currentmap Show name of the current map
  • ff Display friendly fire status
  • listmaps Print a list of maps to the client's console
  • nextmap Display the next map if a vote does not take place
  • nominate <map> or vote <map> or <map> Nominate a map for the next vote
  • nominations (or noms in v3.25+) Show names of maps nominated for next vote
  • recentmaps Show names of recently played maps
  • rockthevote or rtv Let the server know you wish for a vote to take place

Console Commands
Note: These commands should be typed in the console of a client with the appropriate access level. They don't belong in a config file.

User
  • dmap_help Show general help and instructions to get detailed help
  • listmaps List all maps on the server in your console

ADMIN_LEVEL_A (ADMIN_DMAP)
  • dmap_cancelvote Cancel the rocked vote
  • dmap_nominate <map> Force nomination of a map by an admin
  • dmap_rockthevote Force a map vote instantly
  • dmap_status Display current configuration of the plugin

ADMIN_LEVEL_F (ADMIN_SUPER_DMAP)
  • dmap_banlastmaps <N> (Default: 4) (Range: 0-100) Ban the last <N> maps played from being voted
  • dmap_cyclemode Disable Voting (To restore voting use dmap_votemode)
  • dmap_default Restore settings to default
  • dmap_freeze (Default for CS: ON) Toggle on/off freeze (only available in CS)
  • dmap_mapsnum <N> (Default: 5) (Range: 2-8) How many maps will be in the next vote
  • dmap_mapsurl <URL|none> Specify what website to get custom maps from (v3.25+: Must start with http://, https://, ftp://, or www.)
  • dmap_maxcustom <N> (Default: 5) (Range: 0-8) Maximum custom maps that can be nominated by all players
  • dmap_messages <N> (Default: 3) (Range: 2-20; v3.25+: 2-60) (in minutes) Interval between display of messages
  • dmap_nominations <N> (Default: 3) (Range:0-3; v3.25+: 0-8) Maximum nominations that a user can make
  • dmap_quietmode <OFF|NOSOUND|SILENT> (Default: OFF) Configure messages: OFF=Sound/text, NOSOUND=Text, SILENT=Minimal text
  • dmap_rtvpercent <N> (Default:60) (Range: 3-100) at least this percentage of players have to "rockthevote"
  • dmap_rtvplayers <N> (Default:1) (Range: 1-32) This many players have to rockthevote for the vote to start. Note both conditions have to be met: #players, and Percent.
  • dmap_rtvtoggle (Default: ON) Enable/disable ability of players to rockthevote. Note that Admins with ADMIN_DMAP can still use dmap_rockthevote to force a vote.
  • dmap_rtvwait <N> (Default: 10; v3.25+: 5) (Range: 0-60) Minutes before rockthevote will be accepted. (This does not apply when mp_timelimit = 0.)
  • dmap_votemode Enable voting; default


Configuration

Cvars
  • amx_emptymap (Default: "de_dust2") The map used by by the amx_staytime CVAR (CVAR loaded when needed)
  • amx_extendmap_max (Default: 90) (in minutes) Max total time a map can be extended (CVAR loaded as needed)
  • amx_extendmap_step (Default: 15) (in minutes) Time added to extend current map (CVAR loaded as needed)
  • amx_idletime (Default: 5) (in hours) How long a player can be connected to the server before being considered idle (CVAR loaded once per map)
  • amx_show_activity (Default: 2) For certain admin actions: 0=Show nothing, 1=Show message, 2=Show message and name (CVAR loaded as needed)
  • amx_staytime (Default: 300) (in seconds) How long before changing the map to amx_emptymap if the server is empty (CVAR loaded once per map)
  • amx_vote_answers (No default set by plugin) Enable(1)/disable(0) publicly showing each user's vote (CVAR loaded as needed)
  • dmap_strict (Default: 0) Enable(1)/disable(0) restricting nominations to maps in the mapcycle (CVAR loaded as needed)
  • emptymap_allowed (Default: 0) Enable(1)/disable(0) using a specific map when the server is empty (CVAR loaded as needed)
  • enforce_timelimit (Default: 0) Change map STRICTLY on timelimit, when this is set to 1 (CVAR loaded as needed)
    (If there are less than 2 active players, the time limit will always be enforced.)
  • mp_chattime (No default set by plugin) (Range: 1-120 seconds) ...
  • mp_timelimit (No default set by plugin) (in minutes) Time between map changes (CVAR loaded as needed)
  • nominations_allowed (Default: 1) Enable(1)/disable(0) accepting nominations (CVAR loaded as needed)
  • weapon_delay <0|1> (Default: 1) Enable(1)/disable(0) "Waiting for vote to allow buying of weapons" (CVAR loaded as needed)

Config Files

These files belong in the .../addons/amxmodx/configs/ directory. You do not need to manage any of these files unless you want to.
  • allmaps.txt - This file will be created after the first successful load of the plugin if it does not exist. There is no need to touch this file unless you only want certain maps available for voting. Do not include the .bsp in the map names.
  • mapchoice.ini - Insert maps here that will show up for the vote when all 5 nominations are not made. Maps will be randomly selected from this file to fill up the unused Nomination slots. If you use this file, it needs to have a minimum of 10-15 maps in it, the more the better! If you don't use this file, mapcycle.txt will be used instead, or allmaps.txt (if it exists)
  • standardmaps.ini - Standard maps for the mod goes here, if this file is not created by the user, there will be no "custom" warnings. It needs to contain at least all of the valid maps for the mod. The purpose of this standardmaps.ini file is exactly what the purpose of the file was in BugBlatter's map plugin, the words (Custom) will be attached to all maps in the votemenu that are not listed here
  • mapstoban.ini - Insert maps that users will never be able to nominate, and will never show up for a vote.
  • dmaptags.ini - This is the file that will add tags to the maps in a vote.

    Example:

    Code:
    ;This is a sample comment fy_iceworld2k GunGame de_westwood WC3FT fun_matrix_revolutions No plugins de_dust WC3FT cs_assault_necro This map is totally awesome

    Will show in the votemenu

    Code:
       1. fy_iceworld2k (Custom) [GunGame]
       2. de_westwood (Custom) [WC3FT]
       3. fun_matrix_revolutions (Custom) [No plugins]
       4. de_dust [WC3FT]
       5. cs_assault_necro (Custom) [This map is totally awesome]

Multilingual

Please see this thread to post translations or corrections. Thank-you to the following people for providing translation assistance:

Future Changes/Known Issues

Expected in v3.25
  • The language file will be simplified to make it easier on translators and make the overall file size smaller.
  • A bunch of grammatical errors will be fixed in the English translation.
  • Support for longer UTF-8 strings will finally be added. (Sorry for the wait, -=hunter=-!)
  • The help file and other documentation will be updated to be more accurate.
  • Allow votes with mp_timelimit 0. (Reported here and here)
  • nextmap will work with mp_timelimit 0.
  • Don't show nomination messages with nominations_allowed 0. (Reported here)
  • Sound won't be played with dmap_quietmode SILENT.
  • The range of allowed values for dmap_nominations will be increased.
  • The say command noms will be added as an alias for nominations.
  • LOTS more stuff I felt like doing. ;)

Expected in v3.26
(Possibly) Expected in the Future
  • Make vote results display until everyone has finished voting
  • Make listmaps command configurable
  • More languages...
  • Support for GunGame
  • Support for Natural Selection
  • (If possible) Better support for alternative input methods (CSMate/SayCn)
  • Different behavior for empty servers or no-votes (Requested here)
  • Make dmap_banlastmaps command apply to randomly selected maps in vote (Reported here)
  • Sometimes (always?) the map change is about a minute off.
  • Sometimes the winning map is not set and the nextmap is random. (Reported here, here, and here) I don't know what is causing this!
  • More code optimization, testing with sawce's AMX Mod X profiler, etc.

(A lot of this information was copied from the old thread. The next release focuses on documentation and will include updates to this post.)

DO NOT USE THE WEB COMPILER WITH THIS PLUGIN! IT DOESN'T WORK PROPERLY!

deagsmapmanager.txt-542.zip is an updated dictionary file for use with the v3.25Beta release.
Attached Files
File Type: zip deagsmapmanager.txt-542.zip (28.1 KB, 2460 views)
File Type: zip deagsmapmanager3.25Beta.zip (62.8 KB, 3175 views)

Last edited by DynamicBits; 12-29-2013 at 01:16. Reason: Added v3.25Beta files and other info, Updated documentation, Updated translation
DynamicBits is offline