Try this
PHP Code:
#define is_a_valid_player(%1) (1<=%1<=g_max_players)
new g_max_players;
public plugin_init( ) {
// ... //
g_max_players = get_maxplayers( );
}
public fw_HamKilledPost( iVictim, iAttacker, iShouldGib ) {
if( !is_a_valid_player( iAttacker ) || iVictim == iAttacker )
return HAM_IGNORED;
new point = get_user_point( iAttacker );
if( get_user_weapon( iAttacker ) == CSW_KNIFE ) {
client_print_color( iAttacker, print_chat, "^4 --------------Knife Kill Detected---------" );
set_user_point( iAttacker, point + 20 );
}
return HAM_IGNORED;
}