The influence of various chemical elements on radiative cooling of the gas flowing from a viscous jump is investigated in a model with a stationary shock in the atmosphere of a cool star. A closed system of equations is written for the thermal energy per heavy particle, the electron temperature, and the relative concentrations of elements in all ionization states. In addition to hydrogen and helium, atomic, singly ionized, and doubly ionized carbon, nitrogen, oxygen, sodium, magnesium, aluminum, silicon, sulfur, potassium, calcium, and iron are included, assuming they have their normal cosmic abundances. The high optical depth in Lyman-series lines leads to a return of the thermal energy to electrons via secondary collisions. As a result, the contribution of hydrogen to the cooling rate falls to the level of the contribution of metals, mainly carbon, magnesium, and iron. Thus, such shock models are able to explain the presence of bright metal lines in the spectra of cool and solar-type stars.