This has become a trivial thing since the 0.3z callback:
https://sampwiki.blast.hk/wiki/OnPlayerWeaponShot - It detects if you shot at an object and if so it'll tell you which object, so you can easily check if the player shot the targets objects and then delete them and do all the necessary stuff in your code.