Sleep

Moved

Total Downloads: 966 - First Release: Jun 18, 2015 - Last Update: Jul 5, 2017

4/5, 4 likes
  1. Wulf

    Wulf Community Admin

    Wulf submitted a new resource:

    Sleep - Allows players with permission to get a well-rested sleep

    Read more about this resource...
     
  2. Code:
    [Oxide] 10:20 PM [Error] Failed to call hook 'OnPlayerSleepEnded' on plugin 'Sleep'
    File: Sleep.lua Line: 173 attempt to index field '?' (a nil value):
      at NLua.Lua.ThrowExceptionFromError (Int32 oldTop) [0x00000] in <filename unknown>:0
      at NLua.Lua.CallFunction (System.Object function, System.Object[] args, System.Type[] returnTypes) [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
     
  3. Wulf

    Wulf Community Admin

  4. how to give to the group?
     
  5. Wulf

    Wulf Community Admin

    An example is on the Overview.
     
  6. The Plugin wont work for my server.
    I set the Permissions to the Player and Admin Group and it shows everytime "You can't go to sleep right now!"

    any solutions?
     
  7. Wulf

    Wulf Community Admin

    Your players or groups don't have the permission then. You can verify under oxide/data/oxide.groups.json and oxide.users.json.
     
  8. the permission is set.
    but it wont work
     

    Attached Files:

  9. Wulf

    Wulf Community Admin

    That isn't a valid player, players are stored by 64-bit Steam ID.
     
  10. but its the oxide.groups.json file.
     

    Attached Files:

  11. Wulf

    Wulf Community Admin

    Is your user trying to use it in that group? You don't have any inheritance setup for your admin/moderator groups, so unless you are in the player group, it won't work for you.
     
  12. ok i will take a look thanks in advance
     
  13. Wulf

    Wulf Community Admin

    Wulf updated Sleep with a new update entry:

    Fixed resource ID

     
  14. Why i have this ? :)

    Code:
    [Oxide] 2:56 PM [Error] Failed to load plugin Sleep (IOException: Sharing violation on path c:\games\108_61_114_134_28026\1218916\ruste\server\1218916\oxide\plugins\Sleep.lua)
    [Oxide] 2:56 PM [Debug]   at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in <filename unknown>:0
      at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share) [0x00000] in <filename unknown>:0
      at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
      at System.IO.File.OpenRead (System.String path) [0x00000] in <filename unknown>:0
      at System.IO.StreamReader..ctor (System.String path, System.Text.Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize) [0x00000] in <filename unknown>:0
      at System.IO.StreamReader..ctor (System.String path, System.Text.Encoding encoding) [0x00000] in <filename unknown>:0
      at (wrapper remoting-invoke-with-check) System.IO.StreamReader:.ctor (string,System.Text.Encoding)
      at System.IO.File.ReadAllText (System.String path, System.Text.Encoding encoding) [0x00000] in <filename unknown>:0
      at System.IO.File.ReadAllText (System.String path) [0x00000] in <filename unknown>:0
      at Oxide.Ext.Lua.Plugins.LuaPlugin.Load () [0x00000] in <filename unknown>:0
      at Oxide.Ext.Lua.Plugins.LuaPluginLoader.Load (System.String directory, System.String name) [0x00000] in <filename unknown>:0
      at Oxide.Core.OxideMod.LoadPlugin (System.String name) [0x00000] in <filename unknown>:0
    [Oxide] 2:56 PM [Info] Loaded plugin Sleep v0.1.2 by Wulf / Luke Spragg
     
  15. Wulf

    Wulf Community Admin

    Something was trying to use the file when you uploaded it, probably your FTP client. It's not an issue with the plugin.
     
  16. Oh ok i see now...
    Really thx and sorry :)

    Good job for ur plugin!
     
  17. This seems like an interesting plugin, but I'm not sure I understand the description of the plugin.

    If I install this plugin now without giving any players permission, will it then change sleep for everyone or will it not change sleep for players unless they have the permission?

    The question is:
    Does the plugin change anything for players even if they don't have the permission?
    ... or will it only change sleep for the players with permission, and the changes are faster health regeneration etc.)

    Thanks in advance.
     
  18. Wulf

    Wulf Community Admin

    You'd need to assign the permission to a group or users.
     
  19. Alright, thanks!
     
  20. I have this installed for the group "owner" and it seems to work fine, no errors, as the "owner" group I can /sleep and it will say "You're sleeping, (Press any key to wake up)" and when I wake up it says "You have awakened restored and rested" I get no errors on server load nor when someone sleeps. I have tried the default config and changing it to,

    Code:
    {
      "Messages": {
        "CantSleep": "You can't go to sleep right now!",
        "ChatHelp": "Use '/sleep' to go to sleep and rest",
        "Dirty": "You seem to be a bit dirty, go take a dip!",
        "Hungry": "You seem to be a bit hungry, eat something!",
        "Rested": "You have awaken restored and rested!",
        "Thirsty": "You seem to be a bit thirsty, drink something!"
      },
      "Settings": {
        "Command": "sleep",
        "Cure": "true",
        "CurePercent": 100,
        "Heal": "true",
        "HealPercent": 100,
        "Realism": "true",
        "RealismPercent": 100,
        "Restore": "true",
        "RestorePercent": 100,
        "UpdateRate": 1
      }
    }
    However it doesn't actually "cure" or "heal" or "realism" (whatever that is) or "restore" it doesn't increase my persons stats at all. When I awaken I am just as low on health, more hungry and thirsty... I can't figure this out, could you give me an idea of why this would show no signs of issues and yet not work? I am running the latest release (though earlier releases did the same thing) Thanks for any help!