Raised This Month: $ Target: $400
 0% 

what's wrong here?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
ann0yanc3
Junior Member
Join Date: Mar 2004
Old 05-01-2004 , 04:55   what's wrong here?
#1

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.
ann0yanc3 is offline
 


Thread Tools
Display Modes

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 13:44.


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