Hooks/Server/playerAFKDemoted

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

Parameters

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

Return values

  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.