Raised This Month: $ Target: $400
 0% 

Setting a round interval


Post New Thread Reply   
 
Thread Tools Display Modes
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
tm.
Member
Join Date: Apr 2010
Old 06-16-2010 , 17:35   Re: Setting a round interval
Reply With Quote #2

You want every 5 rounds the players to have access to some functions, right? It might be the fact that you set IntervalGood as true when you create it. By default booleans are set to false, you should let it that way.
tm. is offline
Reply



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