I tried using FLYxBOII's solution, and whilst I have no doubt it will work, I found that when I saw someone being revived, I couldn't time it right and only got one kill, or someone killed the plant doing the reviving before I could get my shot off.
I tried a different method which worked for me on my 3rd attempt, but it will involve an element of luck.
Playing Gardens and Graveyards, use the Foot Soldier class and try to hang back a little whilst the rest of your team are attacking. Doing this will mean you have more chance of the plants health already being depleted when you fire your ZPG.
I found a spot on the ground so there's less chance of being seen and waited until I could see two plants close together before I let fly.
The chances are you won't get it first time, but if you keep trying, I'm sure you'll get nail it eventually.
The video below shows how I unlocked it.