View Single Post
Plugin Info:     Modification:          Category:          Approver:   Zenith77 (34)
Senior Member
Join Date: Dec 2006
Location: Cardiff, South Wales
Old 11-27-2007 , 14:36   NextMap with Sven Co-op Fix
Reply With Quote #1


I've spent a lot of time modifying the original nextmap plugin, and fixed it to work with Sven Co-op map cycles.

The differences are mainly to only increment the map cycle position when the map at the current position is being played, so map series do not cause maps in the cycle to get skipped. It also allows the nextmap cvar that some maps decide to use work, and still not skip maps.

I've commented around stuff I've added/changed.

Worth mentioning: I have not designed or tested this plugin in any other game than Sven Co-op. Although it may appear to work, I highly recommend you do not use it on a live public or private server for any other game than Sven Co-op.


Ensure you comment out the original nextmap.amxx in your plugins.ini. Place my nextmap_sven.amxx in the same plugins folder (or anywhere you want really) and add a new line for nextmap_sven.amxx underneath the commented out nextmap.amxx line.

I do not recommend you overwrite the original nextmap.amxx in case you have problems with this modified one. However, you can set amx_nextmap_svenfix to 0 to disable my modifications without having to load the original plugin. It is 1 by default, you do not need to specify that to any configuration file.

If you want to use the new feature that will randomize selections through your map cycle, you also need to define CVAR amx_nextmap_random with value 1. This feature is disabled by default to prevent confusion for those of you updating blindly. If you are going to use this feature then you should also have a large map cycle to go with it for best results. (really, 50+ maps) This will greatly improve the fresh/unpredicted experience your players will get.

Please let me know if this plugin works properly on your server. I suggest you test it out with map series, keeping note of your cycle. Some test procedures and an overview of the original problem can be found here.


  • Added functionality to send the next map to player score boards (for Sven Co-op 4.5 and later).
  • Also changed CVAR's to pointer CVAR's.

Sorry for the long publish delay...
  • New feature: Option to choose a next map at random, instead of progress through the cycle in a linear fashion.
    The currently and previously played map from the cycle (oh yes, taking into account Sven Co-op multimaps) are excluded from selection.
    This feature requires 3+ maps in the cycle, and is disabled by default to prevent confusion. Set CVAR "amx_nextmap_random" to 1 to enable this feature.
  • New feature: Command to choose a new map "amx_nextmap_choose [map]".
    Using this command will let you specify the next map manually, or if the parameter is left blank choose one from the cycle at random. Doing so via this command will also update the next map on the scoreboard.
    Default access is ADMIN_MAP.
  • New feature: The map being loaded is now shown when the intermission scoreboard appears.
Back-end changes of which won't be noticed by players:
  • Added more comments so other people can see what's going on more.
  • Cleaned up log/console outputs.
  • Made more use of pointer CVAR's.
  • Moved a lot of common functionality into re-usable functions.
  • More meaningful variable names.
Attached Files
File Type: sma Get Plugin or Get Source (nextmap_sven.sma - 1624 views - 12.7 KB)
File Type: sma Get Plugin or Get Source (nextmap_sven_20120201.sma - 1288 views - 8.2 KB)

Adam Reece - Sven Co-op team.

Last edited by AdamR; 05-20-2013 at 15:45. Reason: Update: 26/Jan/2013
AdamR is offline
Send a message via Skype™ to AdamR