Player Ranks

Player ranks and stats database

Total Downloads: 4,908 - First Release: Mar 4, 2017 - Last Update: May 29, 2018

5/5, 19 likes
  1. I haven't sussed out that APC related issue (the one in fix notes was something else)
    but thank you for the detailed information! That's really useful. :)
     
  2. It doesn't seem to be adding the new columns to the database. Do I need to drop the database?
     
  3. Steenamaroo updated Player Ranks with a new update entry:

    1.2.6

     
  4. Just updated and deleted the language file
    (18:00:31) | [Oxide] 18:00 [Error] Failed to call hook 'OnEntityDeath' on plugin 'PlayerRanks v1.2.6' (NullReferenceException: Object reference not set to an instance of an object)

    (18:00:31) | [Oxide] 18:00 [Stacktrace] at Oxide.Plugins.PlayerRanks.ProcessPVPKill (.BasePlayer player, .BasePlayer victim) [0x00000] in <filename unknown>:0

    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
     
  5. No. It should do it the first time the new version saves.
    That said the new new version does require you to drop the database. :p
    [DOUBLEPOST=1503623260][/DOUBLEPOST]@MeatCircus
    That's the same error PryMary had on the previous page.
    Do you know if your circumstances match his?

    Post #316
     
  6. Ok, new version added all the new columns after db drop, so all is good.
     
  7. Not sure but I just wipe anyway I'll let you know if I see it again
     
  8. Not sure but I just wipe anyway I'll let you know if I see it again
     
  9. You wiped? Aw damn man. Sorry man.
    For future reference, there's no need.

    At worst that message means one kill or death (or both) didn't get awarded properly.

    Edit : You have the specific time. If you could glance at your logs that'd be really helpful.
    18:00:31
     
  10. Steenamaroo updated Player Ranks with a new update entry:

    1.2.7


    [DOUBLEPOST=1503672047][/DOUBLEPOST]This update should address the errors seen my @PryMary and @MeatCircus

    If that's not the case, or there's anything new, please let me know. :)
     
  11. Steenamaroo updated Player Ranks with a new update entry:

    1.2.8

     
  12. hi for last update..can i use my old config and data file or its enough remove old plugin ?
     
  13. No, just drag+drop install.

    If you're coming from 1.2.5 or earlier, drop your MySql table and let it repopulate on next save.
     
  14. SOLVED See bottom of this post.

    For some reason HeliKills in data file is not getting sent to db. DB is using HelliHits for both HeliKills and HeliHits.

    I check DB and I do have a HeliHits, and HeliKills column.

    Here is my data:
    Code:
    {
      "PlayerRankData": {
        "76561197976613740": {
          "Admin": true,
          "UserID": 76561197976613740,
          "Name": "[VerteX] Snivel",
          "TimePlayed": "47:41:43",
          "Status": "offline",
          "Economics": 1905124758,
          "Recent": 104,
          "PVPKills": 1,
          "PVPDistance": 2.43,
          "PVEKills": 389,
          "PVEDistance": 560.0,
          "NPCKills": 33,
          "NPCDistance": 235.11,
          "Deaths": 2,
          "BarrelsDestroyed": 332,
          "HeliHits": 266,
          "HeliKills": 12,
          "APCHits": 384,
          "APCKills": 6,
          "Suicides": 1,
          "TimesWounded": 0,
          "ExplosivesThrown": 633,
          "ArrowsFired": 1846,
          "BulletsFired": 8103,
          "WeaponTrapsDestroyed": 3,
          "SleepersKilled": 1,
          "RocketsLaunched": 443,
          "TimesHealed": 34,
          "KDR": 0.25,
          "SDR": 0.25,
          "DropsLooted": 1,
          "StructuresBuilt": 23758,
          "ItemsDeployed": 5796,
          "ItemsCrafted": 3699,
          "EntitiesRepaired": 89,
          "StructuresDemolished": 1420,
          "ResourcesGathered": 122381,
          "StructuresUpgraded": 2599
        },
    
    Here is the PHP: (but it doesn't matter because the database is receiving HeliHits for both)
    Code:
    <?php
    $servername = "localhost";
    $username = "ranks";
    $password = "xxxxxx";
    $dbname = "playerranks";// Create connection
    $conn = new mysqli($servername, $username, $password, $dbname);
    // Check connection
    if ($conn->connect_error) {
        die("Connection failed: " . $conn->connect_error);
    }$sql  = 'SELECT * FROM `playerranksdb`';
    $result = $conn->query($sql);if ($result->num_rows > 0) {
        // output data of each row
        while($row = $result->fetch_assoc()) {
            echo "<br> SteamID: ". $row["UserID"]. " - Name: ". $row["Name"]. " - PVPKills: " . $row["PVPKills"]. " - PVPDistance: " . $row["PVPDistance"]. " - PVEKills: " . $row["PVEKills"]. " - PVEDistance: " . $row["PVEDistance"]. " - Deaths: " . $row["Deaths"]. " - BarrelsDestroyed: " . $row["BarrelsDestroyed"]. " - HeliHits: " . $row["HeliHits"]. " - HeliKills: " . $row["HeliKills"]. " - Suicides: " . $row["Suicides"]. " - TimesWounded: " . $row["TimesWounded"]. " - ExplosivesThrown: " . $row["ExplosivesThrown"]. " - ArrowsFired: " . $row["ArrowsFired"]. " - BulletsFired: " . $row["BulletsFired"]. " - WeaponTrapsDestroyed: " . $row["WeaponTrapsDestroyed"]. " - SleepersKilled: " . $row["SleepersKilled"]. " - NPCKills: " . $row["NPCKills"]. " - NPCDistance: " . $row["NPCDistance"]. " - RocketsLaunched: " . $row["RocketsLaunched"]. " - TimesHealed: " . $row["TimesHealed"]. " - KDR: " . $row["KDR"]. " - SDR: " . $row["SDR"]. " - StructuresBuilt: " . $row["StructuresBuilt"]. " - ItemsDeployed: " . $row["ItemsDeployed"]. " - ItemsCrafted: " . $row["ItemsCrafted"]. " - EntitiesRepaired: " . $row["EntitiesRepaired"]. " - StructuresDemolished: " . $row["StructuresDemolished"]. " - ResourcesGathered: " . $row["ResourcesGathered"]. " - StructuresUpgraded: " . $row["StructuresUpgraded"]. " - Status: " . $row["Status"]. " - TimePlayed: " . $row["TimePlayed"]. " - Recent: " . $row["Recent"]. " - APCHits: " . $row["APCHits"]. " - APCKills: " . $row["APCKills"]. " - DropsLooted: " . $row["DropsLooted"]. " - Economics: " . $row["Economics"]. "<br><hr class=c1>";
        }
    } else {
        echo "0 results";
    }$conn->close();
    ?>
    Here are the results:
    https://www.smsmemory.com/ranks/Ranks.php

    Database has a HeliHits and a HeliKills column, data file has as well (as above).
    So far It's only Heli that is using same data for both. APC, NPS are fine.


    EDIT:
    I found the issue.
    Line 3064 needs to be changed to:
    Code:
                    cmd.Parameters.AddWithValue("@11",c.Value.HeliKills);
    
     
    Last edited by a moderator: Aug 26, 2017
  15. There had to be at least one. ;)
    Thanks man.
     
  16. ok probably a really stupid question. what is sdr?
     
  17. I think it's suicide to death ratio.
     
  18. Hey,
    No stupid questions but the ones you don't ask. ;)

    Yes, it's suicide to death ratio.
     
  19. Have a suggestion;
    Is there any way you could try to see if you could get in contact with the dev of Target Practice and see if you can maybe integrate that into Player ranks somehow? OR maybe make your own variant and integrate it in? Again Great work on all your plugins!