It must be something like that :
PHP Code:
#include < amxmodx >
#include < hamsandwich >
#define MAX_PLAYERS 32
#define VERSION "1.0.0"
new Float: g_fPlayerTime[ MAX_PLAYERS + 1 ];
new g_iPlayerKills[ MAX_PLAYERS + 1 ];
public plugin_init( )
{
register_plugin( "Catch Kills", VERSION, "Bboy" );
RegisterHam( Ham_Killed, "player", "CPlayer__Killed_P", true );
}
public client_disconnect( iPlayer )
{
g_fPlayerTime[ iPlayer ] = 0.0;
}
public CPlayer__Killed_P( const iVictim, const iAttacker )
{
if( 1 <= iAttacker <= MAX_PLAYERS )
{
new const Float: fCurrentTime = get_gametime( );
if( fCurrentTime - g_fPlayerTime[ iAttacker ] <= 15.0 )
{
if( ++ g_iPlayerKills[ iAttacker ] == 6 )
{
CPlayer__KillsDone( iAttacker );
}
}
else
{
g_fPlayerTime[ iAttacker ] = fCurrentTime;
g_iPlayerKills[ iAttacker ] = 1;
}
}
}
CPlayer__KillsDone( const iPlayer )
{
// Code
}
__________________