Raised This Month: $ Target: $400
 0% 

How can i check...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ghostM
Junior Member
Join Date: Apr 2011
Old 11-11-2011 , 17:54   How can i check...
Reply With Quote #1

How can i check how many people is at the team?
Look at the code:

PHP Code:
new anything random_num(1,2);

new 
iPlayer[32], iNumCTiNumTerr;
get_players(iPlayeriNumCT"a""CT");
get_players(iPlayeriNumTerr"a""TERRORISTS");

switch(
anything) {
    case 
1:
    {
        if( 
iNumCT == && iNumTerr == ) {
            
// command
        
}
    }
    case 
2:
    {
        if( 
iNumTerr == && iNumCT == ) {
            
// command
        
}
    }

Why does this code dont work?

thanks

Last edited by ghostM; 11-11-2011 at 17:55.
ghostM is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 11-11-2011 , 18:19   Re: How can i check...
Reply With Quote #2

"TERRORISTS"



"TERRORIST"
__________________

Last edited by Bugsy; 11-11-2011 at 18:19.
Bugsy is offline
ghostM
Junior Member
Join Date: Apr 2011
Old 11-11-2011 , 18:26   Re: How can i check...
Reply With Quote #3

Already tried that but dont works...
ghostM is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 11-11-2011 , 19:59   Re: How can i check...
Reply With Quote #4

PHP Code:
public Testid )
{
    new 
iCntCsTeams ] , iTotal;
    
iTotal GetPlayerCountiCnt );
    
    
client_printid print_chat "Total=%d - Unassigned=%d T=%d CT=%d Spec=%d" iTotal iCntCS_TEAM_UNASSIGNED ] , iCntCS_TEAM_T ] , iCntCS_TEAM_CT ] , iCntCS_TEAM_SPECTATOR ] );
}

public 
GetPlayerCountiCountCsTeams ] )
{
    new 
iPlayers32 ] , iNum;
    
get_playersiPlayers iNum );
    for ( new 
iNum i++ )
        
iCountcs_get_user_teamiPlayers] ) ]++;
        
    return 
iNum;

__________________
Bugsy is offline
ghostM
Junior Member
Join Date: Apr 2011
Old 11-12-2011 , 13:10   Re: How can i check...
Reply With Quote #5

Isnt that i want. I want to know how to execute a command by checking how many peoples are in the team? do you understand? like my code, but my code dont work
ghostM 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:20.


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