Here's the code:
Code:
console_cmd(id, "exec %s/%s.cfg", config_dir, match_config)
console_print(id, "* Executing %s/%s.cfg", config_dir, match_config)
console_print(id, "* Pausing for 5 seconds.")
pause_time(5)
console_print(id, "* Unpaused.")
Here's the pause_time function:
Code:
public pause_time(seconds)
{
new s_current[3]
new n_current, n_target
get_time("%S", s_current, 2)
n_current = str_to_num(s_current)
n_target = n_current + seconds
if (n_target > 59)
n_target = n_target - 60
while (!(n_current == n_target)) {
get_time("%S", s_current, 2)
n_current = str_to_num(s_current)
}
return PLUGIN_CONTINUE
}
Assume that running the console_cmd in the code above executes a .cfg file. Ok, so I pause for 5 seconds, more than enough time to execute a config. However, the config doesn't get executed until after I see the "Unpaused" message. I know this because there is a "say" command in the config.
What gives here? Why isn't the config being executed after I issue the console_cmd function? Help please!
Thanks.