Quote:
Originally Posted by hplexusph
Did a little test on GunGame by adding some PrintToServer() to compile,
1.
gungame_config.sp (line 254)
print before call GG_ConfigKeyValue forward.
PHP Code:
PrintToServer("Call GG_ConfigKeyValue"); //added
Call_StartForward(FwdConfigKeyValue);
2.
config.sp (line 23)
print when receive GG_ConfigKeyValue forward.
PHP Code:
public GG_ConfigKeyValue(const String:key[], const String:value[])
{
PrintToServer("Receive GG_ConfigKeyValue"); //added
3.
first autoload gungame in server boot
server prints:
PHP Code:
Call GG_ConfigKeyValue
Receive GG_ConfigKeyValue
Call GG_ConfigKeyValue
Receive GG_ConfigKeyValue
Call GG_ConfigKeyValue
Receive GG_ConfigKeyValue
.............
Call GG_ConfigKeyValue
Receive GG_ConfigKeyValue
Call GG_ConfigKeyValue
Receive GG_ConfigKeyValue
Call GG_ConfigKeyValue
Receive GG_ConfigKeyValue
[GunGame] Warmup round has started.
the other is manual load by "exec loadgungame"
server prints:
PHP Code:
Call GG_ConfigKeyValue
Call GG_ConfigKeyValue
Call GG_ConfigKeyValue
Call GG_ConfigKeyValue
.............
Call GG_ConfigKeyValue
Call GG_ConfigKeyValue
Call GG_ConfigKeyValue
[SM] Loaded plugin disabled\gungame_config.smx successfully.
[SM] Loaded plugin disabled\gungame.smx successfully.
[SM] Loaded plugin disabled\gungame_afk.smx successfully.
[SM] Loaded plugin disabled\gungame_bot.smx successfully.
[SM] Loaded plugin disabled\gungame_logging.smx successfully.
[SM] Loaded plugin disabled\gungame_mapvoting.smx successfully.
[SM] Loaded plugin disabled\gungame_stats.smx successfully.
[SM] Loaded plugin disabled\gungame_tk.smx successfully.
[SM] Loaded plugin disabled\gungame_display_winner.smx successfully.
[SM] Loaded plugin disabled\gungame_warmup_configs.smx successfully.
Is that the forward cause keyvalues not loaded ?
|
You might be on to something with that. It has to do with when plugin .cfg files are loaded, possibly? I don't call my loadgungame.cfg from the command line, ever. Nor do I start Gungame manually in any way. I actually call my loadgungame.cfg from map specific .cfg files in cstrike\maps\cfg. For example, I have the file ...\cstrike\maps\cfg\gg_block9.cfg, which contains:
Code:
exec loadgungame.cfg
All of my gg_maps have a corresponding .cfg file in that folder with the same command. Some have other commands, if needed for the map; gravity, time limit, etc.
So it seems from your test, that the .cfg is not being read (in time) when GunGame is started in the way you mentioned. I'm not sure GunGame is built to be loaded & unloaded at a sysop's whim.
I wonder if a .cfg with something like:
Code:
sm plugins load gungame_config
exec loadgungame.cfg
...and of course remove the corresponding command from loadgungame.cfg, or change the load order in loadgungame.cfg? You'll probably have to end up with different scripts for different ways you want to start GunGame. It's kind of funny because this has me thinking about something else that I've been thinking about...it would be nice to be able to pass parameters to a plugin from the command line or from a .cfg file in an exec command. I'm not even aware of a way to build logic into .cfg files - other than commenting out or not
__________________