A related question here discusses the role of Shalya in general during the Mahabharata. It is said that Shalya tried to discourage Karna in the midst of the war. How did he do that? Also, how did Karna respond to this?
Addressing Shalya, Karna said:
Accepting those words (of Duryodhana), the foremost of chariot-warriors stationed on his chariot, viz., the son of Radha, addressed Shalya, that warrior accomplished in battle, saying, "Urge the steeds, O mighty-armed one, so that I may slay Dhananjaya and Bhimasena and both the twins and king Yudhishthira. O Shalya, let Dhananjaya behold today the might of my arms, when I will be engaged in shooting shafts winged with Kanka feathers in hundreds and thousands. Today, O Shalya, I will shoot shafts with great energy for the destruction of the Pandavas and the victory of Duryodhana.
In reply to this Shalya said:
O Suta's son, why dost thou think so low of the sons of Pandu, all of whom are endued with great might, all of whom are great bowmen, and all of whom are acquainted with every weapon? They are unretreating, of great good fortune, invincible, and of prowess incapable of being baffled. They are capable of inspiring fear in the heart of Indra himself. When, son of Radha thou wilt hear the twang of Gandiva in battle, resembling the peal of the thunder itself, thou wilt not then utter such speeches. When thou wilt behold Dharma's son and the twins causing a canopy, like that of the clouds in the welkin, with their sharp arrows, and the other invincible kings (of the Pandava army), endued with great lightness of hands and shooting (showers of shafts) and weakening their foes, then thou wilt not utter such words.
Disregarding those words spoken by the ruler of the Madras, Karna addressing him endued with great activity, saying, "Proceed."'
In the next chapter following conversation has been done:
Reflecting on the mighty feats of Partha, and burning with self-conceit and pride, and blazing with wrath and breathing long and hard, he addressed Shalya and said these words: "When stationed on my chariot and armed with my bow, I would not take fright at Indra himself armed with the thunder and excited with wrath.
Shalya said, "Forbear, forbear, O Karna, from such bragging. Thou art in transports of delight and sayest what thou shouldst never say. Where is Dhananjaya, that foremost of men, and where again, art thou, O lowest of men? Who else, save Arjuna, could take away the younger sister of (Keshava) that foremost of all persons, having forcibly agitated the home of the Yadus that was protected by the younger brother of Indra and that resembled heaven itself that is guarded by the chief of celestials? What man save Arjuna who is endued with prowess that is equal to the prowess of the chief of the celestials, could on the occasion of the dispute caused by the slaughter of an animal, summon Bhava the Lord of Lords, the Creator of the worlds, to battle? For the sake of honouring Agni, Jaya had vanquished asuras and gods and great snakes and men and birds and pishacas and yakshas and rakshasas with his shafts and gave unto that god the food he had desired. Dost thou remember, O Karna, the occasion when, slaughtering those foes in large numbers with his excellent shafts endued with the effulgence of the Sun, Phalguna liberated Dhritarashtra's son himself among the Kurus? Dost thou remember the occasion when, thyself having been the first to fly away, the quarrelsome sons of Dhritarashtra were liberated by the Pandavas after the latter had defeated those rangers of the skies (the gandharvas headed by Citraratha)? On the occasion also of the seizure of (Virata's) kine, the Kauravas, swelling with numbers in respect of both men and animals, and having the preceptor and the preceptor's son and Bhishma amongst them, were vanquished by that foremost of men. Why, O son of Suta, didst thou not vanquish Arjuna then? For thy destruction another excellent battle has now presented itself. If thou dost not fly away from fear of thy enemy, know O Suta's son, that as soon as thou goest to battle thou wilt be slain."