1. AnExiledGod submitted a new resource:

    PlayTime - Logs players play time and allows you to view the players play time with a command.

    Read more about this resource...
     
  2. AnExiledGod updated PlayTime with a new update entry:

    Added Highscores

     
  3. love this ! :D
     
  4. error

    ошибка
     

    Attached Files:

    • 1.PNG
      1.PNG
      File size:
      12.5 KB
      Views:
      33
  5. Code:
    [Oxide] 5:12 AM [Error] Failed to call hook 'OnPlayerDisconnected' on plugin 'PlayTime' (KeyNotFoundException: The given key was not present in the dictionary.)
    [Oxide] 5:12 AM [Debug]   at System.Collections.Generic.Dictionary`2[System.String,Oxide.Plugins.PlayTime+PlayerInfo].get_Item (System.String key) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.PlayTime.OnPlayerDisconnected (.BasePlayer player) [0x00000] in <filename unknown>:0
      at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
      at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 
     
  6. If i do this on myself:
    Code:
    [Oxide] 10:39 AM [Error] Failed to call hook 'LastSeenCommand' on plugin 'PlayTime' (KeyNotFoundException: The given key was not present in the dictionary.)
    [Oxide] 10:39 AM [Debug]  at System.Collections.Generic.Dictionary`2[System.String,Oxide.Plugins.PlayTime+PlayerInfo].get_Item (System.String key) [0x00000] in
    <filename unknown>:0
      at Oxide.Plugins.PlayTime.LastSeenCommand (.BasePlayer player, System.String command, System.String[] args) [0x00000] in <filename unknown>:0
      at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
      at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Global
    [DOUBLEPOST=1435049119][/DOUBLEPOST]Only the admin can do the commands -correct? If not please add the oxide permission system to give rights to people who should can do that or create config file :)
    [DOUBLEPOST=1435053835][/DOUBLEPOST]ok after some time i dont get a error xD
    but every player can access the commands.

    Please implement a permission system.
    If i player is online and we do the command /lastseen please implement a message "Player is actual online"...

    Thank you!! Great addon :)
     
    Last edited by a moderator: Jun 23, 2015
  7. Code:
    [Oxide] 1:39 PM [Error] Failed to call hook 'PlayTimeCommand' on plugin 'PlayTim
    e' (IndexOutOfRangeException: Array index is out of range.)
    [Oxide] 1:39 PM [Debug]   at Oxide.Plugins.PlayTime.PlayTimeCommand (.BasePlayer
    player, System.String command, System.String[] args) [0x00000] in <filename unk
    nown>:0
      at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (ob
    ject,object[],System.Exception&)
      at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invoke
    Attr, System.Reflection.Binder binder, System.Object[] parameters, System.Global
    Error I am currently receiving.
     
  8. Wow I just noticed I don't get notifications when people reply to my plugin posts :(

    Yes, I know there are some errors, their harmless, just annoying. I'm going to look into fixing them. Also I will see about implementing the oxide permission system.
     
  9. AnExiledGod updated PlayTime with a new update entry:

    New Features and some Bug Fixes!

     
  10. Seems to be working, but on player log out.

    Code:
    [Oxide] 8:16 AM [Error] Failed to call hook 'OnPlayerDisconnected' on plugin 'PlayTime' (KeyNotFoundException: The given key was not present in the dictionary.)
    [Oxide] 8:16 AM [Debug]   at System.Collections.Generic.Dictionary`2[System.String,Oxide.Plugins.PlayTime+PlayerInfo].get_Item (System.String key) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.PlayTime.OnPlayerDisconnected (.BasePlayer player) [0x00000] in <filename unknown>:0
      at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
      at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 
    Okay now, I see, I've restarted the server and it fixed this.
     
    Last edited by a moderator: Jun 24, 2015
  11. Fantastic, if it comes up again let me know. I wasn't able to reproduce locally but I'm limited in what I can test.
     
  12. Works great for me ! Thanks you! 5 stars!
     
  13. How to Change the frequency Saving statistics?
     
  14. It doesn't save using a timer. It will log when a user connects, and then when the user disconnects the playtime will be increased the appropriate amount. I'm unsure how this might effect things if a server crashes or something.
     
  15. Make certain the timer will be updated through a statistics file date / PlayTime.json
     
  16. What do you mean?
     
  17. Statistics are updated to 5 minutes or 10
    And the problem is in the data file. Player zashol and went out and turned negative during the game:
    "LastLoginTime": 1435141405,
    "LastLogoutTime": 1435141867,
    "Played": -1435139248652733
    [DOUBLEPOST=1435144002][/DOUBLEPOST]Sometimes errors occur when a player is disconnected from the server:
    Code:
    [Oxide] 2:10 PM [Error] Failed to call hook 'OnPlayerDisconnected' on plugin 'PlayTime' (KeyNotFoundException: The given key was not present in the dictionary.)
    [Oxide] 2:10 PM [Debug] at System.Collections.Generic.Dictionary`2 [System.String, Oxide.Plugins.PlayTime + PlayerInfo] .get_Item (System.String key) [0x00000] in <filename unknown>: 0
       at Oxide.Plugins.PlayTime.OnPlayerDisconnected (.BasePlayer player) [0x00000] in <filename unknown>: 0
       at (wrapper managed-to-native) System.Reflection.MonoMethod: InternalInvoke (object, object [], System.Exception &)
       at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object [] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>: 0
    With an error figured out myself! It appears if a player was when the online plug-in and then added the player is out!
     
  18. Alright, well I'm going to rework how it logs played time (like you suggested) and will try to fix it then. This for now, is a harmless error I believe
     
  19. is this the same plugin that ive seen on Intoxicated servers that announces this information? For example: ThatGermanGuy has logged back in after 3 days and 5hrs....etc
     
  20. Nope, this plugin doesn't do that. It can if you want that feature. :) This is the only plugin for playtime though so they probably have a custom plugin.