Do some debugging. This involves adding logs/server_prints() in places in your code to help determine why conditions/values are not what you expect.
PHP Code:
public DeathMsg()
{
new iKiller = read_data( 1 );
new iVictim = read_data( 2 );
if(g_bMapBanned || !is_user_connected(iVictim) || !is_user_connected(iKiller))
return PLUGIN_HANDLED
log_amx( "Checking if player %d is AFK= %d" , iVictim , g_pdAFKData[ iVictim ][ IsAFK ] ? "true" : "false" );
if(!g_pdAFKData[ iVictim ][ IsAFK ])
{
pdData[iKiller][Kills]++;
}
else
{
ChatColor(iKiller, "!g* !yPlayer !g%s is!teamAFK !ykill doesn't count!")
return PLUGIN_HANDLED
}
return PLUGIN_HANDLED
}
__________________