We check to see if the message starts with a / If(!string.IsNullOrEmpty(message) & clientInfo != null & mainName != ServerChatName) We make sure there is an actual message and a client, and also ignore the message if it's from the server. Private bool ChatMessage(ClientInfo _cInfo, EChatType _type, int _senderId, string _msg, string _mainName, bool _localizeMain, List _recipientEntityIds) This method will then be called every time a ChatMessage is sent.
This registers a handler for when the server handles a chat message. Private string ServerChatName = "Server" Your API class needs to implement the IModApi interface and in the InitMod method we will register handlers for ModEvents. Once you have added the references rename Class1.cs to API.cs this will be the start point for the mod. Then add the following references from your dedicated server '7DaysToDieServer_Data/Managed' Folder Using Visual StudioĬreate a new Class Library project targetting. This is a quick start tutorial for getting started with modAPI.
WARNING: Mod API only works on dedicated server and will not run on the client either in single player or client hosted multiplayer Tutorial
dll which is then added to the Mods folder on the dedicated server alongside a ModInfo.xml just like other mods. ModAPI mods are written in c# and compiled as a. ModAPI Allows a modder to add additional functionality to the dedicated server.