AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Map Size Picker (https://forums.alliedmods.net/showthread.php?t=45584)

KobraPL 10-06-2006 11:09

Map Size Picker
 
2 Attachment(s)
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)

k007 10-06-2006 11:12

Re: Map Size Picker
 
don't post link to ur sma plz use the attachment and it will make another link for the compiled version too

KobraPL 10-06-2006 11:16

Re: Map Size Picker
 
Quote:

Originally Posted by k007 (Post 388200)
don't post link to ur sma plz use the attachment and it will make another link for the compiled version too

as I wrote before - I can't:

Warning: fopen() [function.fopen.php]: SAFE MODE Restriction in effect. The script whose uid is 2533 is not allowed to access /home/groups/alliedmodders/forums/files/2/1/4/0/2 owned by uid 33 in /includes/class_dm_attachment.php on line 574

Warning: fopen(./files/2/1/4/0/2/11244.attach) [function.fopen.php]: failed to open stream: No such file or directory in /includes/class_dm_attachment.php on line 574

k007 10-06-2006 17:55

Re: Map Size Picker
 
should be something like this
Code:
new g_mspFile[] = "dir"
u don't use 32, ur using this var for a dir...

KobraPL 10-07-2006 09:09

Re: Map Size Picker
 
Thanks, edited the source.

MaximusBrood 10-07-2006 09:28

Re: Map Size Picker
 
Don't use hardcoded paths. Use get_configsdir() instead.

KobraPL 10-07-2006 12:56

Re: Map Size Picker
 
Quote:

Originally Posted by MaximusBrood (Post 388488)
Don't use hardcoded paths. Use get_configsdir() instead.

Thank You, I read sticked topic - sorry for not obeying. Fixed!

z0nax 10-08-2006 15:01

Re: Map Size Picker
 
Wow nice!
I think this is usefull.

KobraPL 10-09-2006 05:20

Re: Map Size Picker
 
I'm planning to make an option, which will speed-up the countdown if current player count exceeds MAX_FOR_MAP by X. I use High Ping Kicker on my server - if there are many players and the map is small, half of them will be kicked by HPK. The faster the countdown, the faster optimal map will be played.

Xanimos 10-15-2006 15:33

Re: Map Size Picker
 
The attachment manager is fixed. Please attach the plugin.


All times are GMT -4. The time now is 19:33.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.