If you watched the silent movie from the start of the movie, then that is basically how the movie ends - After they crash El Guapo's 40th birthday party to rescue Carmen, they are captured (but somehow survive) and after Ned defeats the German pilot in a quick-draw, they steal the plane and get back to the village - chased by El Guapo and his men.
Without much time, they look for a plan and stumble on an idea from one of their old movies using what the town does best - knitting!
They fashion hundreds of Amigo suits to kit-out every villager, and when the enemy reach the gates they open-fire from every doorway and behind every plant-pot. Finally El Guapo is shot and defeated.
About to leave, they are thrown a bag of pesos - but of course, in the Amigo way, their reward is that justice has been done. Ned throws back the bag of money and they ride off into the distance.