Quote:
Originally Posted by Bugsy
There are many ways to do this. Easiest would be with get_players or you can loop through all players.
|
Like this?
PHP Code:
#include <amxmodx>
#include <cstrike>
enum _:TEAMS {
TE,
CT
};
public plugin_init()
register_message(get_user_msgid("DeathMsg"), "DeathMsg");
public DeathMsg()
{
new Killer = get_msg_arg_int(1), Victim = get_msg_arg_int(2);
new iPlayers[ 32 ], iNum[ TEAMS ];
get_players( iPlayers, iNum[ CT ], "ae", "CT" ); get_players( iPlayers, iNum[ TE ], "ae", "TERRORIST" );
if( iNum[ TE ] > 0 || iNum[ CT ] > 0 )
{
if ((!Killer || Killer == Victim) && cs_get_user_team(Victim) == CS_TEAM_CT)
for(new i = 0; i < iNum[TE]; i++)
{
set_msg_arg_int(1, ARG_BYTE, iPlayers[i]);
}
}
}