Results 1 to 1 of 1
  1. #1

    Need your help guys with this code:)

    My question are can i change this code so this are only for my own clan name,score etc.??All is my clan name can registrated same score etc.Can you help me to write this changes for me?I not a coder.Blaze



    double count = limit.Activations();

    if (count > 3)
    return false;

    List<PlayerInfoInterface> players = new List<PlayerInfoInterface>();
    players.AddRange(team1.players);
    players.AddRange(team2.players);
    Dictionary<String, double> clan_stats = new Dictionary<String, double>();

    /* Collect clan statistics */
    foreach(PlayerInfoInterface player_info in players)
    {
    if(player_info.Tag.Length == 0)
    continue;

    if (!clan_stats.ContainsKey(player_info.Tag))
    clan_stats.Add(player_info.Tag, 0);

    clan_stats[player_info.Tag] += player_info.ScoreRound;
    }

    /* Find the best scoring clan */
    String best_clan = String.Empty;
    double best_score = 0;

    foreach(KeyValuePair<String, double> pair in clan_stats)
    if (pair.Value > best_score)
    {
    best_clan = pair.Key;
    best_score = pair.Value;
    }

    if (best_clan.Length > 0)
    {
    String message = "Top scoring clan this round is "+ best_clan + " with " + best_score + " points!";
    plugin.SendGlobalMessage(message);
    plugin.ConsoleWrite(message);
    }
    return false;

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •