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(PLUGIN, VERSION, AUTHOR)
register_logevent("round_end", 2, "1=Round_End");
// Add your code here...
}
public round_end()
{
new iT , iCT , iBots;
CountTeams( iT , iCT , iBots );
}
CountTeams(&TERRORISTS, &CTS, &BOTS)
{
TERRORISTS = 0
CTS = 0
BOTS = 0
new iPlayers[32], iNum , iPlayer
get_players(iPlayers, iNum, "h")
if( !iNum )
{
return
}
for(--iNum; iNum<=0; iNum--)
{
iPlayer = iPlayers[ iNum ]
if ( is_user_bot( iPlayer ) )
++BOTS
switch( cs_get_user_team(iPlayer) )
{
case CS_TEAM_T:++TERRORISTS
case CS_TEAM_CT:++CTS
}
if(TERRORISTS == 1)
client_print(0, print_chat, "123")
}
}
__________________