The Flintstones
Sheriff for a Day (5x21)
:
While hunting out west for uranium, Fred and Barney manage to get themselves appointed sheriff and deputy in a town terrorized by an outlaw band. They (and the town) are saved through the intervention of the famous television western family, the Cartrocks, westerners from the Rockerosa.