PlaytimeTracker

Moved

Total Downloads: 4,803 - First Release: Sep 9, 2016 - Last Update: Nov 10, 2017

5/5, 10 likes
  1. Wulf

    Wulf Community Admin

    Make sure you have Oxide fully updated, and check the top of that stack for the full error.
     
  2. Code:
    (02:08:09) | Failed to call hook 'OnUserConnected' on plugin 'PlaytimeTracker v0.1.6' (NullReferenceException: Object reference not set to an instance of an object)
    (02:08:09) | at Oxide.Core.Libraries.Covalence.GenericPosition.op_Equality (Oxide.Core.Libraries.Covalence.GenericPosition a, Oxide.Core.Libraries.Covalence.GenericPosition b) [0x00000] in <filename unknown>:0
    at Oxide.Plugins.PlaytimeTracker.CheckPosition (IPlayer player) [0x00000] in <filename unknown>:0
    at Oxide.Plugins.PlaytimeTracker.AddTime (IPlayer player) [0x00000] in <filename unknown>:0
    at Oxide.Plugins.PlaytimeTracker.ResetTimer (IPlayer player, Boolean isNew) [0x00000] in <filename unknown>:0
    at Oxide.Plugins.PlaytimeTracker.InitPlayerData (IPlayer player) [0x00000] in <filename unknown>:0
    at Oxide.Plugins.PlaytimeTracker.OnUserConnected (IPlayer player) [0x00000] in <filename unknown>:0
    at Oxide.Plugins.PlaytimeTracker.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
    hello oxide full upadate ok.
    Thanks for help
    Wulf
     
    Last edited by a moderator: Oct 18, 2017
  3. Just to let you know that your plugin throws an NRE in OnPlayerConnect in Rust Legacy. I had a quick look through your code and suspect the CheckPosition or AddPosition functions are causing the issue, either because of the lack of their implementation in Oxide or that you are trying to access the positions too soon. A quick fix is to disable the TrackAFKTime config option which completely solves the issue.
     
  4. Wulf

    Wulf Community Admin

    Both should be implemented for Legacy, though might have to check if the position isn't set at that point yet. OnUserConnected might be too early in Legacy.
     
  5. Yeah I figured this would be the issue. I have a feeling the character isn't created until later in the login sequence.
     
  6. Wulf

    Wulf Community Admin

    Probably, in which case we'd need to bump the hook a little bit as I believe we'd like the player to be fully available at that point for the Connected hooks.
     
  7. There's no lang file by default. Can you add that?
     
  8. There is a lang file for this plugin

    Code:
    {
      "noplayer": "Unable to find a player with that name.",
      "referaccept1player": "Your referral has been accepted",
      "referaccept1ref": "{0} has acknowledged a referral from you",
      "referacceptplayer": "Your referral has been accepted and you have received {0} points",
      "referacceptref": "{0} has acknowledged a referral from you and you have received {1} points",
      "noself": "You can not refer yourself...",
      "alreadyref": "You have already acknowledged a referral",
      "refsyn": "/refer <playername> - Acknowledge a referral from <playername>",
      "permmulti": "permission | multiplier",
      "noperm": "The permission {0} does not exist",
      "permrem": "You have successfully removed the permission {0}",
      "nomulti": "You must enter a multiplier",
      "permexist": "The permission '{0}' already exists",
      "createsucc": "You have successfully created a new reward multiplier. Permission: {0}, Multiplier {1}",
      "ptt": "Create custom permissions with reward multipliers for VIP players",
      "addsyn": "/ptt add <permissionname> <multiplier> - Add a new reward multiplier",
      "remsyn": "/ptt remove <permissionname> - Remove reward multiplier",
      "listsyn": "/ptt list - List available permission and their multipliers",
      "notime": "Unable to get your playtime",
      "notimetarget": "Unable to get that players playtime",
      "notarget": "Unable to find the specified player",
      "currencyNameRP": "RP",
      "currencyNameEco": "Coins",
      "depositMsg": "{0} {1} have been deposited to your account!",
      "topPlaytime": "Top Playtimes:",
      "topPTSyn": "You can see the top scoring playtimes by typing \"/playtime top (optional:number)\""
    }
     
  9. Ah cheers, didn't pop up for me :)
     
  10. The problem ...
    After restarting the server, it starts to add a point every 1 minute.
     
  11. When i change my config to give 1 RP every 300 seconds it either doesnt work at all or does it every minute?? any help will be greatly appreciated
     
  12. Wulf

    Wulf Community Admin

    Wulf updated Playtime Tracker with a new update entry:

    0.1.7

     
  13. Is it possible to get this plugin to have an option of adding permissions, or changing a player to an Oxide group?
     
  14. Is is possible to make this plugin or any of the other reward plugin to grant people into a certain group after how much they have played? And if yes, how? Also, why won't "playtime all" command work?
     
  15. Hi! I have installed AntiNoobRaid and getting some error from it. Anyway to set playtime for already on server sleepers when i istall this mod and antinoob. Can i set it manually or automatic to 1 min?
     
  16. i can give points with a command?
     
  17. Been getting this spamming logs in Hurtworld V2

    Code:
    00:00 [Error] Failed to call hook 'OnUserConnected' on plugin 'PlaytimeTracker v0.1.6' (NullReferenceException: Object reference not set to an instance of an object)
      at Oxide.Game.Hurtworld.Libraries.Player.Position (.PlayerSession session) [0x00000] in <filename unknown>:0
      at Oxide.Game.Hurtworld.Libraries.Covalence.HurtworldPlayer.Position () [0x00000] in <filename unknown>:0
      at Oxide.Plugins.PlaytimeTracker.CheckPosition (IPlayer player) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.PlaytimeTracker.AddTime (IPlayer player) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.PlaytimeTracker.ResetTimer (IPlayer player, Boolean isNew) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.PlaytimeTracker.InitPlayerData (IPlayer player) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.PlaytimeTracker.OnUserConnected (IPlayer player) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.PlaytimeTracker.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.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
     
  18. Anyone know how to modify this so that a player will be assigned to a group after reaching a certain amount of hours, or maintaining their position in the top 10? Looking to get a chat title auto-assigned.
     
  19. Hey killy0u can you possibly add an option to get points for downing a helicopter or destroying a tank ? or is there a plugin out there already ?
     
  20. hey guys i have installed playtime tracker and i keep getting this error im trying to use it with antinoobraid plugin
    [AntiNoobRaid] Playtime Tracker is not installed!
    [AntiNoobRaid] Failed to find playtime info for player with steamID 76561198348540689
    [AntiNoobRaid] Playtime Tracker is not installed!