Advertisement
Guest User

PointsHelp

a guest
Dec 2nd, 2016
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.25 KB | None | 0 0
  1. public int GetPoints(string username)
  2.         {
  3.             int points;
  4.             points = int.Parse(IniReadValue("#noxscourge." + username, "Points"));
  5.             return points;
  6.         }
  7.         public int Compare(int x, int y)
  8.         {
  9.             return (((x - y) >> 0x1F) | (int)((uint)(-(x - y)) >> 0x1F));
  10.         }
  11.         public void ReadLine()
  12.         {
  13.             System.IO.StreamReader file = new System.IO.StreamReader(AppDomain.CurrentDomain.BaseDirectory + "Points.ini");
  14.             string line;
  15.             while((line = file.ReadLine()) != null)
  16.             {
  17.                 if(line.Contains("#noxscourge"))
  18.                 {
  19.  
  20.                     int i;
  21.                     i = 0;
  22.                     string newUser;
  23.                     int newPoints;
  24.                     string lastUser;
  25.                     int lastPoints;
  26.  
  27.                    
  28.                     string username = line.Split(new string[] { "#noxscourge.", "]" }, StringSplitOptions.None)[1];
  29.                     newUser = username;
  30.                     newPoints = GetPoints(username);
  31.                     pointsTop10[i] = newPoints;
  32.                     usernamesTop10[i] = newUser;
  33.                     i++;
  34.  
  35.                 }
  36.             }
  37.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement