Defines the Stationary Radio item, which is used to place a cw_radio entity owned by the player where they are looking, within 192 units.

Summary

Methods

Lets the item be dropped; nothing else happens.
Places a cw_radio entity owned by the player where they are looking, within 192 units.

Methods

ITEM:OnDrop(player, position)

shared gamemodes/cwhl2rp/schema/items/sh_stationary_radio.lua:58

Lets the item be dropped; nothing else happens.

Parameters

  • player
  • position

ITEM:OnUse(player, itemEntity)

shared gamemodes/cwhl2rp/schema/items/sh_stationary_radio.lua:19

Places a cw_radio entity owned by the player where they are looking, within 192 units.

Used from the ground, the radio takes the item entity's position and angles and stays frozen if it was; otherwise it is placed flush to the ground. Keeps the item, with a notification, when the spot is too far.

Parameters

  • player
  • itemEntity

Defined in