Defines the Union Light item, which places a cw_unionlight entity where the player is looking and is sold to the
Elite Metropolice and Elite Overwatch Soldier classes.
The spot must be within 192 units. The light becomes the player's property and, when the item is used from the ground, takes the item entity's place and stays frozen if the item was.
Summary
Methods
OnDrop(player, position)shared
Called when the union light is dropped; does nothing, so it can be dropped freely.
Places a
cw_unionlight owned by the player where they are looking, within 192 units.Methods
ITEM:OnDrop(player, position)
shared gamemodes/cwhl2rp/plugins/unionlight/plugin/items/sh_union_light.lua:62Called when the union light is dropped; does nothing, so it can be dropped freely.
Parameters
- player
- position
ITEM:OnUse(player, itemEntity)
shared gamemodes/cwhl2rp/plugins/unionlight/plugin/items/sh_union_light.lua:24Places a cw_unionlight owned by the player where they are looking, within 192 units.
When used from the ground, the light takes the item entity's place and stays frozen if the item was.
Parameters
- player
- itemEntity
Returns
- Boolean
falsewhen the spot is too far away