Critical parameters of polar molecules of ammonia and water allowing large-amplitude vibrations are calculated through virial coefficients as functions of the concentration of vibrationally excited molecules. A model potential accounting for the dipole-dipole and dipole-quadrupole (for water vapor) interactions was used. A change in the dipole moment of molecules caused by excitation of a nonrigid vibrational mode is shown to lead to the dependence of critical parameters of gases on the concentration of excited molecules.