1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-10 15:20:48 -05:00

fixed another issue with config creation

fixed issue with player count
added topstats command
This commit is contained in:
RaidMax
2015-03-10 16:56:01 -05:00
parent 57ddbebd8c
commit 74312d5b4e
9 changed files with 76 additions and 15 deletions

View File

@ -168,6 +168,25 @@ namespace IW4MAdmin
}
}
public List<Stats> topStats()
{
String Query = String.Format("SELECT * FROM STATS WHERE SKILL > '{0}' LIMIT 4", 20);
DataTable Result = GetDataTable(Query);
List<Stats> Top = new List<Stats>();
if (Result != null && Result.Rows.Count > 0)
{
foreach (DataRow D in Result.Rows)
{
Stats S = new Stats(Convert.ToInt32(D["Number"]), Convert.ToInt32(D["DEATHS"]), Convert.ToDouble(D["KDR"]), Convert.ToDouble(D["SKILL"]));
Top.Add(S);
}
}
return Top;
}
public void updatePlayer(Player P)
{
Dictionary<String, object> updatedPlayer = new Dictionary<String, object>();