Raised This Month: $ Target: $400
 0% 

Waiting for input without using set_task or a while/for loop


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Infra
Senior Member
Join Date: Aug 2004
Location: California
Old 10-05-2004 , 14:01   Waiting for input without using set_task or a while/for loop
Reply With Quote #1

Is there a way to "pause" the plugin while it waits for input?

I can't hook the input because the input happens in the middle of the plugin execution.


Code:
        new enter_tags         client_print(id,print_chat,"* [AMX MATCH] No Terrorist clantag found :/")                 enter_tags = get_cvar_num("amx_match_entertags")         if(enter_tags == 1)         {             copy (message_Tag, 191, "")                         client_cmd(id, "messagemode clanTag")                         // Need to pause here, to wait for input....             if(!equal(message_Tag, ""))             {                 enter_clantag(1)                                 client_print(id,print_chat,"* [AMX MATCH] %s has been added as the T clan tag", message_Tag)                }             else             {                 client_print(id,print_chat,"* [AMX MATCH] No T clan tag entered")             }                   }     }                     return PLUGIN_CONTINUE } public enter_clantag(team) //team = 1 - Ts, team = 2 - CTs {     if(team == 1)     {           client_print(0,print_chat,"DEBUG_CLANTAG | %d |", team)                         copy (clanT, 31, message_Tag)     }     else     {         copy (clanCT, 31, message_Tag)     }         return PLUGIN_CONTINUE } public messagemode_clantag(id,level,cid) {     read_args(message_Tag, 191)         remove_quotes(message_Tag)         client_print(id,print_chat,"DEBUG_MESSAGEMODE | %s |", message_Tag)         return PLUGIN_CONTINUE }

Code:
    // Enter clan tags     register_concmd("clanTag","messagemode_clantag",ADMIN_LEVEL_A,"< message >");


Thanks,
__________________
--Infra
Infra is offline
Send a message via AIM to Infra
 



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


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