View Single Post
alonelive
Senior Member
Join Date: Jan 2011
Location: Big snow country.. :)
Old 10-09-2011 , 12:48   Re: how get count of players
Reply With Quote #14

Quote:
L 10/09/2011 - 20:47:23: "AloneLive<1><STEAM_ID_LAN><TERRORIST>" committed suicide with "world"
L 10/09/2011 - 20:47:23: World triggered "Round_Draw" (CT "0") (T "0")
L 10/09/2011 - 20:47:23: [AMXX] Displaying debug trace (plugin "asd.amxx")
L 10/09/2011 - 20:47:23: [AMXX] Run time error 4: index out of bounds
L 10/09/2011 - 20:47:23: [AMXX] [0] asd.sma::CountTeams (line 45)
L 10/09/2011 - 20:47:23: [AMXX] [1] asd.sma::round_end (line 24)
PHP Code:
public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_logevent("round_end"2"1=Round_End");
    
// Add your code here...
}

public 
round_end()
{
new 
iT iCT iBots;
CountTeamsiT iCT iBots ); 
}



CountTeams(&TERRORISTS, &CTS, &BOTS)
{
    
TERRORISTS 0
    CTS 
0
    BOTS 
0

    
new iPlayers[32], iNum iPlayer
    get_players
(iPlayersiNum"h")
    
    if( !
iNum )
    {
        return
    }
    
    for(--
iNumiNum<=0iNum--)
    {
        
iPlayer iPlayersiNum ]
        
        if ( 
is_user_botiPlayer ) )
            ++
BOTS
        
        
switch( cs_get_user_team(iPlayer) )
        {
            case 
CS_TEAM_T:++TERRORISTS
            
case CS_TEAM_CT:++CTS
        
}
        if(
TERRORISTS == 1)
    
client_print(0print_chat"123")
    }


__________________
sorry my bad english...

Last edited by alonelive; 10-09-2011 at 12:50.
alonelive is offline