static void OnAllFactionsRequest(ref AllFactionsRequestMsg msg, MyNetworkClient sender) { var response = new AllFactionsSuccessMsg(); response.Factions = MySession.Static.Factions.SaveFactions(); Sync.Layer.SendMessage(ref response, sender.SteamUserId, messageType: MyTransportMessageEnum.Success); }
public void RequestAllFactions() { var msg = new AllFactionsRequestMsg(); msg.ClientSteamId = MySteam.UserId; msg.PlayerSerialId = 0; Sync.Layer.SendMessageToServer(ref msg); }