deaf from gunshots? that's not realistic. they aren't that loud. it's probably pretty unhealthy when you hear A LOT of shots without ear protection but you will not become deaf instantly just because a gun is fired close to you. it would also be quite annoying because it happens all the time!
it would make sense for close explosions though.
but it's not possible. all you could probably do is playing that well known loud tinnitus beep sound. that might work I guess.