Hooks/Server/canSleep

From Official DarkRP Wiki
Jump to navigation Jump to search
Hook
Hook name canSleep(Player player, boolean force)
Description:
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]

Parameters

  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.