From Official DarkRP Wiki
Revision as of 12:43, 13 July 2016 by DarkRPBot (talk | contribs) (Wikibot updated DarkRP documentation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Hook name canSleep(Player player, boolean force)
Whether someone is allowed to sleep.
Returns: boolean canSleep, string message
Realm: NewerServer.png
BBCode Link: [b][url=http://wiki.darkrp.com/index.php?title=Hooks/Server/canSleep]canSleep hook[/url][/b]


  1. player (Player)
  2. The player trying to sleep.

  3. force (boolean)
  4. Whether the sleep is being forced.

Return values

  1. canSleep (boolean)
  2. A yes or no as to whether the player can sleep.

  3. message (string)
  4. The message that is shown when they can't sleep.