If this is not enough, you may try do this:
PHP Code:
#include < amxmodx >
#include < fakemeta >
new g_iTeam[ 33 ], Float: g_fTime, g_iMaxClients, bool: g_bConnected[ 33 ];
public client_connect( iPlayer ) {
g_iTeam[ iPlayer ] = -1;
g_bConnected[ iPlayer ] = false;
}
public client_disconnect( iPlayer ) {
g_iTeam[ iPlayer ] = -1;
g_bConnected[ iPlayer ] = false;
}
public plugin_init( ) {
register_forward( FM_StartFrame, "OnGameFrame" );
g_iMaxClients = get_maxplayers( );
}
public client_putinserver( iPlayer )
g_bConnected[ iPlayer ] = true;
public OnGameFrame( ) {
static Float: fGameTime, i, iTeam;
fGameTime = get_gametime( );
if( fGameTime - g_fTime >= 0.0666 ) {
for( i = 1; i <= g_iMaxClients; i++ ) {
if( g_bConnected[ i ] ) {
iTeam = get_pdata_int( i, 114 );
if( g_iTeam[ i ] != iTeam ) {
// THE TEAM HAS BEEN CHANGED ( OLDTEAM = g_iTeam[ i ], NEWTEAM = iTeam )
/*
*/
g_iTeam[ i ] = iTeam;
}
}
}
g_fTime = fGameTime;
}
}
__________________