For the complete documentation index, see llms.txt. This page is also available as Markdown.

Exports

Client exports and events for integrations.

Everything below is part of the public surface — safe to call from another resource. All client exports live on the 0r-radio resource.

Client exports

isRadioOpen

Returns whether the radio UI is currently open.

local open = exports['0r-radio']:isRadioOpen()

Returns

Type
Description

boolean

Radio UI visibility state


hasRadio

Returns whether the player currently has a radio item.

local has = exports['0r-radio']:hasRadio()

Returns

Type
Description

boolean

Whether the player has a radio item


isInJammerRange

Returns whether the player is inside an active jammer's range.

Returns

Type
Description

boolean

Jammer range state


getChannel

Returns the player's current radio channel.

Returns

Type
Description

number

Current channel ID, or 0 if not connected


toggleRadio

Opens or closes the radio UI.


canJoinChannel

Checks whether the player can join a channel without actually joining. Uses the same gate as joinChannel — frequency bounds, jammer state, job/duty rules, and password for custom channels. Use this when you want to know why someone cannot join without firing a notification.

Parameters

Name
Type
Description

channel

number

Target channel / frequency ID

password

string?

Optional channel password

Returns

Type
Description

boolean

Whether the player can join

string?

Failure reason when the first value is false


joinChannel

Joins a radio channel. Returns true on success; on failure returns false and shows a notification.

Parameters

Name
Type
Description

channel

number

Target channel / frequency ID

password

string?

Optional channel password

Returns

Type
Description

boolean

Whether the join succeeded


leaveChannel

Leaves the current radio channel.


createChannel

Creates a custom channel. The frequency must be above frequency.publicChannels in config.

Parameters

Name
Type
Description

channel

number

Custom channel ID

password

string

Channel password

Returns

Type
Description

boolean

Whether the channel was created


Useable events

Client

Event
Purpose

0r-radio:client:useRadio

Open radio UI (from usable item)

Last updated