yeah same problem a while back, I think he said he is looking into it. I will too soon just not yet as I don’t need the script rn
I am planning on redoing this script from scratch so when I have the free time I will release a huge new update.
cant seem to get the script to work
using pma voice. added the appropriate code and anyone seems to be able to use it, even with ace perms
any news on this?
As long as you follow the instructions for pma that I listed in the post you should be fine.
Script Error: @pma-voice/client/main.lua:481: attempt to index a nil value (global ‘voiceData’)
Line 477 - 491
function GetPlayerRadioChannel(serverId)
if serverId ~= nil then
if voiceData.radio > 0 then
return voiceData.radio
end
end
end
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
There is no client.lua
Also, do I just put these lines at the very bottom of each file?
Yep, right at the bottom will work just fine.
First batch of code goes into pma-voice’s server/main.lua
And the other goes into rp-radio’s client.lua
So those go into two separate resources. Should be using the “rp radio adapted for pma-voice” found here: https://github.com/AvarianKnight/rp-radio
How is it going with the ESX support?
how did u fix it man
would you be able to make a version for ac_radio
i get this error message but idk why… i think i did everything good
My rp-radio/client.lua: client.lua (23.5 KB)
My pma-voice/server/main.lua: main.lua (4.7 KB)
Is it possible to change the radio script to a phone script?
I have the d phone and it already have a radio and i dont want to change from that one
I’m having issues trying to find the client.lua file in pma voice, has it been renamed because I can’t find it anywhere.
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.
How do i get the bot onto my discord??
Did you find a fix for this? I got this too.