Garry's Mod Wiki
Description
Adds a net message handler. Only one receiver can be used to receive the net message.
You can use the net.Read*
functions within the message handler callback.
The message-name is converted to lower-case so the message-names "
BigBlue
" and "bigblue
" would be equal.You should put this function outside of any other function or hook for it to work properly unless you know what you are doing!
You must read information in the same order as you write it.
Each net message has a length limit of 64KB!
Arguments
Example
An example with receiving message clientside, when sent from the server.
Output: ] send_message test
Message from server received. Its length is 56.
The message was: test
The cool number was: 1337
Example
An example with receiving message serverside, when sent from a client.
Output: ] send_message_to_server test
Message from Rubat received. Its length is 56.
The message was: test
The cool number was: 1337
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 twice a day. Edits and history are not available.
Last Parsed: Loading...