Player Ranks

Player ranks and stats database

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

5/5, 19 likes
  1. Code:
    (10:12:59) | Unclosed mysql connection (server=54.38.X.X;port=3306;database=X;user id=X;password=X;pooling=False;defaultcommandtimeout=120;allowzerodatetime=True), by plugin 'PlayerRanks', closing...
    Suggestion for developer, close MySQL connection when unloading plugin. When not closing connection the server hangs when reloading/unloading plugin.

    Code:
    void Unload()
    ...
    SaveData();
               
    Sql.CloseDb(Sql_conn);
    }
     
  2. Idea: Option to reset all/custom stats after player death? More hardcore.
     
  3. Hi, I recently made my own Server and i want to do events where whoever has the most kills etc by the end of the wipe will get a rewards, can this plugin tell any of the admins who had the most kills etc?
     
  4. Hi,
    Yes. PVPKills are tracked and you can wipe, pause, or take a 'snapshot' of the database any time you like.
     
  5. Great Thankyou, been looking for a good plugin like this for a while xD
     
  6. Enjoy. :)
    The saving of leaderboards is only useful if you SQL to a website but, for your purposes, you could stop stat collection at a set time.
    That means the public leaderboard would stay as is until you've done your rewards then continue, or wipe.

    Looks like I need to update the overview; Anything new is covered here.
     
  7. Does a remote SQL database from website not work for leaderboards?

    Well i cant seem to get leaderboards working anyway
     
  8. It should, yes.
    If you have MySQL enabled, and correct details filled out, PlayerRanks will save the main database at regular intervals and leaderboard snap shots if/when you ask it to, in the admin panel.
     
  9. It says its saved to mysql, But if i do /pr the leader boards will be still empty, Does it need more then 1 player on the server? Right now im just testing it privately
     
  10. You may just have no data to display, if you're on your own.
    There's also a config option to allow the publishing of admin stats; This is false by default.

    If that's set to false, your stats will not be visible in-game.
    They should still save to SQL, though; Both main database, and any leaderboard snapshots you've saved.
     
  11. Ah stupid of me lol, Thanks alot mate very nice plugin!
     
  12. No probs. Best of luck. :)
     
  13. Hi , could you briefly go over the steps to wipe the ranks using the /pr wipe command? I have the highest authlevel and owner + admin with all perms set, but can't get the command to work. Reloading the plugin or trying to do it while unloaded doesn't work for me. Thanks
     
  14. Hi,
    You just type /pr wipe in chat - No need for unload/reload.
    You can also use the button the Admin panel in GUI, found at /pr.

    Please let me know if either doesn't work, but do note that this wipes the main data only; It will not wipe your SQL tables, or leaderboard snapshots.
     
  15. Yea I had this problem as well with Mysql 8.x. You are receiving this error because 'Admin' became a reserved word in Mysql 8. To fix the problem, you have to escape the column in any queries (with backticks) where the `Admin` column is used.

    Eg: Change Admin = @37 to `Admin` = @37 in the line below
    Code:
                        Sql.Insert(Core.Database.Sql.Builder.Append($"INSERT INTO {conf.MySQL.tablename} ( `UserID`, `Name`, `PVPKills`, `PVPDistance`, `PVEKills`, `PVEDistance`, `NPCKills`, `NPCDistance`, `SleepersKilled`, `Headshots`, `Deaths`, `Suicides`, `KDR`, `SDR`, `SkullsCrushed`, `TimesWounded`, `TimesHealed`, `HeliHits`, `HeliKills`, `APCHits`, `APCKills`, `BarrelsDestroyed`, `ExplosivesThrown`, `ArrowsFired`, `BulletsFired`, `RocketsLaunched`, `WeaponTrapsDestroyed`, `DropsLooted`, `StructuresBuilt`, `StructuresDemolished`, `ItemsDeployed`, `ItemsCrafted`, `EntitiesRepaired`, `ResourcesGathered`, `StructuresUpgraded`, `Status`, `TimePlayed`, `Admin`, `Economics`, `ActiveDate`) VALUES ( @0, @1, @2, @3, @4, @5, @6, @7, @8, @9, @10, @11, @12, @13, @14, @15, @16, @17, @18, @19, @20, @21, @22, @23, @24, @25, @26, @27, @28, @29, @30, @31, @32, @33, @34, @35, @36, @37, @38, @39) ON DUPLICATE KEY UPDATE UserID = @0, Name = @1, PVPKills = @2, PVPDistance = @3, PVEKills = @4, PVEDistance = @5, NPCKills = @6, NPCDistance = @7,SleepersKilled = @8, HeadShots = @9, Deaths = @10, Suicides = @11, KDR = @12, SDR = @13, SkullsCrushed = @14, TimesWounded = @15, TimesHealed = @16, HeliHits = @17, HeliKills = @18, APCHits = @19, APCKills = @20, BarrelsDestroyed = @21, ExplosivesThrown = @22, ArrowsFired = @23, BulletsFired = @24, RocketsLaunched = @25, WeaponTrapsDestroyed = @26, DropsLooted = @27, StructuresBuilt = @28, StructuresDemolished = @29, ItemsDeployed = @30, ItemsCrafted = @31, EntitiesRepaired = @32, ResourcesGathered = @33, StructuresUpgraded = @34, Status = @35, TimePlayed = @36, Admin = @37, Economics = @38, ActiveDate = @39;", c.Value.UserID, RemoveSurrogatePairs(c.Value.Name, ""), c.Value.PVPKills, c.Value.PVPDistance, c.Value.PVEKills, c.Value.PVEDistance, c.Value.NPCKills, c.Value.NPCDistance, c.Value.SleepersKilled, c.Value.HeadShots, c.Value.Deaths, c.Value.Suicides, c.Value.KDR, c.Value.SDR, c.Value.SkullsCrushed, c.Value.TimesWounded, c.Value.TimesHealed, c.Value.HeliHits, c.Value.HeliKills, c.Value.APCHits, c.Value.APCKills, c.Value.BarrelsDestroyed, c.Value.ExplosivesThrown, c.Value.ArrowsFired, c.Value.BulletsFired, c.Value.RocketsLaunched, c.Value.WeaponTrapsDestroyed, c.Value.DropsLooted, c.Value.StructuresBuilt, c.Value.StructuresDemolished, c.Value.ItemsDeployed, c.Value.ItemsCrafted, c.Value.EntitiesRepaired, c.Value.ResourcesGathered, c.Value.StructuresUpgraded, c.Value.Status, c.Value.TimePlayed, c.Value.Admin, c.Value.Economics, c.Value.ActiveDate), Sql_conn);
    To get:
    Code:
                        Sql.Insert(Core.Database.Sql.Builder.Append($"INSERT INTO {conf.MySQL.tablename} ( `UserID`, `Name`, `PVPKills`, `PVPDistance`, `PVEKills`, `PVEDistance`, `NPCKills`, `NPCDistance`, `SleepersKilled`, `Headshots`, `Deaths`, `Suicides`, `KDR`, `SDR`, `SkullsCrushed`, `TimesWounded`, `TimesHealed`, `HeliHits`, `HeliKills`, `APCHits`, `APCKills`, `BarrelsDestroyed`, `ExplosivesThrown`, `ArrowsFired`, `BulletsFired`, `RocketsLaunched`, `WeaponTrapsDestroyed`, `DropsLooted`, `StructuresBuilt`, `StructuresDemolished`, `ItemsDeployed`, `ItemsCrafted`, `EntitiesRepaired`, `ResourcesGathered`, `StructuresUpgraded`, `Status`, `TimePlayed`, `Admin`, `Economics`, `ActiveDate`) VALUES ( @0, @1, @2, @3, @4, @5, @6, @7, @8, @9, @10, @11, @12, @13, @14, @15, @16, @17, @18, @19, @20, @21, @22, @23, @24, @25, @26, @27, @28, @29, @30, @31, @32, @33, @34, @35, @36, @37, @38, @39) ON DUPLICATE KEY UPDATE UserID = @0, Name = @1, PVPKills = @2, PVPDistance = @3, PVEKills = @4, PVEDistance = @5, NPCKills = @6, NPCDistance = @7,SleepersKilled = @8, HeadShots = @9, Deaths = @10, Suicides = @11, KDR = @12, SDR = @13, SkullsCrushed = @14, TimesWounded = @15, TimesHealed = @16, HeliHits = @17, HeliKills = @18, APCHits = @19, APCKills = @20, BarrelsDestroyed = @21, ExplosivesThrown = @22, ArrowsFired = @23, BulletsFired = @24, RocketsLaunched = @25, WeaponTrapsDestroyed = @26, DropsLooted = @27, StructuresBuilt = @28, StructuresDemolished = @29, ItemsDeployed = @30, ItemsCrafted = @31, EntitiesRepaired = @32, ResourcesGathered = @33, StructuresUpgraded = @34, Status = @35, TimePlayed = @36, `Admin` = @37, Economics = @38, ActiveDate = @39;", c.Value.UserID, RemoveSurrogatePairs(c.Value.Name, ""), c.Value.PVPKills, c.Value.PVPDistance, c.Value.PVEKills, c.Value.PVEDistance, c.Value.NPCKills, c.Value.NPCDistance, c.Value.SleepersKilled, c.Value.HeadShots, c.Value.Deaths, c.Value.Suicides, c.Value.KDR, c.Value.SDR, c.Value.SkullsCrushed, c.Value.TimesWounded, c.Value.TimesHealed, c.Value.HeliHits, c.Value.HeliKills, c.Value.APCHits, c.Value.APCKills, c.Value.BarrelsDestroyed, c.Value.ExplosivesThrown, c.Value.ArrowsFired, c.Value.BulletsFired, c.Value.RocketsLaunched, c.Value.WeaponTrapsDestroyed, c.Value.DropsLooted, c.Value.StructuresBuilt, c.Value.StructuresDemolished, c.Value.ItemsDeployed, c.Value.ItemsCrafted, c.Value.EntitiesRepaired, c.Value.ResourcesGathered, c.Value.StructuresUpgraded, c.Value.Status, c.Value.TimePlayed, c.Value.Admin, c.Value.Economics, c.Value.ActiveDate), Sql_conn);
     
  16. Thanks for a great plugin! :)
     
  17. Anyone in here use Clans, and PlayerRanks with MySQL?
     
  18. It might be nice if clan tags showed up in a players mysql name or in a separate column