Hooks/Server/canGoAFK

From Official DarkRP Wiki
Jump to: navigation, search
Hook
Hook name canGoAFK(Player ply, boolean afk)
Description:
When a player can MANUALLY start being AFK by entering the chat command. Note: this hook does NOT get called when a player is set to AFK automatically! That hook will not be added, because I don't want asshole server owners to make AFK rules not apply to admins.
Returns: boolean canGoAFK
Realm: NewerServer.png
BBCode Link: [b][url=http://wiki.darkrp.com/index.php?title=Hooks/Server/canGoAFK]canGoAFK hook[/url][/b]

Parameters

  1. ply (Player)
  2. The player.

  3. afk (boolean)
  4. True when the player starts being AFK, false when the player stops being AFK.

Return values

  1. canGoAFK (boolean)
  2. Whether the player is allowed to go AFK