Raised This Month: $32 Target: $400
 8% 

Deagles' Map Management 2.30b Updated 10/28


Post New Thread Closed Thread   
 
Thread Tools Display Modes
ancient1
Senior Member
Join Date: Jul 2004
Location: UK
Old 03-05-2005 , 18:48  
#11

If the map ends early, due to a objective being completed [Dustbowl for example], the plugin does not know which map to go to next. So it goes back to the first map in the mapcycle.txt

At least the older version did?

So yeah, maybe a random map from the mapcycle.txt may be the best option?

But can you catch the event before the map changes?

GL anyhoo

Ancient
__________________
ancient1 is offline
thedeagles3
Member
Join Date: Mar 2004
Old 03-05-2005 , 21:26  
#12

Quote:
Originally Posted by ancient1
If the map ends early, due to a objective being completed [Dustbowl for example], the plugin does not know which map to go to next. So it goes back to the first map in the mapcycle.txt

At least the older version did?

So yeah, maybe a random map from the mapcycle.txt may be the best option?

But can you catch the event before the map changes?

GL anyhoo

Ancient
I'm not sure what kind of a CS map that is that has objectives that determine map changes....I suppose it might be possible, I just need some more info on what kind of a map this is, currently my plugin only supports changes on mp_winlimit and mp_timelimit.

On a different note, currently I'm working on modifying my plugin, trying to unify the AMX and AMX-X versions, but at the same time I want to move the config files to the config directory, but I'm getting strange results...so I'm going to need to work on this more, or else just permanently leave the config files in the addons/amxmodx directory
Code:
L 03/05/2005 - 13:23:26: Filling nmaps[0] with tryfill=4, =scoutzknivez, nmaps[]=scoutzknivez
L 03/05/2005 - 13:23:26: Filling nmaps[1] with tryfill=11, =fy_summer_cz, nmaps[]=fy_summer_cz
L 03/05/2005 - 13:23:26: Filling nmaps[2] with tryfill=8, =tr_shotgun, nmaps[]=
L 03/05/2005 - 13:23:26: Filling nmaps[3] with tryfill=5, =fy_shottyboxes_nibs, nmaps[]=fy_shottyboxes_nibs
L 03/05/2005 - 13:23:26: Filling nmaps[4] with tryfill=9, =he_glass, nmaps[]=he_glass
Filled 5 voting slots with random maps
Code:
//(Vote time:)
Map # 1: 
Map # 2: 
Map # 3: 
Map # 4: 
Map # 5: he_glass
L 03/05/2005 - 13:23:26: Vote: Voting for the nextmap started
This is what is happening on the version I'm working on (not yet posted, due to this weird behavior)...but I'm stumped at what is happening here..
__________________
thedeagles3 is offline
ancient1
Senior Member
Join Date: Jul 2004
Location: UK
Old 03-05-2005 , 21:32  
#13

Dustbowl is a TFC map, which ends when one team captures the final command point. This is not uncommon in many TFC attack/deffend style maps.

Since my server runs a lot of this type map, it allways reverts to the firstmap in the mapcycle when the map is finished early..

Ancient
__________________
ancient1 is offline
thedeagles3
Member
Join Date: Mar 2004
Old 03-05-2005 , 21:44  
#14

Quote:
Originally Posted by ancient1
Dustbowl is a TFC map, which ends when one team captures the final command point. This is not uncommon in many TFC attack/deffend style maps.

Since my server runs a lot of this type map, it allways reverts to the firstmap in the mapcycle when the map is finished early..

Ancient
I see...in the meantime, until I get a better grasp on how to deal with that in my released version, you can make it do random maps in the mapcycle. Find the following code:
Code:
      if(!found_a_match)
      {
		line=0
		while(read_file(pathtomaps,line,linestr,255,stextsize)&&!found_a_match&&line<1024)
		{
			format(maptext,31,"%s",linestr)
			if(is_map_valid(maptext)&&!is_map_valid(maptext[1]))
			{
				if(equali(smap,"")) 
				   register_cvar("amx_nextmap","",FCVAR_SERVER|FCVAR_EXTDLL|FCVAR_SPONLY) 				
				set_cvar_string("amx_nextmap",maptext) 
				found_a_match=1
			}
			else
				line++
		}
	}
Now change to:
Code:
      if(!found_a_match)
      {
		line=random_num(0,50)
		new tries=0

		while((read_file(pathtomaps,line,linestr,255,stextsize)||!found_a_match)&&(tries<1024&&!found_a_match))
		{
			format(maptext,31,"%s",linestr)
			if(is_map_valid(maptext)&&!is_map_valid(maptext[1]))
			{
				if(equali(smap,"")) 
				   register_cvar("amx_nextmap","",FCVAR_SERVER|FCVAR_EXTDLL|FCVAR_SPONLY) 				
				set_cvar_string("amx_nextmap",maptext) 
				found_a_match=1
			}
			else{
				line=random_num(0,50)
				tries++
			}
		}
	}
I did not test this yet, but I would think it would randomize the "nextmap" variable, Only in the case where the current map being played is NOT already in the mapcycle.

p.s. to search for this code, first find the public get_listing() function, it appears inside this function.

EDIT: It looks like the config files will be saying in the amxmodx/ directory, since my plugin is starting to behave randomly dealing with strings, ever since I added code to move the files to the new directories.
Here is a common output I am getting:
Code:
] say predator;say inferno;say prodigy
Deagles007 : predator
Adding de_predator to map nomination slot 1
nommaps[0]=de_predator,map=de_predator

nommaps[0]=de_predator

Adding de_inferno to map nomination slot 2
nommaps[1]=de_inferno,map=de_inferno

nommaps[0]=de_inferno
nommaps[1]=de_inferno

Adding de_prodigy to map nomination slot 3
nommaps[2]=de_inferno,map=de_prodigy

nommaps[0]=de_inferno
nommaps[1]=de_inferno
nommaps[2]=de_inferno
Is it just me or does Small language totally suck when it comes to strings...
__________________
thedeagles3 is offline
thedeagles3
Member
Join Date: Mar 2004
Old 03-06-2005 , 00:41  
#15

VI) CHANGELOG:

New in 2.27

Added randomization of "nextmap" when the current map being played does not exist in the server mapcycle.txt
Fixed dmap_maxcustom <N> to strictly control the maximum # of custom maps that appear in the vote
(voted or filled), so that the function does not just control the maximum number of maps that can be nominated.
Config files remain in addons/amxmodx/ directory
__________________
thedeagles3 is offline
m0r0n
Member
Join Date: Mar 2004
Old 03-06-2005 , 01:49  
#16

Thanks for the udpate. Those changes, imo, make it worth installing over the previously released version for amxx.
__________________
West Coast Gaming
www.wcgaming.net
m0r0n is offline
thedeagles3
Member
Join Date: Mar 2004
Old 03-06-2005 , 18:31  
#17

New in 2.27b

Fixed dmap_maxcustom <N> to allow 0 (no custom maps) in the vote. I'm not sure
why this was limited to being greater or equal to 1 in the first place (call it an oversight).
So, setting dmap_maxcustom to 0 will only let players nominate maps in the standardmaps.ini file. Remember, there still is the option for dmap_strict cvar being set to 1 which only lets players nominate maps in the mapcycle.txt. Using both of these options, would be very restrictive, and unreccomended.

I've got an idea for future versions...if the mapvote ends up in a tie, it should start a new vote with only the maps that were tied for # of votes. Let me know if this is a good idea or not.

Edit: This has nothing to do with AMX but if anyone wants an extra admin for their clan CS/CZ server or public CS/CZ server, let me know...I might even be willing to do a "custom" plugin or two for your server ;)
__________________
thedeagles3 is offline
firewalker877
Junior Member
Join Date: Jun 2004
Location: Memphis, TN
Old 03-08-2005 , 18:18  
#18

Deagle, for some reason the current map continues for a couple of rounds after last round is displayed, and then it goes to the next map. I didn't have this problem wit the amx version. Any ideas? Thanks!
firewalker877 is offline
thedeagles3
Member
Join Date: Mar 2004
Old 03-08-2005 , 22:56  
#19

Quote:
Originally Posted by firewalker877
Deagle, for some reason the current map continues for a couple of rounds after last round is displayed, and then it goes to the next map. I didn't have this problem wit the amx version. Any ideas? Thanks!
What mod are you using? I came across a similar problem, but it never took more than 60 seconds to change, even if it was starting new rounds, after it first says "last round". I'm not sure of the error, but I will release an update that limits it to a maximum of 2 minutes extra.

For now I recommend that you set your cvar enforce_timelimit to 1, this will force it to change exactly when the time is up.
__________________
thedeagles3 is offline
firewalker877
Junior Member
Join Date: Jun 2004
Location: Memphis, TN
Old 03-09-2005 , 18:07  
#20

It's good old counter strike. lol Thanks Deagle! That should do the trick.
firewalker877 is offline
Closed Thread


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:14.


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