Example #1
0
 public PlayerGroup(string Name, bool Public)
 {
     name = Name;
     fileName = name;
     players = PlayerGroupList.Load(fileName, this);
     pub = Public;
     allPlayerGroups.Add(new PlayerGroup(name, pub));
 }
Example #2
0
 public PlayerGroup(string Name, bool Public)
 {
     name     = Name;
     fileName = name;
     players  = PlayerGroupList.Load(fileName, this);
     pub      = Public;
     allPlayerGroups.Add(new PlayerGroup(name, pub));
 }
Example #3
0
        public static PlayerGroupList Load(string path, PlayerGroup groupName)
        {
            if (!Directory.Exists("groups"))
            {
                Directory.CreateDirectory("groups");
            }
            path = "groups/" + path;
            PlayerGroupList list = new PlayerGroupList();

            list.group = groupName;
            if (File.Exists(path))
            {
                foreach (string line in File.ReadAllLines(path))
                {
                    list.Add(line);
                }
            }
            else
            {
                File.Create(path).Close();
                Server.s.Log("CREATED NEW: " + path);
            } return(list);
        }
Example #4
0
 public static PlayerGroupList Load(string path, PlayerGroup groupName)
 {
     if (!Directory.Exists("groups")) { Directory.CreateDirectory("groups"); }
     path = "groups/" + path;
     PlayerGroupList list = new PlayerGroupList();
     list.group = groupName;
     if (File.Exists(path))
     {
         foreach (string line in File.ReadAllLines(path)) { list.Add(line); }
     }
     else
     {
         File.Create(path).Close();
         Server.s.Log("CREATED NEW: " + path);
     } return list;
 }