Defines the Breach item, which places a cw_breach charge on the entity the player is looking at when the PlayerCanBreachEntity hook allows it.

Summary

Methods

Lets the item be dropped; nothing else happens.
Attaches a cw_breach charge to the entity the player is looking at within 192 units.

Methods

ITEM:OnDrop(player, position)

shared gamemodes/cwhl2rp/schema/items/sh_breach.lua:54

Lets the item be dropped; nothing else happens.

Parameters

  • player
  • position

ITEM:OnUse(player, itemEntity)

shared gamemodes/cwhl2rp/schema/items/sh_breach.lua:20

Attaches a cw_breach charge to the entity the player is looking at within 192 units.

Keeps the item, with a notification, when there is no valid entity, it is too far, it already has a breach or the PlayerCanBreachEntity hook does not allow it.

Parameters

  • player
  • itemEntity

Defined in