net.SendToServer
From GMod Wiki
| Function | |
| Syntax |
net.SendToServer( Nil ) Where is this used? |
| Description: | |
| Sends a net function to the server from the client using the net library. | |
| Returns: | Nil |
| Part of Library: | net |
| Realm: |
|
| BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Net.SendToServer]Net.SendToServer [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
| Description | Sends data to the server from the client. |
|---|---|
| Used on | |
| Code | if SERVER then print("Server") net.Receive("Test", function(len, ply) print("Test: ", len, ply) end) else net.Start("Test") net.WriteString("Meow") net.SendToServer() end |
| Output | The server will receive the clients data which can be read via the net.Recieve |
Additional Notes
- A max of 64kb's can be sent at one time
- Consult the net library for more details