Resonant cooling of different nuclear isotopes manifested in optically-induced nuclear magnetic resonances (NMR) is observed in n-doped CdTe/(Cd,Mg)Te and ZnSe/(Zn,Mg)Se quantum wells and for donor-bound electrons in ZnSe:F and GaAs epilayers. By time-resolved Kerr rotation used in the regime of resonant spin amplification we can expand the range of magnetic fields where the effect can be observed up to nuclear Larmor frequencies of 170 kHz. The mechanism of the resonant cooling of the nuclear spin system is analyzed theoretically. The developed approach allows us to model the resonant spin amplification signals with NMR resonances.