Hooks/Server/canDarkRPUse

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

Parameters[edit]

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

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

  5. caller (Player)
  6. The entity that directly triggered the input.

Return values[edit]

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

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