Hey @kenna
I can but why is is sorting in the wrong order?
I don't think I've had this problem.
Example.

Player Ranks
Player ranks and stats database
Total Downloads: 4,906 - First Release: Mar 4, 2017 - Last Update: May 29, 2018
- 5/5, 19 likes
-
Confirmed I had to request @kenna for assistance in getting a player with 177 hours from rank 8th to 1st
[DOUBLEPOST=1503483386][/DOUBLEPOST]Also @Steenamaroo how did you get the player name to link to the steam profile? Also I Looooove your CSS -
Gotcha!
Consider it done and thank you for flagging that. @kenna
@PryMary
I declared two vars
Code:$url = "http://steamcommunity.com/profiles/"; $blank = "target=%22_blank%22";
Code:<td>" . $row['Name']. "</td>
Code:<td><a href=" . $url . $row['UserID'] . " . $blank .>" . $row['Name']. "</a></td>
not sure if it interests you but the 'recent' column is there to sort offline players in order of last appearance, under online players.
Code:$status = mysql_query("SELECT `Name`,`UserID`,`Status`,`Recent` FROM `playerranksdb` ORDER BY Status DESC, Recent DESC;");
Last edited by a moderator: Aug 23, 2017 -
nice one bro, my PHP skills fail me though: The Rusty Bullet Hole - Monthly Stats
I did it like this (told you it's been a while) in server1.php:
Code:<?php $url = "http://steamcommunity.com/profiles/"; $blank = "target=%22_blank%22"; $sql = "SELECT Name, PVPKills, KDR, Status FROM playerranksdb ORDER BY 2 desc limit 100";$result = $conn->query($sql);if ($result->num_rows > 0) { // output data of each row echo " <div class='table-responsive'>"; echo ""; echo ""; echo "<table id='example' class='display compact table table-hover table-striped results '>"; echo "<thead>"; echo "<tr>"; echo "<th>#</th>"; echo "<th>Name</th>"; echo "<th>PVPKills</th>"; echo "<th>KDR</th>"; echo "</tr>"; echo "</thead>"; echo "<tbody>"; $counter = 1; while ($row = $result->fetch_assoc()) { $counter2 = $counter++; echo "<tr>"; echo "<th scope='row'>$counter2</th>"; echo "<a href=" . $url . $row['UserID'] . " . $blank .>" . $row['Name']. "</a>"; echo "<td>" . $row['PVPKills'] . "</td>"; echo "<td>" . $row['KDR'] . "</td>"; echo "</tr>"; } echo "</tbody>"; echo "</table>"; echo "</div>"; }?>
-
That's right! ^^
I accidentally left the <td></td> out of my code above.
It's edited fixed now. You'd need to add those too.
Code:echo "<td><a href=" . $url . $row['UserID'] . " . $blank .>" . $row['Name']. "</a></td>";
-
ahahahahahaa i was just sat here having a ciggy and thinking hmmmm do i need those <td> tags!! Nice one thank you very much
-
No worries.
I have an update sitting here ready to go.
It adds APC hits/kills, NPCDistance, and Airdrops Looted, but I was waiting until closer to forced wipe before releasing it.
I've added `TimePlayed` TIME NOT NULL now too.
Thanks again. -
Nice one!!! Aye more stats to show! Players love them stats! Now to just figure out a nice clean way of showing it all!
-
[DOUBLEPOST=1503487715][/DOUBLEPOST]
Finding a neat way to make all the stats (that you want to show) accessible.
I like the dropdown idea letting the player choose.
I've done sites for other guys where they just wanted a large table with a limited set of stats. -
I really like the drop down idea too, would it be possible to do that but have it show the top ten like the base script does? As you can see on mine i have the default 3 but would really like the fourth to have structures built / deployed as 1st initial view then maybe a drop down selection above it to change just that one to the various other tables... for instance NPC Distance, APC Hits/kills etc...
Don't suppose you fancy making a little bit of money would you^^
-
That sounds doable for sure. PM me.
-
\0/ w0000t oki doki will do
just gotta make my nephew some lunch and shall pm you afterwards
-
Steenamaroo updated Player Ranks with a new update entry:
1.2.4
-
Confirming APC Kills and hits working correctly as well as NPC Kills & distance
[DOUBLEPOST=1503613871][/DOUBLEPOST]Just had this pop up when a player was killed:
Code:(23:29:51) | Failed to call hook 'OnEntityDeath' on plugin 'PlayerRanks v1.2.4' (NullReferenceException: Object reference not set to an instance of an object) (23:29:51) | at Oxide.Plugins.PlayerRanks.OnEntityDeath (.BaseEntity entity, .HitInfo hitinfo, .HitInfo info) [0x00000] in <filename unknown>:0 at Oxide.Plugins.PlayerRanks.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0 at Oxide.Plugins.CSharpPlugin.InvokeMethod (HookMethod method, System.Object[] args) [0x00000] in <filename unknown>:0 at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0 at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00000] in <filename unknown>:0 (23:29:51) | [PT] FEEDYOURWEED[xxxxxxx] died (Bullet)
-
Did the Bradley kill him, do you know?
-
nope it was player vs player... the dead guy tried to steal the bradley loot ahahaha
[DOUBLEPOST=1503614633][/DOUBLEPOST]weird I just got the same player to be killed by another and no error was shown... this time he was not near the bradley though
Update: OK so APC killing players brings no errors, players killing players away from the APC brings no errors but a player killing a player near or in my case above (the about to be dead guy was on a pipe above the APC) does bring an error.
It may be related but if you die near the APC your body insta disappears and just leaves that backpack there.Last edited by a moderator: Aug 24, 2017 -
After today's update the plugin keeps changing my MySQL port to 3306 even if I shut down the server to change it to my custom port.
-
Thank you - Will be back to you both soon.
-
Steenamaroo updated Player Ranks with a new update entry:
1.2.5
-
w00t Thank you Steenamaroo