diff --git a/config/clanmembers.json b/config/clanmembers.json
index 6b16d42..0b22e50 100644
--- a/config/clanmembers.json
+++ b/config/clanmembers.json
@@ -7,6 +7,9 @@
"Masistuta",
"RalphNorris",
"Jimbo_The_One",
+ "SquadKiller101",
+ "Pettie1972",
+ "HeteKip",
"Shepherders"
]
}
diff --git a/index.php b/index.php
index dda75e3..7b62f2b 100644
--- a/index.php
+++ b/index.php
@@ -101,24 +101,24 @@ $lastMatches = array_slice($allMatches, 0, 8);
if (isset($clan) && !empty($clan)) {
echo "
";
echo "| Attribute | Value | Rank(FPP SQUAD) | Points |
";
- foreach ($clanmembers['clanMembers'] as $value) {
+
foreach ($playerRanks as $rank) {
- if ($rank['name'] == $value) {
+ $playername = $rank['name'];
if (isset($rank['stat']['data']['attributes']['rankedGameModeStats']['squad-fpp'])) {
$tier = $rank['stat']['data']['attributes']['rankedGameModeStats']['squad-fpp']['currentTier']['tier'];
$subTier = $rank['stat']['data']['attributes']['rankedGameModeStats']['squad-fpp']['currentTier']['subTier'];
$image = "./images/ranks/" . $tier . "-" . $subTier . ".png";
$rankPoint = htmlspecialchars($rank['stat']['data']['attributes']['rankedGameModeStats']['squad-fpp']['currentRankPoint']);
- echo "| name | " . htmlspecialchars($value) . " |  | " . $rankPoint . " |
";
+ echo "| name | " . htmlspecialchars($playername) . " |  | " . $rankPoint . " |
";
} else {
- echo "| name | " . htmlspecialchars($value) . " |  | |
";
+ echo "| name | " . htmlspecialchars($playername) . " |  | |
";
}
- }
+
}
- }
+
foreach ($clan as $key => $value) {
if ($key == 'updated') {
continue;
diff --git a/update/get_matches.ps1 b/update/get_matches.ps1
index 793e36f..cc77ff4 100644
--- a/update/get_matches.ps1
+++ b/update/get_matches.ps1
@@ -46,6 +46,8 @@ foreach ($player in $player_data) {
}
else {
$stats = Invoke-RestMethod -Uri "https://api.pubg.com/shards/steam/matches/$match" -Method GET -Headers $headers
+ $sortedStats = $stats.included | Where-Object { $_.attributes.stats } | Sort-Object { $_.attributes.stats.winplace }
+ $stats.included = $sortedStats
$stats | ConvertTo-Json -Depth 100 | Out-File "$scriptroot/../data/matches/$match.json"
}
diff --git a/update/update_clan_members.ps1 b/update/update_clan_members.ps1
index 8732e83..f15b709 100644
--- a/update/update_clan_members.ps1
+++ b/update/update_clan_members.ps1
@@ -196,7 +196,7 @@ while($playerinfo.data.Count -gt $i) {
$i++
}
-$seasonstats | convertto-json -Depth 100| Out-File "$scriptroot/../data/player_season_data.json"
+$seasonstats | Sort-Object -Property {$_.stat.data.attributes.rankedGameModeStats.'squad-fpp'.currentRankPoint} -Descending | convertto-json -Depth 100| Out-File "$scriptroot/../data/player_season_data.json"
remove-lock
Stop-Transcript
\ No newline at end of file