Raised This Month: $ Target: $400
 0% 

How to check players in teams?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
padilha007
Senior Member
Join Date: Jul 2008
Old 10-31-2011 , 14:46   Re: How to check players in teams?
Reply With Quote #6

PHP Code:
new iPlayers[2];
new 
g_iMaxplayers;

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
// MaxPlayers
    
g_iMaxplayers get_maxplayers();
    
    
// Round Start
    
register_logevent"EventRoundStart"2"1=Round_Start" );
}

public 
EventRoundStart( ) 
{
    
// Loop
    
for( new 1g_iMaxplayersi++ )
    {
        if( 
is_user_connected(i) && is_user_alive) && get_user_team(i) != )
            
iPlayers[get_user_team(i) - 1]++;
    }
}

public 
yourfunction()
{
    if( 
iPlayers[0] >= && iPlayers[1] >= )
    {
        
// Do...
        
    
}

__________________


Last edited by padilha007; 10-31-2011 at 15:29.
padilha007 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:18.


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