This mod is an updated version of Bejanmin Lee's TrainHorn mod.
I configured the mod in such a way that it works in multiplayer and so that it also plays when you get hit by a cargo-/fluid wagon.
As of version 1.0.0 there is a button, by default "H", to manually honk the horn.
Orginal mod can be found here.
An example by Benjamin Lee can be seen here.