Garry's Mod Wiki

Garry's Mod Wiki

  usermessage.Hook( string name, function callback, ... )

Description

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!

Arguments

1 string name
The message name to hook to.
2 function callback
The function to be called if the specified message was received.
Function argument(s):
1 bf_read msg - The object to read your custom data from.
2 vararg preArgs - No description given.
3 vararg preArgs = nil
Arguments that are passed to the callback function when the hook is called.

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated four times a day. Edits and history are not available.

Last Parsed: Loading...