Hooks/Shared/canDoorRam

From Official DarkRP Wiki
Jump to: navigation, search
Hook
Hook name canDoorRam(Player ply, table trace, Entity ent)
Description:
Called when a player attempts to ram something. Use this to override ram behaviour or to disallow ramming.
Returns: boolean override
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.darkrp.com/index.php?title=Hooks/Shared/canDoorRam]canDoorRam hook[/url][/b]

Parameters

  1. ply (Player)
  2. The player using the door ram.

  3. trace (table)
  4. The trace containing information about the hit position and ram entity.

  5. ent (Entity)
  6. Short for the entity that is about to be hit by the door ram.

Return values

  1. override (boolean)
  2. Return true to override behaviour, false to disallow ramming and nil (or no value) to defer the decision.