Playtime Tracker

Tracks playtime and AFK time of players with a built-in reward system

Total Downloads: 2,594 - First Release: Sep 9, 2016 - Last Update: May 13, 2017

5/5, 8 likes
  1. k1lly0u

    k1lly0u Grenade Master Plugin Developer

  2. CaptainNebulous

    CaptainNebulous Shack Builder

    Code (Text):
    10:41 [Error] Failed to call hook 'OnServerInitialized' on plugin 'PlaytimeTracker v0.1.3' (NullReferenceException: Object reference not set to an instance of an object)
    10:41 [Debug]   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.OnServerInitialized () [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 name, System.Object[] args) [0x00000] in <filename unknown>:0
     
    Last edited by a moderator: Oct 16, 2016
  3. MeatCircus

    MeatCircus Master Researcher Server Owner

    so no idea on this?
     
  4. DikkatDeli

    DikkatDeli Shack Builder

    same problem here too.

    vip multiplier doesnt work. it give double points instead of pre-defiend multipler
    --- Double Post Merged, Sep 29, 2016 ---
    @k1lly0u will look into it he will solve we need to wait him :)
     
  5. MeatCircus

    MeatCircus Master Researcher Server Owner

    killyou fall off the planet or what? Strange for him to not even acknowledge the problem by now :(
     
  6. [YNPA] Fake Death

    [YNPA] Fake Death Wood Hoarder

    k1lly0u Where are you i got no respond for more thn 1 weke nog on the Private Plugin u been developing.?
     
  7. k1lly0u

    k1lly0u Grenade Master Plugin Developer

    ill have a look tonight
     
  8. k1lly0u

    k1lly0u Grenade Master Plugin Developer

    No issue with reward multipliers here... I made a 3.5, 7 and 15x multiplier and all worked exactly as intended. If you have multiple permissions granted to a user it will only work with the one that was created first
     
  9. Mr.Luigi

    Mr.Luigi Wood Hoarder

    anyway to replace or change the /pinfo command? as timed permissions plugin overrides it ://
     
  10. alamciaw82

    alamciaw82 Scavenger

    hi, im receiving this error in console..
    Code (Text):
    Oxide] 11:11 [Error] Failed to call hook 'Unload' on plugin 'PlaytimeTracker v0.1.3' (KeyNotFoundException: The given key was not present in the dictionary.)
    [Oxide] 11:11 [Debug] at System.Collections.Generic.Dictionary`2[System.String,System.Double].get_Item (System.String key) [0x00000] in <filename unknown>:0 at Oxide.Plugins.PlaytimeTracker.AddTime (IPlayer player) [0x00000] in <filename unknown>:0 at Oxide.Plugins.PlaytimeTracker.OnUserDisconnected (IPlayer player) [0x00000] in <filename unknown>:0 at Oxide.Plugins.PlaytimeTracker.Unload () [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 name, System.Object[] args) [0x00000] in <filename unknown>:0
    can some1 help me ? or issit fine ?
     
  11. mannot74

    mannot74 Wood Hoarder

    Hello

    We need a broadcast in chat for "playtimeTracker" for know when and how much players win

    And an option to separate how much "Economics" or "RP" we gain
     
  12. › Genocide

    › Genocide Wood Hoarder

    Last edited: Oct 20, 2016
  13. WuuB

    WuuB Scavenger

    Code (Text):
    [Error] PlaytimeTracker plugin failed to compile!
    [Error] PlaytimeTracker.cs(288,42): error CS1061: Type `Oxide.Core.Libraries.Covalence.IPlayerManager' does not contain a definition for `FindConnectedPlayer' and no extension method `FindConnectedPlayer' of type `Oxide.Core.Libraries.Covalence.IPlayerManager' could be found. Are you missing an assembly reference?
     
  14. Wulf

    Wulf Community Admin Community Admin Oxide Developer

    Temp/quickfix.
     
    k1lly0u, MeatCircus and MimiV like this.
  15. WuuB

    WuuB Scavenger

    Thanks !!
     
  16. k1lly0u

    k1lly0u Grenade Master Plugin Developer

  17. mannot74

    mannot74 Wood Hoarder

    Hello.
    We need a broadcast in chat for "playtimeTracker" for know how much and when players earn money

    We can replace and use "Autobroadcast"... or plugin "MoneyTime" ...

    But PlaytimeTracker work with ServerRewards...

    What is the good solution ?
     
  18. k1lly0u

    k1lly0u Grenade Master Plugin Developer

    I don't see much purpose in telling the whole server when someone earns a reward for playtime. You can add the following line to the specified function if you like but it won't be supported officially
    Code (C#):
    void AddPoints(IPlayer player, int amount) // <<-- This function
            {
                object multiplier = GetRewardMultiplier(player);
                if (multiplier == null) multiplier = 1f;
                amount = Convert.ToInt32(Math.Floor(amount * (float)multiplier));
                #if RUST
                if (ServerRewards && configData.RewardSystem.RewardPlugins.Rust.ServerRewards)
                    ServerRewards?.Call("AddPoints", ulong.Parse(player.Id), amount);

                if (Economics && configData.RewardSystem.RewardPlugins.Rust.Economics)
                    Economics?.Call("Deposit", ulong.Parse(player.Id), (double)amount);
                #endif

                #if HURTWORLD
                if (Economy && configData.RewardSystem.RewardPlugins.Hurtworld.Economy)
                    Economy?.Call("AddMoney", player.Object as PlayerSession, (double)amount);
                #endif
                if (UEconomics && configData.RewardSystem.RewardPlugins.Universal.UEconomics)          
                    UEconomics?.Call("Deposit", player.Id, amount);
                server.Broadcast($"{player.Name} earned {amount}"); // <<-- Add this line here
            }
     
  19. Pat Pend

    Pat Pend Wood Hoarder

    Kill, Love your plugins man. I asked a question a while back and curious if there is a command about querying play time as a whole. Ie; /playtime* and have it spit out something like "patpend is the player of the week with x hours on the server" or something so that the player with the most hours can be recognized as player of the week, month, etc etc etc. And maybe make admins / moderators exempt from the calculation. If its to much feel free to tell me to piss off :)
     
  20. anonymous 7

    anonymous 7 Wood Hoarder

    my playtime 3:43:13 hours
    but i have RP:0
    why?
    Снимок.PNG

    My config 5 RP for each hour.
    how to get 15 RP?

    Code (Text):
    "RewardSystem": {
        "Enabled": true,
        "Points": {
          "Playtime_Points": 5,
          "Playtime_PointTimer": 3600,
          "Referral_InvitePoints": 5,
          "Referral_JoinPoints": 3
        },