Radio entity
Entity defined in entities/entities/cw_radio
Shared definition of the cw_radio entity (print name Radio), with its off state data table variable and the
ENT:GetFrequency and ENT:IsOff getters.
Summary
Methods
Methods
Draws the radio with a green status light, or a red one while it is off.
Plays a glass impact effect and impact sound at the radio.
Returns the frequency the radio is tuned to.
Returns
- String The frequency, or an empty string when none is set
Returns the item the radio was placed from.
Returns
- Item The item set with
ENT:SetItemTable, ornil
ENT:HUDPaintTargetID(x, y, alpha)
client gamemodes/cwhl2rp/schema/entities/entities/cw_radio/cl_init.lua:9Draws the radio name and its frequency (or a no frequency note) as the target ID.
Parameters
- x
- y
- alpha
Sets up the citizen radio model, physics and 25 health.
Returns whether the radio is off.
Returns
- Boolean Whether the radio is off
Subtracts the damage from the radio's health and destroys it when it reaches 0.
Parameters
- damageInfo
Sets the frequency the radio is tuned to, networked to every client.
Parameters
- frequency String The frequency, such as
101.1
Sets the item the radio was placed from.
Parameters
- itemTable Item The stationary radio item
Turns the radio off or on.
Parameters
- off Boolean Whether the radio is off
Declares the off state data table variable.
Turns the radio on when it is off and off when it is on.
Always transmits the radio to every client.