Advertisement
Guest User

Untitled

a guest
Sep 20th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. stock void GetRanks()
  2. {
  3. delete g_hRanks;
  4. int i = 1;
  5. g_hRanks = CreateKeyValues("Rangi");
  6.  
  7. BuildPath(Path_SM, sPath, sizeof(sPath), "configs/kento_rangi.cfg");
  8.  
  9. if (!FileExists(sPath))
  10. SetFailState("File Not Found: %s", sPath);
  11.  
  12. g_hRanks.ImportFromFile(sPath);
  13. if (!g_hRanks.GotoFirstSubKey())
  14. return;
  15.  
  16. for(;;)
  17. {
  18. char sName[128];
  19. int iPoints;
  20. int iRounds;
  21.  
  22. g_hRanks.GetSectionName(sName, sizeof(sName));
  23. iPoints = g_hRanks.GetNum("points");
  24. iRounds = g_hRanks.GetNum("rounds");
  25.  
  26. g_sRanksNames[i] = sName;
  27. g_iRanks[i-1][0] = iPoints;
  28. g_iRanks[i-1][1] = iRounds;
  29.  
  30. if(!g_hRanks.GotoNextKey() || i == 18)
  31. break;
  32.  
  33. i++;
  34. }
  35.  
  36. return;
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement