Gold Rush and Dynamite
No one gets gold for damage caused by dynamite as the damage is done by the card and not by a player. Just like the sheriff would not be forced to discard all his cards if he played it when it killed a deputy. Or you would not draw cards if you played it and it killed an outlaw.