SWEP:DrawHUD() on target?

I have this swep which I need to execute the DrawHUD() function on the target I shoot. Basically I wanna draw some text on the targets screen. How would I go about doing this on my SWEP?
Thanks!

Send the info to a client via a net message or something and then use HUDPaint hook.

Where would I put the receive message code?

It doesn’t matter.

tried putting it in Primary shoot function and it wouldnt send the message (no errors or anything, just nothing sends)



	   net.Receive( "myMessage", function( length, client )
        print( "I got it!" )
   end )

		      util.AddNetworkString( "myMessage" )

		       net.Start( "myMessage" )
   net.Send( trace.Entity )


Might be something blindingly obvious.

You put “util.AddNetworkString( “myMessage” )” into the beginning of file, outside of any functions, serverside only.

You put “net.Receive” outside of any functions, clientside.

If you don’t know how to use a function, GOOGLE IT FIRST. Most functions are documented on official GMod wiki.

Dem tabs…art…beauty