Map Size Picker
AMX_MSP v1.6
This is my first "real" plugin, so any advice is really appreciated
Aren't You tired of playing 2vs2 on huge maps like de_dust2? You don't have access to amx_votemap nor amx_map. Even if You're an admin, You're forcing Your players to play on map, that isn't made for current player count.
Here is the solution -
amx_msp
Whenever there are to many or not enough players for the map, the plugin shows the vote with 6 (#define MAX_VOTE_MAPS 6 <- change this) maps, picked according to the current player count. Before this happens, the HUD message is displayed with 60 seconds countdown. When player connects or disconnects, the countdown is cancelled IF the player count is right for current map.
amx_msp uses config file
addons/amxmodx/msp.ini (You can change this path in source) - the structure is as follows:
map_name minimum_players maximum_players
i.e. cs_assault 8 20
You can copy Your mapcycle.txt or maps.ini file -
amx_msp skips maps without minimum_players and maximum_players.
The plugin also displays vote just before the end of map (so You don't need any "mapchooser" and such).
If there is no msp config for current map, the HUD message is displayed. In such situation any admin, which have admin_map priviliges, can set max and min players using:
amx_msp min max
To fix: "no such command"
TODO: translation, code optimization, using mapcycle.txt
History:
v1.6
-
amx_nextmap is dynamically updated depending on number of players.
- fixed some other problems
v1.5b
- if current number of players is higher than config says, the countdown starts at
60s/(current_player_count-max_players_for_map)
- if current number of players is lower than config says, the countdown starts at
180s/(min_players_for_map-current_player_count)