Garry's Mod Wiki

usermessage

We advise against using this. It may be changed or removed in a future update. You should be using the net instead

The usermessage library is used to receive user messages from the server on the client.

Usermessages have a limit of only 256 bytes!

Methods

table usermessage.GetTable()
We advise against using this. It may be changed or removed in a future update. You should be using net instead Returns a table of every usermessage hook
usermessage.Hook( string name, function callback, ... )
We advise against using this. It may be changed or removed in a future update. You should be using net instead Sets a hook for the specified to be called when a usermessage with the specified name arrives. Usermessages have a limit of only 256 bytes!
usermessage.IncomingMessage( string name, bf_read msg )
This is used internally - although you're able to use it you probably shouldn't. Called by the engine when a usermessage arrives, this method calls the hook function specified by usermessage. Hook if any.