From DarkRP
Jump to navigation Jump to search
Hook name canGoAFK(Player ply, boolean afk)
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]


  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[edit]

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