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
But what would be the case for plugin based configurations if the Devs could answer that one?
__________________