コード例 #1
0
 // Lese SpielerDaten aus der Liste
 public void SetPlayerData(CSV_PlayerInfo set_data)
 {
     for (int pl = 0; pl < csv_Players.Count; pl++)
     {
     if (csv_Players[pl].PlayerName == set_data.PlayerName) csv_Players[pl] = set_data;
     }
 }
コード例 #2
0
        // Lese SpielerDaten aus der Liste
        public CSV_PlayerInfo GetPlayerData(string name)
        {
            for (int pl = 0; pl < csv_Players.Count; pl++)
            {

            if (csv_Players[pl].PlayerName == name) return csv_Players[pl];
            }
            CSV_PlayerInfo empty_value = new CSV_PlayerInfo();
            return empty_value;
        }
コード例 #3
0
 public void AddPlayer(string name)
 {
     if (!isPlayerInDatabase(name))
     {
     CSV_PlayerInfo new_player = new CSV_PlayerInfo();
     new_player.PlayerName = name;
     csv_Players.Add(new_player);
     }
 }
コード例 #4
0
 public void AddPlayer(CSV_PlayerInfo new_player)
 {
     if (!isPlayerInDatabase(new_player.PlayerName))
     {
     csv_Players.Add(new_player);
     }
 }
コード例 #5
0
        private void AddPlayer(string name, string tag)
        {
            Players.Add(name);
            Player_Tag.Add(name, tag);
            Player_Kills.Add(name, 0);
            Player_Death.Add(name, 0);
            Player_Warns.Add(name, 0);
            Player_Suicides.Add(name, 0);

            if (!csv_db.isInit()) csv_db.Init(@"Plugins\ExtraServerFuncs_PlayerDB.csv");
            if (!csv_db.isPlayerInDatabase(name))
            {
            CSV_PlayerInfo new_player = new CSV_PlayerInfo();
            new_player.PlayerName = name;
            new_player.ClanTag = tag;
            csv_db.AddPlayer(new_player);
            }
        }