PDA

View Full Version : Nextmap Chooser+ (remembers maps now)


KiN | SuicideDog
06-17-2004, 17:06
/* AMX Mod X
* Nextmap Chooser+ Plugin
*
* Modded by SuicideDog 6/16/2004 from orginal AMXX mapchooser
* version fomr amxx
*
* Changes:
*
* *Now saves the last (LASTMAPS) maps and doesn't call them up when voting
* *Changed the timing on when the menu should try to come up. It should now
* wait 6 seconds after the round starts in addition the checks it did before
*
* Special thanks to PM and Scarzzurs for helping me figure some stuff out.
*
* NOTE: THIS PLUGIN WILL ONLY WORK FOR CSTRIKE, and CZ
*
* CHANGELOG:
*
* 0.1 Intial release
* 0.2 Fix little typo that caused major CPU usage.
* 0.3 Change sequencing a little, now it's a little smoother
* 0.4 Update 8/3/06 to working with AMXX 1.75(x)
* 0.5 Fixed a couple of typos.
*/
MAPS MUST BE IN MAPS.INI

|2ob
06-17-2004, 18:18
could you make a nomination option so players can nominate maps to vote from but deny it if it is one of the last 5 maps played?

Burnzy
06-17-2004, 18:33
like so people type 'dust2_cz' and it puts a nomination for it. But like the 3rd to last map was assault, and then sumone says 'assault', it will like say, "A nomination must not come from the last 5 maps played on the server"

|2ob
06-17-2004, 18:36
exactly.

Girthesniper
06-17-2004, 18:44
Deagle's is way better.

|2ob
06-17-2004, 18:48
some people just want simplicity... deagle's has too much shit goin on.

i just need a plugin that doesnt allow last 5 maps played, users can nominate maps, and a simple vote with no annoying count down.

rjlan82
06-17-2004, 19:51
I agree. People don't understand deagle's system anyways

|2ob
06-17-2004, 20:46
im not trying to insult that plugin but the plugin counts down... u kno w15, 14... ect. after it hits 1... you have to wait another 10 seconds for it to pop up... i like this plugin i JUST need nominations and ill be set.

KiN | SuicideDog
06-17-2004, 21:15
Sorry I won't be doing a nomination system. I would have to completely recode the plugin for that. We don't need it on our server and frankly I'm way to lazy to do anything I don't need. Deagles plugin has those features, and is a really nice plugin. I don't run it cuz I don't need all that stuff .. and as I've said before in my other posts I beleive in 2 things when it comes to plugins:

KISS (Keep It Simple Stupid)
and
CUSS (Cut Unneeded Sh*t Stupid) .

If someone want to add on to the plugin be my guest :)

KiN | SuicideDog
06-17-2004, 21:19
Deagle's is way better.

I would say Deagle has a lot more stuff .. but I wouldn't call it better just because it has more stuff.

But thanks for the support.. not

KiN | SuicideDog
06-19-2004, 01:31
updated

KiN | SuicideDog
06-19-2004, 04:17
I'm curious.. has anyone given this a try? If so .. any problems

-=STN=- MaGe
07-20-2004, 15:17
hey i cant get it to do the votes, the plugin is running and were on a cz server

KiN | SuicideDog
07-20-2004, 17:26
it's funny you mention that. I just put up a CZ server like 2 days ago.. and I just noticed that the other night. I will have to look into that. I bet it's checking something that isn't there on CZ (like teamscore or something). I will debug and let you know.

-=STN=- MaGe
07-20-2004, 17:38
there are a few servers that i play on that have map choosers, i put this one on and two others and they dont work for me

is there and configuration i need to do to start it, how does it know which maps to choose

blackflagg
07-20-2004, 20:14
mapchooser.ini? Im confused. Do I have to create this ini file and add a list of maps that are votable into it?

-=STN=- MaGe
07-21-2004, 10:54
Don't forget to create the mapchooser.ini file in your amx-custom-mapchooser dir!

hardly any one can see tihs

-=STN=- MaGe
07-21-2004, 12:39
yea i got it to work

does it choose the maps in the mapchooserini randomly, as i have them in alphbetical order

blackflagg
07-21-2004, 12:44
I saw Don't forget to create the mapchooser.ini file in your amx-custom-mapchooser dir just fine. My question was what to put in it.

-=STN=- MaGe
07-21-2004, 13:36
make a mapchooser folder in amxx / custom folder

in side that make a mapchooser.ini and place the maps in there you want to display like the the format of you mapcycle.txt

KiN | SuicideDog
07-21-2004, 14:36
I made it a different file cuz I wanted to have the admins have a whole bunch of maps to choose from .. but the chooser plugin a different list.

If you take the maps.ini from the configs dir and rename it to mapchooser.ini in the custom/mapchooser dir that will work.

I will upload a version that uses the original maps.ini file.

KiN | SuicideDog
07-21-2004, 14:52
Uploaded.. but didn't test.. let me know if it works.

KiN | SuicideDog
07-21-2004, 16:49
yea i got it to work

does it choose the maps in the mapchooserini randomly, as i have them in alphbetical order

Yes it's random (just like the default plugin that comes with amxx). What did you do to get it to work? Did you change the code or what? Maybe I didn't set it up right on mine. I only spent like 25 mins setting up the server. Had to update a couple of plugins (like stats to statsx and gore to extreme gore). But other than that the only thing I had problems with was my mapchooser plugin. I still haven't had a change to look at it.

-=STN=- MaGe
07-21-2004, 17:53
yea the only problem i had was i didnt see this lol

Don't forget to create the mapchooser.ini file in your amx-custom-mapchooser dir

apart from that it works fine

also could you add somet like

1: [Map] results [5]
2: [Map] results [5]
3: [Map] results [5]
4: [Map] restilts [6]

Therefore [Map] Got most votes, nextmap will be [Map]

KiN | SuicideDog
07-21-2004, 18:13
been thinking about doing that.. should be a small mod to the script. Orginally I just modded the default nextmap chooser plugin. You are the first that has requested that. I might do it.

darkdog
07-22-2004, 01:23
Also is it possible to have more than 4 votes? I hear people complain..Oh all those maps suck,Is there anyway you can have like 6?

-=STN=- MaGe
07-22-2004, 15:27
is there any chance of adding 2 more seconds to voting time

we have a 32 man server and only half have time

-=STN=- MaGe
07-23-2004, 13:06
HEYA

when the vote come up it some times

has dust twice
dust2 twice
fastlane twice
piriances twcie

why is this?

sznaps
07-24-2004, 13:53
Will this script work in The Specialist?

KiN | SuicideDog
07-24-2004, 15:30
HEYA

when the vote come up it some times

has dust twice
dust2 twice
fastlane twice
piriances twcie

why is this?

I don't know why that is happening. Haven't seen that before. Make sure you don't have the maps listed twice in the ini file.

KiN | SuicideDog
07-24-2004, 15:32
Will this script work in The Specialist?

I'm not sure.. if the maps are handled the same way as cs then it should. If you want test the use the nextmap chooser plugin that comes with the amxx package. If that one works then this one should also. It's just a modification of the one that comes with the default package.

I hope the Devs take my plugin and fix it up and include the option of remembering maps in the default package.

-=STN=- MaGe
07-24-2004, 22:09
here is my map list

de_dust_cz
cs_italy_cz
cs_militia_cz
cs_office_cz
de_airstrip_cz
de_aztec_cz
de_cbble_cz
de_chateau_cz
de_dust2_cz
fy_iceworld_cz
de_fastline_cz
de_inferno_cz
de_piranesi_cz
de_prodigy_cz
de_sienna_cz
sniper
de_stadium_cz
de_tides_cz
de_torn_cz
de_vostok_cz
cs_downed_cz
cs_havana_cz

-=STN=- MaGe
07-24-2004, 22:10
also dust2 comes up nearly every vote

-=STN=- MaGe
07-26-2004, 13:31
next the time the vote pops up changes, before it was 2 mins now it does it in last 15 seconds

KiN | SuicideDog
07-26-2004, 23:07
I didn't touch anything that messes with the vote timers..

I haven't had a change to look at it much man.. sorry

italianblaze
08-11-2004, 14:21
Whose PM are you reffering to PLANET MAYHEM.org??? hhaha

-=STN=- MaGe
08-23-2004, 09:24
Doesnt compile with 0.20

geo
12-04-2004, 07:06
I`ve the same Problems.
I`ve a 32Slot public cs 1.6 server

1. often the vote starts not 90 second before the Map changed. Randoms like 30secs etc take place

2. When the map is over the most voted map is not changed. Ir goes after the mapcycle.

3. Often i get 3xde_inferno or dust2 in the vote

s.w.a.t
12-04-2004, 15:21
yeah i run a cz server with war3x and the second sma isnt voting weird all files are in palce too

Kamikaze
12-05-2004, 12:39
Don't use this plugin with AMXX 0.20 or higher because it wasn't made for those versions, look at the date the author posted this, July.

geo
12-05-2004, 13:37
Will there be a new version soon?? :)
I think this moded mapchooser is mutch beter than the original one.

Chaotic
01-03-2005, 17:24
yeah, a converted plugin for 1.0 would be very cool

robbob4
02-04-2005, 08:36
So does this not work on AMX1.0 or what am I doing wrong? Even though this plugin is pretty old.
L 02/04/2005 - 00:42:36: -------- Mapchange --------
L 02/04/2005 - 00:42:37: [amx_ejl_dice.amxx] [OD]rObBoB_44's Wc3FT Server<0><><>" dice_mode on"
L 02/04/2005 - 00:42:37: [amx_ejl_dice.amxx] [OD]rObBoB_44's Wc3FT Server<0><><>" dice_mode_default is now ON"
L 02/04/2005 - 00:50:44: [mapchooser.amxx] Vote: Voting for the nextmap started
L 02/04/2005 - 00:50:44: [mapchooser.amxx] Vote: Voting for the nextmap started
L 02/04/2005 - 00:50:59: [mapchooser.amxx] Vote: Voting for the nextmap finished. The nextmap will be cs_estate
L 02/04/2005 - 00:50:59: [mapchooser.amxx] Vote: Voting for the nextmap finished. The nextmap will be fy_pizzahut
L 02/04/2005 - 00:53:02: -------- Mapchange --------
L 02/04/2005 - 00:53:04: [amx_ejl_dice.amxx] [OD]rObBoB_44's Wc3FT Server<0><><>" dice_mode on"
L 02/04/2005 - 00:53:04: [amx_ejl_dice.amxx] [OD]rObBoB_44's Wc3FT Server<0><><>" dice_mode_default is now ON"
L 02/04/2005 - 01:01:13: [mapchooser.amxx] Vote: Voting for the nextmap started
L 02/04/2005 - 01:01:13: [mapchooser.amxx] Vote: Voting for the nextmap started
L 02/04/2005 - 01:01:28: [mapchooser.amxx] Vote: Voting for the nextmap finished. The nextmap will be de_airstrip
L 02/04/2005 - 01:03:29: -------- Mapchange --------
L 02/04/2005 - 01:03:30: [amx_ejl_dice.amxx] [OD]rObBoB_44's Wc3FT Server<0><><>" dice_mode on"
L 02/04/2005 - 01:03:30: [amx_ejl_dice.amxx] [OD]rObBoB_44's Wc3FT Server<0><><>" dice_mode_default is now ON"
L 02/04/2005 - 01:12:53: [mapchooser.amxx] Vote: Voting for the nextmap started
L 02/04/2005 - 01:12:53: [mapchooser.amxx] Vote: Voting for the nextmap started
L 02/04/2005 - 01:13:09: [mapchooser.amxx] Vote: Voting for the nextmap finished. The nextmap will be cs_deagle5
L 02/04/2005 - 01:13:58: -------- Mapchange --------
L 02/04/2005 - 01:13:59: [amx_ejl_dice.amxx] [OD]rObBoB_44's Wc3FT Server<0><><>" dice_mode on"
L 02/04/2005 - 01:13:59: [amx_ejl_dice.amxx] [OD]rObBoB_44's Wc3FT Server<0><><>" dice_mode_default is now ON"
L 02/04/2005 - 01:21:59: [mapchooser.amxx] Vote: Voting for the nextmap started
L 02/04/2005 - 01:21:59: [mapchooser.amxx] Vote: Voting for the nextmap started
L 02/04/2005 - 01:22:14: [mapchooser.amxx] Vote: Voting for the nextmap finished. The nextmap will be cs_mario_b2
L 02/04/2005 - 01:22:14: [mapchooser.amxx] Vote: Voting for the nextmap finished. The nextmap will be starwars2a
L 02/04/2005 - 01:24:18: -------- Mapchange --------

AHA I figured it out, I had this plugin twice in plugins.ini (had it as 3rd party & original) I didnt know you could load duplicate plugins? lol

robbob4
02-05-2005, 10:30
Ok but ive noticed something new... Look at what it's doing on these logs...

L 02/04/2005 - 18:11:23: [mapchooser.amxx] Vote: Voting for the nextmap started
L 02/04/2005 - 18:11:38: [mapchooser.amxx] Vote: Voting for the nextmap finished. The nextmap will be cs_mario_b2
L 02/04/2005 - 18:12:52: -------- Mapchange --------
L 02/04/2005 - 18:12:55: [amx_ejl_dice.amxx] [OD]rObBoB_44's Wc3FT Server<0><><>" dice_mode on"
L 02/04/2005 - 18:12:55: [amx_ejl_dice.amxx] [OD]rObBoB_44's Wc3FT Server<0><><>" dice_mode_default is now ON"
L 02/04/2005 - 19:02:34: -------- Mapchange --------
L 02/04/2005 - 19:02:38: [amx_ejl_dice.amxx] [OD]rObBoB_44's Wc3FT Server<0><><>" dice_mode on"
L 02/04/2005 - 19:02:38: [amx_ejl_dice.amxx] [OD]rObBoB_44's Wc3FT Server<0><><>" dice_mode_default is now ON"
L 02/04/2005 - 19:53:46: -------- Mapchange --------
L 02/04/2005 - 19:54:05: [amx_ejl_dice.amxx] [OD]rObBoB_44's Wc3FT Server<0><><>" dice_mode on"
L 02/04/2005 - 19:54:05: [amx_ejl_dice.amxx] [OD]rObBoB_44's Wc3FT Server<0><><>" dice_mode_default is now ON"
L 02/04/2005 - 19:56:06: -------- Mapchange --------
L 02/04/2005 - 19:56:15: [amx_ejl_dice.amxx] [OD]rObBoB_44's Wc3FT Server<0><><>" dice_mode on"
L 02/04/2005 - 19:56:15: [amx_ejl_dice.amxx] [OD]rObBoB_44's Wc3FT Server<0><><>" dice_mode_default is now ON"
L 02/04/2005 - 19:56:36: -------- Mapchange --------
L 02/04/2005 - 19:56:39: [amx_ejl_dice.amxx] [OD]rObBoB_44's Wc3FT Server<0><><>" dice_mode on"
L 02/04/2005 - 19:56:39: [amx_ejl_dice.amxx] [OD]rObBoB_44's Wc3FT Server<0><><>" dice_mode_default is now ON"
L 02/04/2005 - 21:24:55: -------- Mapchange --------
L 02/04/2005 - 21:25:14: [amx_ejl_dice.amxx] [OD]rObBoB_44's Wc3FT Server<0><><>" dice_mode on"
L 02/04/2005 - 21:25:14: [amx_ejl_dice.amxx] [OD]rObBoB_44's Wc3FT Server<0><><>" dice_mode_default is now ON"
L 02/04/2005 - 21:26:28: [admincmd.amxx] Cmd: "[OD]rObBoB_44's Wc3FT Server<0><><>" changelevel "cs_mario_b2"
L 02/04/2005 - 21:26:32: -------- Mapchange --------
L 02/04/2005 - 21:26:34: [amx_ejl_dice.amxx] [OD]rObBoB_44's Wc3FT Server<0><><>" dice_mode on"
L 02/04/2005 - 21:26:34: [amx_ejl_dice.amxx] [OD]rObBoB_44's Wc3FT Server<0><><>" dice_mode_default is now ON"
L 02/04/2005 - 21:53:33: [mapchooser.amxx] Vote: Voting for the nextmap started
L 02/04/2005 - 21:54:41: -------- Mapchange --------
L 02/04/2005 - 21:54:43: [amx_ejl_dice.amxx] [OD]rObBoB_44's Wc3FT Server<0><><>" dice_mode on"
L 02/04/2005 - 21:54:43: [amx_ejl_dice.amxx] [OD]rObBoB_44's Wc3FT Server<0><><>" dice_mode_default is now ON"
L 02/04/2005 - 21:59:11: [admincmd.amxx] Cmd: "[OD]rObBoB_44's Wc3FT Server<0><><>" changelevel "de_dust2"
L 02/04/2005 - 21:59:14: -------- Mapchange --------
L 02/04/2005 - 21:59:16: [amx_ejl_dice.amxx] [OD]rObBoB_44's Wc3FT Server<0><><>" dice_mode on"
L 02/04/2005 - 21:59:16: [amx_ejl_dice.amxx] [OD]rObBoB_44's Wc3FT Server<0><><>" dice_mode_default is now ON"
L 02/04/2005 - 21:59:47: [admincmd.amxx] Cmd: "[OD]rObBoB_44's Wc3FT Server<0><><>" changelevel "air_fight"
L 02/04/2005 - 21:59:49: -------- Mapchange --------
L 02/04/2005 - 21:59:51: [amx_ejl_dice.amxx] [OD]rObBoB_44's Wc3FT Server<0><><>" dice_mode on"
L 02/04/2005 - 21:59:51: [amx_ejl_dice.amxx] [OD]rObBoB_44's Wc3FT Server<0><><>" dice_mode_default is now ON"
L 02/04/2005 - 22:03:16: [admincmd.amxx] Cmd: "[OD]rObBoB_44's Wc3FT Server<0><><>" slay "[OD]NecromanZerBot<21><BOT><>"
L 02/04/2005 - 22:15:39: -------- Mapchange --------
L 02/04/2005 - 22:15:41: [amx_ejl_dice.amxx] [OD]rObBoB_44's Wc3FT Server<0><><>" dice_mode on"
L 02/04/2005 - 22:15:41: [amx_ejl_dice.amxx] [OD]rObBoB_44's Wc3FT Server<0><><>" dice_mode_default is now ON"
L 02/04/2005 - 22:42:21: [mapchooser.amxx] Vote: Voting for the nextmap started
L 02/04/2005 - 22:42:36: [mapchooser.amxx] Vote: Voting for the nextmap finished. The nextmap will be as_oilrig
L 02/04/2005 - 22:44:42: -------- Mapchange --------
L 02/04/2005 - 22:44:44: [amx_ejl_dice.amxx] [OD]rObBoB_44's Wc3FT Server<0><><>" dice_mode on"
L 02/04/2005 - 22:44:44: [amx_ejl_dice.amxx] [OD]rObBoB_44's Wc3FT Server<0><><>" dice_mode_default is now ON"
L 02/04/2005 - 23:17:51: [mapchooser.amxx] Vote: Voting for the nextmap started
L 02/04/2005 - 23:18:06: [mapchooser.amxx] Vote: Voting for the nextmap finished. The nextmap will be cs_assault

and

L 02/05/2005 - 00:44:56: -------- Mapchange --------
L 02/05/2005 - 00:44:57: [amx_ejl_dice.amxx] [OD]rObBoB_44's Wc3FT Server<0><><>" dice_mode on"
L 02/05/2005 - 00:44:57: [amx_ejl_dice.amxx] [OD]rObBoB_44's Wc3FT Server<0><><>" dice_mode_default is now ON"
L 02/05/2005 - 00:58:00: [mapchooser.amxx] Vote: Voting for the nextmap started
L 02/05/2005 - 00:58:15: [mapchooser.amxx] Vote: Voting for the nextmap finished. The nextmap will be cs_deagle5
L 02/05/2005 - 01:08:28: -------- Mapchange --------
L 02/05/2005 - 01:08:30: [amx_ejl_dice.amxx] [OD]rObBoB_44's Wc3FT Server<0><><>" dice_mode on"
L 02/05/2005 - 01:08:30: [amx_ejl_dice.amxx] [OD]rObBoB_44's Wc3FT Server<0><><>" dice_mode_default is now ON"
L 02/05/2005 - 01:32:02: -------- Mapchange --------
L 02/05/2005 - 01:32:03: [amx_ejl_dice.amxx] [OD]rObBoB_44's Wc3FT Server<0><><>" dice_mode on"
L 02/05/2005 - 01:32:03: [amx_ejl_dice.amxx] [OD]rObBoB_44's Wc3FT Server<0><><>" dice_mode_default is now ON"
L 02/05/2005 - 01:45:06: [mapchooser.amxx] Vote: Voting for the nextmap started
L 02/05/2005 - 01:45:21: [mapchooser.amxx] Vote: Voting for the nextmap finished. The nextmap will be cs_estate
L 02/05/2005 - 01:55:35: -------- Mapchange --------

and

L 02/05/2005 - 05:51:09: -------- Mapchange --------
L 02/05/2005 - 05:51:11: [amx_ejl_dice.amxx] [OD]rObBoB_44's Wc3FT Server<0><><>" dice_mode on"
L 02/05/2005 - 05:51:11: [amx_ejl_dice.amxx] [OD]rObBoB_44's Wc3FT Server<0><><>" dice_mode_default is now ON"
L 02/05/2005 - 06:04:14: [mapchooser.amxx] Vote: Voting for the nextmap started
L 02/05/2005 - 06:14:44: -------- Mapchange --------

and

L 02/05/2005 - 07:01:51: -------- Mapchange --------
L 02/05/2005 - 07:01:52: [amx_ejl_dice.amxx] [OD]rObBoB_44's Wc3FT Server<0><><>" dice_mode on"
L 02/05/2005 - 07:01:52: [amx_ejl_dice.amxx] [OD]rObBoB_44's Wc3FT Server<0><><>" dice_mode_default is now ON"
L 02/05/2005 - 07:14:55: [mapchooser.amxx] Vote: Voting for the nextmap started
L 02/05/2005 - 07:29:12: [mapchooser.amxx] Vote: Voting for the nextmap started
L 02/05/2005 - 07:29:28: [mapchooser.amxx] Vote: Voting for the nextmap finished. The nextmap will be de_dust2002
L 02/05/2005 - 07:31:19: -------- Mapchange --------
L 02/05/2005 - 07:31:20: [amx_ejl_dice.amxx] [OD]rObBoB_44's Wc3FT Server<0><><>" dice_mode on"
L 02/05/2005 - 07:31:20: [amx_ejl_dice.amxx] [OD]rObBoB_44's Wc3FT Server<0><><>" dice_mode_default is now ON"
L 02/05/2005 - 07:44:33: [mapchooser.amxx] Vote: Voting for the nextmap started
L 02/05/2005 - 08:00:47: -------- Mapchange --------

Is logging not working 100% on some of these maps or what is the plugin doing? Or do I need to compile this myself to make it AMXX1.0?

Curryking
03-04-2005, 18:51
Any chance to get this running under Amxx v1.0?

Greetz,
CK

defender
06-17-2005, 15:34
Yes I want this plugin as well. Could someone be so kind as to fix it?

I will paypal anyone $10 if they can get it fixed.

defender
06-17-2005, 15:36
/* AMX Mod X
* Nextmap Chooser+ Plugin
*
* Modded by SuicideDog 6/16/2004 from orginal AMXX mapchooser
* version fomr amxx
*
* Changes:
*
* *Now saves the last (LASTMAPS) maps and doesn't call them up when voting
* *Changed the ini file to /$amx/$customdir/mapchooser/mapchooser.ini. I
* did this so I could have different maps for admin to vote from.
* *Changed the timing on when the menu should try to come up. It should now
* wait 6 seconds after the round starts in addition the checks it did before
*
* Special thanks to PM and Scarzzurs for helping me figure some stuff out.
*
* CHANGELOG:
*
* 0.1 Intial release
* 0.2 Fix little typo that caused major CPU usage.
* 0.3 Change sequencing a little, now it's a little smoother
*/

#include <amxmodx>
#include <amxmisc>

#define MAX_MAPS 128
#define SELECTMAPS 5
#define LASTMAPS 5

new g_mapName[MAX_MAPS][32]
new g_mapNums

new g_nextName[SELECTMAPS]
new g_voteCount[SELECTMAPS+2]
new g_mapVoteNum
new g_teamScore[2]
new g_lastMap[LASTMAPS+2][32]
new g_message[10]
new g_mapchooserconfig[64];

new g_countstr[3]
new g_tempbuffer[32]
new g_cstrikeRunning
new bool:g_selected = false

public plugin_init()
{
register_plugin("Nextmap Chooser+","0.3","SuicideDog")
register_menucmd(register_menuid("AMX Choose nextmap:"),(-1^(-1<<(SELECTMAPS+2))),"countVote")
register_cvar("amx_extendmap_max","90")
register_cvar("amx_extendmap_step","15")
register_event( "TeamScore", "NewRound", "a")

if ( ( g_cstrikeRunning = is_running("cstrike") ) != 0 ){
register_event("TeamScore", "team_score", "a")
}

for(new count = 1;count<=LASTMAPS;++count){
num_to_str(count,g_countstr,2)
format(g_message,9,"lastmap%c",g_countstr)
get_localinfo(g_message,g_tempbuffer,31)
copy(g_lastMap[count][0], 31, g_tempbuffer)
server_print("%s = %s",g_message, g_lastMap[count])
}

get_configsdir(g_mapchooserconfig, 63);
format(g_mapchooserconfig, 63, "%s/maps.ini", g_mapchooserconfig);
}

public NewRound(){
if ( loadSettings(g_mapchooserconfig) )
set_task(13.0,"voteNextmap",987456)
server_print("check got called")
}

public checkVotes(){
new b = 0
for(new a = 0; a < g_mapVoteNum; ++a)
if (g_voteCount[b] < g_voteCount[a])
b = a
if ( g_voteCount[SELECTMAPS] > g_voteCount[b] ) {
new mapname[32]
get_mapname(mapname,31)
new Float:steptime = get_cvar_float("amx_extendmap_step")
set_cvar_float("mp_timelimit", get_cvar_float("mp_timelimit") + steptime )
client_print(0,print_chat,"Choosing finished. Current map will be extended to next %.0f minutes", steptime )
log_amx("Vote: Voting for the nextmap finished. Map %s will be extended to next %.0f minutes",
mapname , steptime )
return
}
if ( g_voteCount[b] && g_voteCount[SELECTMAPS+1] <= g_voteCount[b] )
set_cvar_string("amx_nextmap", g_mapName[g_nextName[b]] )
new smap[32]
get_cvar_string("amx_nextmap",smap,31)
client_print(0,print_chat,"Choosing finished. The nextmap will be %s", smap )
log_amx("Vote: Voting for the nextmap finished. The nextmap will be %s", smap)
}

public countVote(id,key){
if ( get_cvar_float("amx_vote_answers") ) {
new name[32]
get_user_name(id,name,31)
if ( key == SELECTMAPS )
client_print(0,print_chat,"%s chose map extending", name )
else if ( key < SELECTMAPS )
client_print(0,print_chat,"%s chose %s", name, g_mapName[g_nextName[key]] )
}
++g_voteCount[key]
return PLUGIN_HANDLED
}

bool:isInMenu(id){
for(new a=0; a<g_mapVoteNum; ++a)
if (id==g_nextName[a])
return true
return false
}

public voteNextmap(){
remove_task(987456)
new winlimit = get_cvar_num("mp_winlimit")
new maxrounds = get_cvar_num("mp_maxrounds")
if ( winlimit ) {
new c = winlimit - 2
if ( (c > g_teamScore[0]) && (c > g_teamScore[1]) ) {
g_selected = false
return
}
}
else if ( maxrounds ) {
if ( (maxrounds - 2) > (g_teamScore[0] + g_teamScore[1]) ){
g_selected = false
return
}
}
else {
new timeleft = get_timeleft()
if (timeleft<1||timeleft>129){
g_selected = false
return
}
}
if (g_selected)
return
g_selected = true
new menu[512], a, mkeys = (1<<SELECTMAPS+1)
new pos = copy(menu,511,g_cstrikeRunning ? "\yAMX Choose nextmap:\w^n^n" : "AMX Choose nextmap:^n^n")
new dmax = (g_mapNums > SELECTMAPS) ? SELECTMAPS : g_mapNums
for(g_mapVoteNum = 0;g_mapVoteNum<dmax;++g_mapVoteNum){
a=random_num(0,g_mapNums-1)
while( isInMenu(a) )
if (++a >= g_mapNums) a = 0
g_nextName[g_mapVoteNum] = a
pos += format(menu[pos],511,"%d. %s^n",g_mapVoteNum+1,g_mapName[a])
mkeys |= (1<<g_mapVoteNum)
g_voteCount[g_mapVoteNum] = 0
}
menu[pos++]='^n'
g_voteCount[SELECTMAPS] = 0
g_voteCount[SELECTMAPS+1] = 0
new mapname[32]
get_mapname(mapname,31)

if ( (winlimit + maxrounds)==0 && (get_cvar_float("mp_timelimit") < get_cvar_float("amx_extendmap_max"))){
pos += format(menu[pos],511,"%d. Extend map %s^n",SELECTMAPS+1,mapname)
mkeys |= (1<<SELECTMAPS)
}

format(menu[pos],511,"%d. None",SELECTMAPS+2)
show_menu(0,mkeys,menu,15)
set_task(15.0,"checkVotes")
client_print(0,print_chat,"It's time to choose the nextmap...")
client_cmd(0,"spk Gman/Gman_Choose2")
log_amx("Vote: Voting for the nextmap started")
}

loadSettings(filename[])
{
if (!file_exists(filename)) return 0

new szText[32]
new a, pos= 0
new match = 0
new currentMap[32]
get_mapname(currentMap,31)

while ( (g_mapNums < MAX_MAPS) && read_file(filename,pos++,szText,31,a) )
{

if ( szText[0] != ';'
&& parse(szText, g_mapName[g_mapNums] ,31 )
&& is_map_valid( g_mapName[g_mapNums] )
&& !equali( g_mapName[g_mapNums] ,currentMap) ){

for(new count = 1;count <= LASTMAPS;++count){
if (equali( g_mapName[g_mapNums] ,g_lastMap[count])){
match = 1
}
}
if (match < 1){
++g_mapNums
}else match = 0
}
}
return g_mapNums
}

public team_score(){
new team[2]
read_data(1,team,1)
g_teamScore[ (team[0]=='C') ? 0 : 1 ] = read_data(2)
}

public plugin_end(){
for(new count = 2;count<=LASTMAPS;++count){
num_to_str(count,g_countstr,2)
format(g_message,9,"lastmap%c",g_countstr)
copy(g_tempbuffer, 31,g_lastMap[count-1][0])
set_localinfo(g_message,g_tempbuffer)
}
new current_map[32]
get_mapname(current_map,31 )
set_localinfo("lastmap1",current_map)
}

WaZZeR++
06-17-2005, 17:35
try this, havnt try it, but i think it will work(as usuall :P), tell me all errors

defender
06-17-2005, 18:14
When is the vote suppose to take place? Also is this using the regular maps.ini file?

I have set my rounds to 15 minutes to speed up testing. I see that in amx_plugins it displays as running.

defender
06-17-2005, 18:18
Well it does not appear to work still. Umm...does it matter I run Condition Zero?

defender
06-17-2005, 19:27
get_configsdir(g_mapchooserconfig, 63);
format(g_mapchooserconfig, 63, "%s/maps.ini", g_mapchooserconfig);
if (!file_exists(g_mapchooserconfig))
get_cvar_string("mapcyclefile", g_mapchooserconfig, 63)

Well this could be the problem?

It looks for maps.ini in %s directory....what should that be? If it doesn't exist it uses mapcyclefile which is what it seems to do. I don't see ANY errors in my logs.

So what is mapchooserconfig?

nightscreem
06-17-2005, 20:04
correct me if i'm wrong but i think
%s = mapchooser configsdir

MattOG
06-17-2005, 22:19
correct me if i'm wrong but i think
%s = mapchooser configsdir

Corrected.

%s is your amxmodx/configs directory.

So what is mapchooserconfig?

g_mapchooserconfig is an internal name for the function in this plugin, don't worry about it.

As long as you have maps.ini in your amxmodx/configs directory, and it has map names in it, you should be fine.

HTH.

Matt.

defender
06-17-2005, 22:58
So then what is the problem?

This plugin seemed so small and simple. Now it doesn't work.

OK.... $15 to the guy that can fix this for 1.0

WaZZeR++
06-18-2005, 02:57
I think the problem is here
for(new count = 1;count<=LASTMAPS;++count){
num_to_str(count,g_countstr,2)
format(g_message,9,"lastmap%c",g_countstr)
get_localinfo(g_message,g_tempbuffer,31)
copy(g_lastMap[count][0], 31, g_tempbuffer)
server_print("%s = %s",g_message, g_lastMap[count])
}

dont know if this is right

new menu[512], a, mkeys = (1<<SELECTMAPS+1)
new pos = format(menu,511,g_coloredMenus ? "\y%L:\w^n^n" : "%L:^n^n", LANG_SERVER, "CHOOSE_NEXTM")
new dmax = (g_mapNums > SELECTMAPS) ? SELECTMAPS : g_mapNums
for(g_mapVoteNum = 0;g_mapVoteNum<dmax;++g_mapVoteNum){
a=random_num(0,g_mapNums-1)
while( isInMenu(a) )
if (++a >= g_mapNums) a = 0
g_nextName[g_mapVoteNum] = a
pos += format(menu[pos],511,"%d. %s^n",g_mapVoteNum+1,g_mapName[a])
mkeys |= (1<<g_mapVoteNum)
g_voteCount[g_mapVoteNum] = 0
}
menu[pos++]='^n'

get a loos identitation in the while function

and something here could allso be wrong:
loadSettings(filename[])
{
if (!file_exists(filename)) return 0

new szText[32]
new a, pos= 0
new match = 0
new currentMap[32]
get_mapname(currentMap,31)

while ( (g_mapNums < MAX_MAPS) && read_file(filename,pos++,szText,31,a) )
{

if ( szText[0] != ';'
&& parse(szText, g_mapName[g_mapNums] ,31 )
&& is_map_valid( g_mapName[g_mapNums] )
&& !equali( g_mapName[g_mapNums] ,currentMap) ){

for(new count = 1;count <= LASTMAPS;++count){
if (equali( g_mapName[g_mapNums] ,g_lastMap[count])){
match = 1
}
}
if (match < 1){
++g_mapNums
}else match = 0
}
}
return g_mapNums
}

Siborg
01-06-2006, 08:47
I have a problem with this plugin where the same map is listed twice when voting begins :cry:

Onto the next voting plugin.

Zky
01-20-2006, 03:50
How to make that for 2 mines up to the end voting was ?

Chaotic
04-13-2006, 17:11
Anybody has a version of this plugin that might actually work?

addam
05-19-2006, 19:22
No updates for this plugin? I need it to.

-=STN=- MaGe
05-20-2006, 07:36
#define MAX_MAPS 128
#define SELECTMAPS 5
#define LASTMAPS 5

mine is like this. will it work?
#define MAX_MAPS 5
#define SELECTMAPS 2
#define LASTMAPS 1

addam
05-20-2006, 09:22
I try to port the amx2005 mapchooser. I never programmed in small before this, so i think it's not the best solution...

Thanks for the AMX team....

I dont know nominations working or not, i dont need this feature on my server.

Dont forget disable the default mapchooser plugin.
Make a maphist.ini file (chmod 777) on your amxmodx/configs folder.
Engine module required.

Tested on UBUNTU Linux AMD64, 64bit hlds, amxmodx 1.71, cs 1.6.

Firefly
06-25-2006, 11:38
i tried above code in amx x 1.60 an get an error msg bad load in amx_plugins. any idea what the problem is ?

KiN | SuicideDog
07-28-2006, 12:19
Ok.. I've come out of retirement to help some friends. I'm going to see is this works with 1.75. If not I will get it working and post an update for it.

Sui

KiN | SuicideDog
08-04-2006, 01:01
Updated. Now works with CS and CZ.

KiN | SuicideDog
08-04-2006, 13:10
Updated again. Fixed a typo that prevent the remembered maps from working right.

KiN | SuicideDog
08-04-2006, 14:03
vote based on time will work..but might be sketchy. I wanted the mapchooser to happen at the begining of each round so it doesn't pop-up right in the middle of a round so I changed it a bit. I will look into doing better checks for time in the near future.

Sui

KiN | SuicideDog
08-04-2006, 20:05
don't use this version.. I'm putting it here for just a bit.

llustig
10-25-2006, 18:14
is there anyway of implementing extend_lastround so that the players can finish up the last round before the map changes with this plugin?

Thanks.

iggy_bus
12-30-2006, 01:31
I have an idea:

Can you modify this plugin to take maps from multiple files in various intervals of a day.

Like this:
03:00 - 10:00 = maps1.ini
10:00 - 15:00 = maps2.ini
15:00 - 20:00 = maps3.ini
20:00 - 23:00 = maps4.ini
23:00 - 03:00 = maps5.ini

iggy_bus
02-03-2007, 03:29
out of support here ?

hcxx
02-19-2007, 15:12
I have problem whit this plugin. some times its starts voting when there is only 10seconds to the map end some times when there is 2minuts to map some times 40seconds and so on.. can some1 fix it that it start the voting when there is only 2min. to the map end plz :oops:

hcxx
03-07-2007, 17:43
not suported anymore?:|

Bic*
02-07-2009, 19:51
I like this plugin! I think it is the way it should be - simple! There's only two things I d love to change in it:

1. When people chose to extend the map, mp_timelimit changes, and it doesnt change backafter the map is finnaly changed.

Example:
-map is de_dust2, mp_timelimit is 45
-vote occur; result: extend current map for 45minutes
-mp_timelimit is now 90
-after 45 minutes another vote occur; result: change map to de_inferno
-map is now de_inferno, but the mp_timelimit is still 90!

mp_timelimit increases by 45 minutes every time players chose to extend the map, and it never changes back!

So it would be great if you just make the plugin to set mp_timelimit to 45 on every mapchange!

2. I have a probem at my servers that I think many other people have on their servers: after few map changes people find themselves on the map which they don't like, and they just simply leave! I found my servers empty many times on some unpopular map like as_oilrig!

So it would be great if you make the plugin to change the map back to de_dust2 if the server gets empty!


If you could make those two changes to your plugin, it would become exactly what people need: not too comlicated, not too simple!

(--eRRoR--)
10-25-2009, 21:27
maibe we cand fix that but somehow making the srv exec the cfg every map.

(--eRRoR--)
10-27-2009, 19:18
And a lot of times the vote starte the last 10 , or 8 seconds and instead of changing to the map voted it changed tho the next map in mapcycle.

Y report this as broken

ScHrAnZ DiNgEnS
10-28-2009, 05:18
set mapchangecfgfile "server.cfg" in the server.cfg and restart server OR set mp_timelimit in amxx.cfg.

(--eRRoR--)
10-29-2009, 09:30
Did you test that?
Does it fix our problems?
And be more specific where to ad that.

ScHrAnZ DiNgEnS
10-29-2009, 09:37
the plugin set ure timelimit to something else, if u change the map the server.cfg is by default not loadet. so the timelimit doestn change back.

if u put a line with mapchangecfgfile "server.cfg" in the server.cfg the server.cfg will load on every mapchange and timelimit is set on every mapchange back...

try it out and be happy...

(--eRRoR--)
10-29-2009, 10:18
thnaks.
BTW is this plugin suported anymore?

(--eRRoR--)
10-29-2009, 10:22
Only this y hav to change to increase the nr. maxim of maps?
"#define MAX_MAPS 128"

ScHrAnZ DiNgEnS
10-29-2009, 10:31
Yes.
I think the plugin is not supported anymore because the last visit from KiN | SuicideDog was on 05-08-2006.

(--eRRoR--)
10-30-2009, 00:57
why do they allways do that? :|