Exemple #1
0
        public void SendToFaction(long factionId)
        {
            IMyFaction faction = MyAPIGateway.Session.Factions.
                                 TryGetFactionById(factionId);

            if (faction == null)
            {
                Log.Error("Failed to find faction " + factionId +
                          " to send message to", "SendToFaction");
                return;
            }

            foreach (ulong steamId in faction.SteamIds())
            {
                Send(steamId, MessageDestinationType.Player);
            }
        }