Raised This Month: $ Target: $400
 0% 

Catching 10sec beginning of the round


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Seta00
The Seta00 user has crashed.
Join Date: Jan 2010
Location: Berlin
Old 03-19-2010 , 19:11   Re: Catching 10sec beginning of the round
Reply With Quote #5

PHP Code:
#include <amxmodx>

new bool:tenSecs;

public 
plugin_init() {
    
register_clcmd("say hi""cmdSayHi");
    
register_logevent("logevent_RoundStart"2"1=Round_Start");
}

public 
logevent_RoundStart() {
    
tenSecs false;
    
set_task(10.0"tenSecsPassed");
}

public 
tenSecsPassed() {
    
tenSecs true;
}

public 
cmdSayHi(id) {
    if (
tenSecs) {
        
client_print(idprint_chat"10 seconds already passed.");
        return 
PLUGIN_HANDLED;
    }
    
    
// your code goes here
    
    
return PLUGIN_HANDLED;

Seta00 is offline
 



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:32.


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