| closedServer Capacity Mapchooser |
| Started by gunsofnavarone on 05-25-2009, 09:35 AM |
Threads: 28
Joined: Sep 2008
This was a passing thought about offering a completely different set of maps to choose from based on number of people on a server (excluding bots as they can't vote).rnrnThe idea was something like this:rnrn1-8 Players.......Map Group A (small maps - Smaps.ini)rnrn9-16 Players.....Map Group B (medium maps - Mmaps.ini)rnrn17-32 Players...Map Group C (Large maps - Lmaps.ini)rnrnThe server would call upon one of these files at voting time based upon the capacity of the server at that time.rnrnMaybe even be able to adjust the Player number variable also. For instance, modifying Group A for 1-6 Players, Group B for 7-12 Players, and Group C for 13-20 Players (If your server capacity is only 20 vs 32).rnrnOften times (especially with new players to DoD, or even some quite old maps that haven't been played in a very long time), people don't recall the map by it's name, and so they may choose something that is very large for a very small group of players only to find this out after loading the map and maybe (if the plugin is present on the server) have to wait for a certain amount of time before they can "rockthevote". If a RTV plugin isn't available on a particular server, then the odds are, the players will drop and move elsewhere.rnrnOf course, all of this could be overridden by admin. For example, let's say your server is filled to/near full capacity, and you want to have some excitement on the server. Maybe you wish a smaller map with the large group of players that you have. The admin could easily select any map from the standard mapcycle.txt or maps.ini file.
Threads: 75
Joined: Nov 2007
makeing a plugin with rtv vote etc. is a big thing, i wont do that. But i can easy make a plugin that will set the map cycle file to blahblah.cfg if X amount of ppl is playing. the server got a var. for what file to use as map cycle file. rnrnTry and say: mapcyclefile in hlsw and the respond will proberbly be:rnrn
nn:nn:nn "mapcyclefile" is "mapcycle.txt"rnrnand thats the var. we can change. rnrnA map manager that will/can use eg. the map cycle is Deagles' Map ManagementrnrnIf that can help ya i will make it.
Threads: 23
Joined: Aug 2007
When I was first starting out, I helped someone set up somethings in their server. I noticed they had a different mapcycle set up for the days of the week. It's real similar in concept. You might search for it, IDK.
Threads: 28
Joined: Sep 2008
No, I was not suggesting a plugin with RTV. I was only explaining why and how the plugin would be useful.rnrnJust a plugin that would load a mapfile of maps to vote on based upon how many real people are on the server.
Threads: 28
Joined: Sep 2008
BTW, I have Deagle's map manager, I like it, but thought this would be more useful, or maybe even a modified version of it.
Threads: 19
Joined: Oct 2004
When I was first starting out, I helped someone set up somethings in their server. I noticed they had a different mapcycle set up for the days of the week. It's real similar in concept. You might search for it, IDK.rnrnI think you might be talking about this m8rnrnTimeconfigs V1.1 rnrnhttp://forums.alliedmods.net/showthread.php?p=602784
Threads: 75
Joined: Nov 2007
nice find noddy. well if i should do this i would just use a map manager that uses the mapcycle file, and the code how to set what mapcycle file to use would be something like this:rnrnrn
////////////////////////////////////////////////////////////////////////////////////////////////////rn#include <amxmodx>rn////////////////////////////////////////////////////////////////////////////////////////////////////rn#define PLUGIN "map cycle cfg thing"rn#define VERSION "1.0"rn#define AUTHOR "author"rn////////////////////////////////////////////////////////////////////////////////////////////////////rnnew players_online // the is just a single cell that will hold the amount of playersrnnew A_amount, B_amount, C_amount // theres we use for holding the value for your cvarsrn////////////////////////////////////////////////////////////////////////////////////////////////////rnpublic plugin_init() rn{rn register_plugin(PLUGIN, VERSION, AUTHOR)rn rn A_amount = register_cvar("cvar_1","10")rn B_amount = register_cvar("cvar_2","15")rn C_amount = register_cvar("cvar_3","20")rn}rn////////////////////////////////////////////////////////////////////////////////////////////////////rnpublic client_putinserver(id) // when a player joins the server this function is calledrn{rn players_online + 1 // plus 1rn set_map_cfg() // do the mathrn}rn////////////////////////////////////////////////////////////////////////////////////////////////////rnpublic client_disconnect(id) // when a player leaves the server this function is calledrn{rn players_online - 1 // minus 1rn set_map_cfg() // do the mathrn}rn////////////////////////////////////////////////////////////////////////////////////////////////////rnpublic set_map_cfg()rn{rn // here we use a "static" the reason why is cuz a normal "new" would just disappear when rn // our math below is done, the static stays = less memory use, but in this case it doesnt rn // really matter cuz it doesnt happen that often, but why not do it right when we know it...rn // Overall you dont need to say or make new's here to hold the values, but its easyier thenrn // writing get_pcvar_num evey single time.rn static A, B, C rn A = get_pcvar_num(A_amount) rn B = get_pcvar_num(B_amount) rn C = get_pcvar_num(C_amount)rnrn // if players_online is less or equal to A or 0 -> do "something"rn if(players_online <= A || 0) rn {rn // server_cmd will do the command for usrn server_cmd("mapcyclefile map_cycle_A.cfg")rn returnrn }rn // if players_online is greater then A AND A is less then B -> do "something"rn if( players_online > A && A<B )rn {rn server_cmd("mapcyclefile map_cycle_B.cfg")rn returnrn }rn // if players_online is greater or equal to C -> do "something"rn if(players_online >= C)rn {rn //inside these braches is "something" rn server_cmd("mapcyclefile map_cycle_B.cfg")rn returnrn }rn}rn////////////////////////////////////////////////////////////////////////////////////////////////////rnrnThe line starting with // is comments! This is really simpleThreads: 28
Joined: Sep 2008
So is the above the code for us to compile into the amxx, or is this just an example of where it's headed?
Threads: 75
Joined: Nov 2007
if you read the code and my comments, doesnt it make any sense then?
Threads: 28
Joined: Sep 2008
To be honest, I don't know. It looked like you were maybe giving an example to noddy (hence the comments in the script). Since I don't have a complete understanding of how to script, reading the code or script doesn't tell me it's complete. It is because I have an understanding about math and variables, that it's not difficult for me understand some of the things that a script may contain.rnrnSo forgive my ignorance. Usually there is an attached .sma and/or amxx compiled version.rnrnSo at this point I'll assume that it is complete, and try to go and compile it.rnrnThanx.
Threads: 28
Joined: Sep 2008
Also, I'm not entirely sure, but shouldn't the last portion of the code read:rnrnserver_cmd("mapcyclefile map_cycle_C.cfg")
Threads: 1
Joined: Mar 2016
Hi, I'm French , I apologize for my English Approximate . I read the topic , and this interested me a lot. But I do not understand how to put the code on the server .... We must compile it ? Can you explain in more detail please ????
Threads: 3
Joined: Aug 2007
Threads: 1
Joined: Mar 2016
I know to install a plugin. But there is no SMA or amxx file. I try the code complier amxx but once installed on the server it does not work ...
Threads: 3
Joined: Aug 2007
What map choosing plugin are you using? Most that I know of only load the mapcyclefile once at the beginning of the map so this wouldn't change how it works.
Threads: 1
Joined: Mar 2016
The mapcycle I work. But I want to have a mapcycle that changes depending on how many people there are on the server. And as is the main topic, I post here ....
Threads: 3
Joined: Aug 2007
What map choosing plugin are you using?
Threads: 75
Joined: Jun 2006
Threads: 3
Joined: Aug 2007
Wow, didn't you know we have our own here Fysiks!nnnNope. I know that you have the compiler for attachments (which I never use) but I've never needed a web compiler and I frequent the AlliedModders forum more often.
Threads: 75
Joined: Jun 2006
All cool. Just wanted to make ppl aware. Its on the left Navigation Panel.rnrnCheers!
Threads: 1
Joined: Mar 2016
one to help me then? :(
Threads: 3
Joined: Aug 2007
What do you need help with?
Threads: 1
Joined: Mar 2016
Tell Me How To That the choice of cards is done based on the number of players . please

