I will repeat my vague memory of a Burke’s Law episode. Gene Barry as Burke has to find out who substituted the live ammo gun for the prop one.
Synopsis:
“In the revival series episode, “Who Killed the World’s Greatest Chef?”, a girl jumps out of a cake and fires two guns, one shoots out a flag that says “BANG!”, the other a real pistol that takes out the victim of the week.”
An even earlier movie about something like this was THE DEATH KISS(1932) with Bela Lugosi.