Hooks/Server/canDarkRPUse

From Official DarkRP Wiki
Jump to: navigation, search
Hook
Hook name canDarkRPUse(Player ply, Entity entity)
Description:
When a player uses an entity.
Returns: boolean canUse, string reason
Realm: NewerServer.png
BBCode Link: [b][url=http://wiki.darkrp.com/index.php?title=Hooks/Server/canDarkRPUse]canDarkRPUse hook[/url][/b]

Parameters

  1. ply (Player)
  2. The player who tries to use the entity.

  3. entity (Entity)
  4. The actual entity the player attempts to use.

Return values

  1. canUse (boolean)
  2. Whether the entity should be used or not.

  3. reason (string)
  4. Why the entity cannot be used.