AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How can i check... (https://forums.alliedmods.net/showthread.php?t=171857)

ghostM 11-11-2011 17:54

How can i check...
 
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

Bugsy 11-11-2011 18:19

Re: How can i check...
 
"TERRORISTS"

:arrow:

"TERRORIST"

ghostM 11-11-2011 18:26

Re: How can i check...
 
Already tried that but dont works...

Bugsy 11-11-2011 19:59

Re: How can i check...
 
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;



ghostM 11-12-2011 13:10

Re: How can i check...
 
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


All times are GMT -4. The time now is 14:20.

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