Three Amigos
(1986)

The Three Amigos, Lucky Day (Steve Martin), Dusty Bottoms (Chevy Chase), and Ned Nederlander (Martin Short), break into El Guapo's (Alfonso Arau) fortress and free Carmen (Patrice Martinez).  They all return to Santa Poco and convince the town to face El Guapo.  Using their sewing talents, the town creates Amigos outfits for everyone to wear.  When El Guapo arrives, the ploy fools his entire gang since the Amigos appear to be everywhere.  El Guapo is shot, but he's able to shoot Lucky in the foot before dying.  They are offered a cash payment by the town, but refuse it, then ride off into the sunset   

Thanks DrummerBrian!