Exports
openRadioclientOpens the radio menu (respects Config.RequireItem).
toggleRadioclientOpens or closes the radio menu.
isOnRadioclientWhether the player is connected to a frequency right now.
Returns: boolean
isPoweredclientWhether the radio is turned on.
Returns: boolean
isTransmittingclientWhether the player is transmitting (PTT pressed) right now.
Returns: boolean
getFrequencyclientThe current frequency.
Returns: number|nil
getVolumeclientCurrent volume.
Returns: number (0-100)
isStreamerclientWhether streamer mode is active.
Returns: boolean
isAnonymousclientWhether anonymous mode is active.
Returns: boolean
getMembersclientLast received member list: { {id, name, talking, isSelf, anon}, ... }.
Returns: table
getStateclientFull state snapshot (power, connected, frequency, transmitting, volume, anonymous, streamer, animation, sound, members).
Returns: table
setPowerclientTurns the radio on or off.
| Param | Type | Description |
|---|---|---|
| on | boolean |
setFrequencyclientTurns the radio on if needed and joins the given frequency. Respects Config.RequireItem via the server.
| Param | Type | Description |
|---|---|---|
| freq | number |
-- Put the player on frequency 101.5 from another script
exports['biyei_radio']:setFrequency(101.5)leaveRadioclientLeaves the current frequency.
isPlayerOnRadioserverWhether the player is on any frequency.
| Param | Type | Description |
|---|---|---|
| src | number |
Returns: boolean
getPlayerFrequencyserverThe player's current frequency.
| Param | Type | Description |
|---|---|---|
| src | number |
Returns: number|nil
getPlayersInFrequencyserverMembers of a frequency.
| Param | Type | Description |
|---|---|---|
| freq | number |
Returns: table — { [src] = talking(boolean), ... }
setPlayerFrequencyserverForces a player onto a frequency (0 or nil kicks them out). Ignores the item requirement.
| Param | Type | Description |
|---|---|---|
| src | number | |
| freq | number |
Returns: boolean
-- Put every on-duty cop on frequency 500
RegisterNetEvent('cops:onDuty', function()
exports['biyei_radio']:setPlayerFrequency(source, 500)
end)removePlayerFromRadioserverRemoves a player from their frequency.
| Param | Type | Description |
|---|---|---|
| src | number |
getIntegrationserverReturns the auto-detected framework and inventory.
Returns: table — { framework, inventory }
local info = exports['biyei_radio']:getIntegration()
print(info.framework, info.inventory)