equiavilent of net.Incoming for usermessages/printing out all usermessages sent?

I wonder if someone could point me in the right direction for how I could print out usermessages, same way as net.Incoming where it’s possible to overwrite that function to print out, but I’m uncertain how to do it if I’m supposed to do it with hook function here, thanks in advance

The answer was in your link. Use the same detour method with usermessage.IncomingMessage

Thank you for your reply, I am not sure what I should do since the Hooks is local I can’t overwrite the function, I tried with

function usermessage.IncomingMessage( MessageName, msg )

	if ( usermessage.Hooks[ MessageName ] ) then
		print( "Usermessage: " .. MessageName );

Error is attempted to index Hooks, nil value.

debug.getupvalue :wink:

Thank you, I was able to do it with usermessage.GetTable().