Raised This Month: $ Target: $400
 0% 

Setting a round interval


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
t3hNox
Senior Member
Join Date: Oct 2009
Old 06-16-2010 , 10:09   Setting a round interval
Reply With Quote #1

Hi.
The title might be not very informative. What I want to do is as simple as setting a definite round interval before players are able to use *some* function. I use an bool for checking.

PHP Code:
#define RoundInterval 5
new bool:IntervalGood true
new iRoundInterval 0

public plugin_init( ) 
{
        
//...
    
register_logevent"EventRoundStart"2"1=Round_Start" );
}

public 
EventRoundStart( ) 
{
    if( !
IntervalGood && iRoundInterval <= RoundInterval ) {
        
iRoundInterval++ //It's increasing the integer value by 1, right?
    
}
    if( 
iRoundInterval RoundInterval ) {
        
iRoundInterval 0
        IntervalGood 
true
    
}
    return 
PLUGIN_HANDLED

For some reason it's not working properly. I don't know where is the problem.
t3hNox 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 14:44.


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