From Official DarkRP Wiki
Jump to navigation Jump to search
Hook name playerBuyDoor(Player ply, Entity ent)
When a player purchases a door.
Returns: boolean allowed, string reason, boolean surpress
Realm: NewerServer.png
BBCode Link: [b][url=http://wiki.darkrp.com/index.php?title=Hooks/Server/playerBuyDoor]playerBuyDoor hook[/url][/b]


  1. ply (Player)
  2. The player who is to buy the door.

  3. ent (Entity)
  4. The door.

Return values

  1. allowed (boolean)
  2. Whether the player is allowed to buy the door.

  3. reason (string)
  4. The reason why a player is not allowed to buy the door, if applicable.

  5. surpress (boolean)
  6. Whether to show the reason in a notification to the player, return true here to surpress the message.