Raised This Month: $ Target: $400
 0% 

AMX Mod X 1.8.0 Released!


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
BigBaller
Veteran Member
Join Date: Mar 2004
Location: Everett, WA
Old 10-27-2007 , 07:25   Re: AMX Mod X 1.8.0 Released!
#11

Code:
public delayed_load() {     new configFile[128], curMap[64], configDir[128]     get_configsdir(configDir, sizeof(configDir)-1)     get_mapname(curMap, sizeof(curMap)-1)     new i=0;         while (curMap[i] != '_' && curMap[i++] != '^0') {/*do nothing*/}         if (curMap[i]=='_')     {         // this map has a prefix         curMap[i]='^0';         formatex(configFile, sizeof(configFile)-1, "%s/maps/prefix_%s.cfg", configDir, curMap);         if (file_exists(configFile))         {             server_cmd("exec %s", configFile);         }     }     get_mapname(curMap, sizeof(curMap)-1)         formatex(configFile, sizeof(configFile)-1, "%s/maps/%s.cfg", configDir, curMap)     if (file_exists(configFile))     {         server_cmd("exec %s", configFile)     }     }

Going by what the admin.sma the code suggests that all prefix based configs are loaded before a map specific configuration.

So I would guess that if you make a map prefix config for de maps then creating a de_nuke configuration would override the prefix config in a matter of seconds later.

To test I would try using mp_timelimit ... set your server config to like 20 minutes. make a prefix_de.cfg and set it to 35 then make a de_nuke.cfg set it to 27 or something in the middle. If you have HLSW then you can most likely watch the changes just by monitoring the server, otherwise you'd have to look in the logs to see if it changed.

Alternatively you could use the log_amx scripting function of AMXX. This would make a lot easier to do cause then you dont have to try the test I mentioned above, and easier to read in the amxx logs.

Code:
public delayed_load() {     new configFile[128], curMap[64], configDir[128]     get_configsdir(configDir, sizeof(configDir)-1)     get_mapname(curMap, sizeof(curMap)-1)     new i=0;         while (curMap[i] != '_' && curMap[i++] != '^0') {/*do nothing*/}         if (curMap[i]=='_')     {         // this map has a prefix         curMap[i]='^0';         formatex(configFile, sizeof(configFile)-1, "%s/maps/prefix_%s.cfg", configDir, curMap);         if (file_exists(configFile))         {             server_cmd("exec %s", configFile);             log_amx("Prefix based configuration file loaded. File is %s", configFile); // Prefix configuration loaded and logged.         }     }     get_mapname(curMap, sizeof(curMap)-1)         formatex(configFile, sizeof(configFile)-1, "%s/maps/%s.cfg", configDir, curMap)     if (file_exists(configFile))     {         server_cmd("exec %s", configFile)         log_amx("Map based configuration file loaded. File is %s", configFile); // Map configuration loaded and logged.     }     }

Edit

And here is your answer
Quote:
L 10/27/2007 - 0629: -------- Mapchange to fy_snow --------
L 10/27/2007 - 062:45: [admin.amxx] Prefix based configuration file loaded. File is addons/amxmodx/configs/maps/prefix_fy.cfg
L 10/27/2007 - 062:45: [admin.amxx] Map based configuration file loaded. File is addons/amxmodx/configs/maps/fy_snow.cfg
But what would be the case for plugin based configurations if the Devs could answer that one?
__________________


Last edited by BigBaller; 10-27-2007 at 07:34. Reason: And his answer is!
BigBaller is offline
 



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 11:03.


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