Napoleonic wars? The Spanish used guns against the Aztecs.
>The first use of firearms as primary offensive weapons came in the 1421 Battle of Kutná Hora.
https://en.wikipedia.org/wiki/History_of_the_firearm