Exports
Client Side Exports
Radio
isRadioOpen
Check whether the radio UI is currently open.
exports['prism_radio']:isRadioOpen()Returns
boolean—trueif the radio UI is open, otherwisefalse
isConnected
Check whether the player is currently connected to a radio frequency.
exports['prism_radio']:isConnected()Returns
boolean—trueif connected to a frequency, otherwisefalse
getCurrentFrequency
Get the current radio frequency the player is connected to.
exports['prism_radio']:getCurrentFrequency()Returns
number | nil— The current frequency, ornilif not connected
disconnectRadio
Disconnect from the current radio channel if connected.
exports['prism_radio']:disconnectRadio()connectRadio
Connect to a radio channel, with optional password and nickname override.
exports['prism_radio']:connectRadio(frequency, password, name)Parameters
frequency(number | string) — The channel to connect to (can be a number or string)password(string | nil) — Password for the channel if it is protected (you must handle collecting this from the user, e.g. via anox_libinput)name(string | nil) — Nickname to connect with; ifnil, the character name is used as usual
openRadio
Open the radio UI.
exports['prism_radio']:openRadio()closeRadio
Close the radio UI.
exports['prism_radio']:closeRadio()Automatically re-enables the radio if it was previously disabled.
toggleRadio
Toggle the radio UI state.
exports['prism_radio']:toggleRadio()setRadioEnabled
Enable or disable the radio entirely.
exports['prism_radio']:setRadioEnabled(enabled)Parameters
enabled(boolean) — Whether the radio should be enabled
If set to
falsewhile the radio is open, it will be closed automatically.
Radio & HUD
getHudMembers
Get the list of members currently displayed in the radio HUD.
exports['prism_radio']:getHudMembers()Returns
{ name: string; isSpeaking: boolean }[]— An array containing the current HUD members
isHudVisible
Check whether the radio HUD is currently visible.
exports['prism_radio']:isHudVisible()Returns
boolean—trueif the HUD is visible, otherwisefalse
getRadioNickname
Get current nickname of player set on radio
exports['prism_radio']:getRadioNickname()Returns
string?—stringif player is on radio & has a custom nickname, otherwisenil
Events & State
Client Events
prism_radio:nicknameUpdated
Triggered when the local player’s radio nickname changes.
AddEventHandler('prism_radio:nicknameUpdated', function(radioNickname)
-- radioNickname: string | nil
end)Parameters
radioNickname(string | nil) — The new nickname if the player has set one, otherwisenil
Server Events
prism_radio:nicknameUpdated
Triggered when a player’s radio nickname changes on the server.
AddEventHandler('prism_radio:nicknameUpdated', function(playerId, radioNickname)
-- playerId: number
-- radioNickname: string | nil
end)Parameters
playerId(number) — The player’s server IDradioNickname(string | nil) — The new nickname if the player has set one, otherwisenil
State Bags
LocalPlayer.state.radioNickname
Holds the local player’s current radio nickname.
local nickname = LocalPlayer.state.radioNickname -- string | nilType
string | nil—stringif the player has a custom nickname, otherwisenil
Player(serverId).state.radioNickname
Holds another player’s current radio nickname.
local nickname = Player(serverId).state.radioNickname -- string | nilType
string | nil—stringif the player has a custom nickname, otherwisenil