We have mapped the CS (J = 1 --> 0) emission in five star-forming regions, HH 43, AFGL 6366S, L673 and L1251 using the 14-m Yebes telescope, and W75S using the 37-m Haystack telescope. Additionally, we have observed (CS)-S-34 (J = 1 --> 0) emission at selected positions in these regions. These sources have all been previously mapped with similar angular resolution in the (J, K) = (1, 1) inversion transition of NH3. The comparison of both emissions shows a separation between the CS and NH3 peaks of similar to 0.2 pc. The regions traced by the CS molecule are, in general, larger than those traced by the NH3. However, our data suggest that the size ratio depends on the size of the source. The line width of the CS lines is, on average, similar to 0.5 km s(-1) larger than that of the NH3 lines. This difference in line width can be attributed to the different size of the region traced by each molecule. The difference in the spatial distribution of the CS and NH3 emission is interpreted in terms of the different evolutionary stages of the emitting clumps.