Raised This Month: $ Target: $400
 0% 

Show menu


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-04-2009 , 15:44   Re: Show menu
Reply With Quote #4

1. Register the new round event.
2. In that functions add 1 to the round count variable.
3. In your admin command function, check if your round count variable is greater than 3 (or greater than or equal to 3). If not true then return PLUGIN_HANDLED.

Semi-pseudo code :

PHP Code:
new g_iRoundCount 0

public plugin_init()
{
    
// ....
    // Register NewRound to call function eventNewRound
    // ....
}

public 
eventNewRound()
{
    
g_iRoundCount++
}

public 
my_admin_command(id,level,cid)
{
    if(
g_iRoundCount 3)
    {
        return 
PLUGIN_HANDLED
    
}

    
// ....

Also, you could register the round end log event and increment there instead.
__________________

Last edited by fysiks; 06-04-2009 at 15:48.
fysiks 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 13:51.


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