Try this:
Code:
#include <amxmodx>
#include <hamsandwich>
#include <fakemeta>
#define m_iPlayerTeam 114
public plugin_init()
{
RegisterHam( Ham_Killed, "player", "CBase_PlayerKilled" );
}
public CBase_PlayerKilled( iVictim/*, iAttacker, shouldgib*/ )
{
new Players[ 32 ], i, iEnt = -1;
new Float:flOrigin[ 3 ], szClass[ 32 ];
pev( iVictim, pev_origin, flOrigin );
while( ( iEnt = engfunc( EngFunc_FindEntityInSphere, iEnt, flOrigin, 20.0 ) ) )
{
if( iEnt == iVictim)
continue;
pev( iEnt, pev_classname, szClass, charsmax( szClass ) );
if( equal( szClass, "player" ) )
{
if( get_pdata_int( iVictim, m_iPlayerTeam ) == get_pdata_int( iEnt, m_iPlayerTeam ) )
{
Players[ i ] = iEnt;
i++;
}
}
}
//Array Players is a list of each team player you were touching when you died
}
__________________