Hooks
Hooks provided by the Radio module for managing radio communication.
Overview
The Radio module adds a radio chat channel for players, font configuration via radiofont, workshop models for radios, frequency channels for groups, and handheld radio items.. It provides comprehensive hook integration for customizing managing radio communication and extending functionality.
CanHearRadio
đ Purpose
Called to determine if a listener can hear a radio transmission.
â° When Called
During radio chat range checking.
âī¸ Parameters
| Parameter | Type | Description |
|---|---|---|
listener |
Player | The player trying to hear the transmission |
speaker |
Player | The player transmitting |
freq |
string | The radio frequency |
channel |
number | The radio channel |
âŠī¸ Returns
boolean - Return false to prevent hearing
đ Realm
Shared
Overview
The Radio module adds a radio chat channel for players, font configuration via radiofont, workshop models for radios, frequency channels for groups, and handheld radio items.. It provides comprehensive hook integration for customizing managing radio communication and extending functionality.
CanUseRadio
đ Purpose
Called to determine if a player can use their radio.
â° When Called
Before a player starts transmitting on radio.
âī¸ Parameters
| Parameter | Type | Description |
|---|---|---|
speaker |
Player | The player attempting to use radio |
freq |
string | The radio frequency |
channel |
number | The radio channel |
âŠī¸ Returns
boolean - Return false to prevent radio use
đ Realm
Shared
Overview
The Radio module adds a radio chat channel for players, font configuration via radiofont, workshop models for radios, frequency channels for groups, and handheld radio items.. It provides comprehensive hook integration for customizing managing radio communication and extending functionality.
OnRadioDisabled
đ Purpose
Called when a radio is disabled/turned off.
â° When Called
After the radio's enabled state is set to false.
âī¸ Parameters
| Parameter | Type | Description |
|---|---|---|
client |
Player | The player who disabled the radio |
item |
Item | The radio item that was disabled |
âŠī¸ Returns
nil
đ Realm
Server
Overview
The Radio module adds a radio chat channel for players, font configuration via radiofont, workshop models for radios, frequency channels for groups, and handheld radio items.. It provides comprehensive hook integration for customizing managing radio communication and extending functionality.
OnRadioEnabled
đ Purpose
Called when a radio is enabled/turned on.
â° When Called
After the radio's enabled state is set to true.
âī¸ Parameters
| Parameter | Type | Description |
|---|---|---|
client |
Player | The player who enabled the radio |
item |
Item | The radio item that was enabled |
âŠī¸ Returns
nil
đ Realm
Server
Overview
The Radio module adds a radio chat channel for players, font configuration via radiofont, workshop models for radios, frequency channels for groups, and handheld radio items.. It provides comprehensive hook integration for customizing managing radio communication and extending functionality.
OnRadioFrequencyChanged
đ Purpose
Called when a radio's frequency is changed.
â° When Called
After the frequency is updated on the radio item.
âī¸ Parameters
| Parameter | Type | Description |
|---|---|---|
client |
Player | The player who changed the frequency |
item |
Item | The radio item |
freq |
string | The new frequency |
âŠī¸ Returns
nil
đ Realm
Server
Overview
The Radio module adds a radio chat channel for players, font configuration via radiofont, workshop models for radios, frequency channels for groups, and handheld radio items.. It provides comprehensive hook integration for customizing managing radio communication and extending functionality.
OnRadioSabotaged
đ Purpose
Called when a radio is sabotaged/broken.
â° When Called
After the radio is broken and removed.
âī¸ Parameters
| Parameter | Type | Description |
|---|---|---|
client |
Player | The player who sabotaged the radio |
item |
Item | The radio item that was sabotaged |
âŠī¸ Returns
nil
đ Realm
Server
Overview
The Radio module adds a radio chat channel for players, font configuration via radiofont, workshop models for radios, frequency channels for groups, and handheld radio items.. It provides comprehensive hook integration for customizing managing radio communication and extending functionality.
PlayerFinishRadio
đ Purpose
Called when a player finishes using radio.
â° When Called
After radio transmission ends.
âī¸ Parameters
| Parameter | Type | Description |
|---|---|---|
listener |
Player | The player who finished radio use |
freq |
string | The frequency that was used |
channel |
number | The channel that was used |
âŠī¸ Returns
nil
đ Realm
Shared
Overview
The Radio module adds a radio chat channel for players, font configuration via radiofont, workshop models for radios, frequency channels for groups, and handheld radio items.. It provides comprehensive hook integration for customizing managing radio communication and extending functionality.
PlayerStartRadio
đ Purpose
Called when a player starts using radio.
â° When Called
When a player begins transmitting on radio.
âī¸ Parameters
| Parameter | Type | Description |
|---|---|---|
speaker |
Player | The player starting radio transmission |
freq |
string | The frequency being used |
channel |
number | The channel being used |
âŠī¸ Returns
nil
đ Realm
Shared
Overview
The Radio module adds a radio chat channel for players, font configuration via radiofont, workshop models for radios, frequency channels for groups, and handheld radio items.. It provides comprehensive hook integration for customizing managing radio communication and extending functionality.
ShouldRadioBeep
đ Purpose
Called to determine if radio beep sounds should play.
â° When Called
When checking if radio end sounds should play.
âī¸ Parameters
| Parameter | Type | Description |
|---|---|---|
listener |
Player | The player who would hear the beep |
âŠī¸ Returns
boolean - Return false to prevent beep
đ Realm
Shared