From DarkRP
Jump to navigation Jump to search
Hook name playerAFKDemoted(Player ply)
When a player is demoted for being AFK.
Returns: boolean shouldDemote, number team, boolean suppressMessage, string demoteMessage
Realm: NewerServer.png
BBCode Link: [b][url=http://wiki.darkrp.com/index.php?title=Hooks/Server/playerAFKDemoted]playerAFKDemoted hook[/url][/b]


  1. ply (Player)
  2. The player being demoted.

Return values[edit]

  1. shouldDemote (boolean)
  2. Prevent the player from being actually demoted.

  3. team (number)
  4. The team the player is to be demoted to (shouldDemote must be true.)

  5. suppressMessage (boolean)
  6. Suppress the demote message.

  7. demoteMessage (string)
  8. Replacement of the demote message text.