For those who cannot get this to work with the newest version of pma-voice, here is a guide:
Instead of going to server/server.lua or client/client.lua (which doesn’t exist anymore) we will go here and insert the following to the bottom of the script:
pma-voice/server/main.lua
function getPlayersInRadioChannels(...)
local channels = { ... }
local players = {}
for i = 1, #channels do
local channel = tonumber(channels[i])
if channel ~= nil then
if radioData[channel] ~= nil then
players[#players + 1] = radioData[channel]
end
end
end
return players
end
exports('GetPlayersInRadioChannels', getPlayersInRadioChannels)
And we use rp-radio’s client.lua to get the current frequency:
rp-radio/client.lua
function getCurrentFrequency(serverId)
if serverId ~= nil then
if radioConfig.Frequency.Current > 0 then
return radioConfig.Frequency.Current
end
end
end
exports("GetPlayerRadioChannel", getCurrentFrequency)
And that’s it!
If you are getting this error as well:
Just change the folder in radioPanicButton/html from sound to sounds
awesome script! Could you make this to work with this : [ESX] ESX-Radio Nopixel Inspired . I feel like most of servers are using this radio over the rp-radio.