Virgil Cole and Wyatt Earp knew instinctively that forbidding carrying guns within the city limits would, and did solve a lot of law enforcement problems
I have never seen a movie bar room drunk espouse the doctrine that the marshal must present a warrant drawn after a second amendment analysis by a judge.
That would be Virgil Earp, the Marshal of Tombstone. Wyatt was his deputy as was brother Morgan. See my post above regarding the need for gun-control in frontier outlaw towns.