The code is wrong, each time you get pvp the message will appear. Let me correct you.
if (activeChar.getPvpKills() >= 5000 && !activeChar.isHero())
{
activeChar.sendMessage ("Congratz , you are now a hero ");
activeChar.setHero(true);
}
that should do it.