Modding:Network API: Difference between revisions

From Vintage Story Wiki
No edit summary
No edit summary
Line 9: Line 9:
We will create a server command that will send out a message to all clients, and if a client receives this, it will send a response back to the server; upon receiving this response, the server will display it along with the responding client's player name.
We will create a server command that will send out a message to all clients, and if a client receives this, it will send a response back to the server; upon receiving this response, the server will display it along with the responding client's player name.


== Preparation
== Preparation ==


Let's start by creating a new .cs file for this mod, and adding our imports and the namespace in which we'll wrap all of our classes:
Let's start by creating a new .cs file for this mod, and adding our imports and the namespace in which we'll wrap all of our classes: