voiceSystem.lua

A voice system integration layer for CS_RADIO that supports PMA-Voice and SaltyChat. Handles radio joining, volume control, talking state, and radio change events.

Supported Voice Systems

  • PMA-Voice – Lightweight radio & proximity voice

  • SaltyChat – Teamspeak-based VOIP with extended features

Functions

Client-Side

voiceSystem.joinRadio(channel) Joins or leaves a radio channel.

  • PMA: setRadioChannel(channel)

  • Salty: SetRadioChannel(channel, true) (0 leaves the channel)


voiceSystem.setRadioVolume(vol) Sets the player’s radio volume. Sends a success notification.

  • PMA: setRadioVolume(tonumber(vol))

  • Salty: SetRadioVolume(vol / 100) (clamped between 0.0 and 1.6)


Events

Radio Change Event

Triggered when the player changes radio channel.

  • PMA:

    • voiceSystem.useClientSideEvent = false

    • Event: "pma-voice:setPlayerRadio"

  • Salty:

    • voiceSystem.useClientSideEvent = true

    • Event: "SaltyChat_RadioChannelChanged"

Player Talking Event

Triggered when the player starts/stops transmitting.

  • PMA: Event: "pma-voice:radioActive"

  • Salty: Event: "cs_radio:SaltyChat_RadioTrafficStateChanged"

SaltyChat Fix

Redirects the SaltyChat event to CS_RADIO for compatibility.

RegisterNetEvent("SaltyChat_RadioTrafficStateChanged", function(receive, transmit)
    TriggerEvent("cs_radio:SaltyChat_RadioTrafficStateChanged", transmit)
end)

Last updated

Was this helpful?