Simple enough: hit a sentry/dispenser/teleporter to trigger the same hitsound and damage text that normally triggers when you hit an enemy. Of course, they'll only see/hear it if they have damage text (
hud_combattext 1) and/or hitsounds (
tf_dingalingaling 1) enabled.
Won't trigger when attacking a sapper or sapping a building. Besides that, if you see that a specific weapon is not triggering this plugin or is displaying an incorrect damage amount, let me know.
Requires SDKHooks.