acscripts / ac_radio Goto Github PK
View Code? Open in Web Editor NEWSimple and framework-standalone radio UI for pma-voice.
Home Page: https://forum.cfx.re/t/4846739
License: GNU General Public License v3.0
Simple and framework-standalone radio UI for pma-voice.
Home Page: https://forum.cfx.re/t/4846739
License: GNU General Public License v3.0
I'm getting this error. any clue?
I have the latest pma and your ac
[ script:pma-voice] SCRIPT ERROR: citizen:/scripting/lua/scheduler.lua:1016: bad argument #1 to 'format' (number expected, got nil)
[ script:pma-voice] > handleStateBagInitilization (@pma-voice/server/main.lua:16)
[ script:pma-voice] > defaultTable (@pma-voice/server/main.lua:6)
[ script:pma-voice] > ref (@pma-voice/server/module/radio.lua:91)
[ script:pma-voice] > onLoaded (@ac_radio/resource/server/players.lua:10)
[ script:pma-voice] > handler (@ac_radio/resource/server/players.lua:27)
[ script:pma-voice] > CreatePlayer (@qb-core/server/player.lua:441)
[ script:pma-voice] > CheckPlayerData (@qb-core/server/player.lua:138)
[ script:pma-voice] > ref (@qb-core/server/player.lua:24)
[ script:pma-voice] > rawExecute (@oxmysql/dist/build.js:21878)
[ script:pma-voice] > processTicksAndRejections (node:internal/process/task_queues:96)
[ script:ac_radio] SCRIPT ERROR: citizen:/scripting/lua/scheduler.lua:841: An error occurred while calling export setPlayerRadio of resource pma-voice
[ script:ac_radio] nil
Due to the Left clicking, You would trigger punching when using the radio.
1.0.8
When you have the radio item in ox_inventory and qb-core it gives an error and doesnt do anything
Add, if you’re ever further away from the people on the radio, the radio starts to rustle and stop until at the end, when someone speaks, it’s just a rustle.
The second option is to add batteries to the radio of course not for groups with factions like: police, medicine
I think it’s a cool addition to RolePlay
latest (1.0.8)
es_extended
I need help abt Restrict Radio Channels coz its not working on my side.
Config (Restrict Side)
-- Number of available frequencies.
maximumFrequencies = 1000,
-- How much the frequency value can change per step.
frequencyStep = 0.01,
-- Channel frequency restrictions.
restrictedChannels = {
[1] = 'police',
[2] = {
ambulance = 0
},
[3] = {
mechanic = 0
},
[4] = {
police = 0,
ambulance = 0
},
[5] = {
police = 0,
mechanic = 0
},
},
Direct Vid: https://streamable.com/ztojnh
Nothing, just fix this please. Thank you
1.0.7 (newest)
whenever i press talk key the FPS drop from 60 to 15 fps for a second, it hapens to everybody on the server, i use esx legacy with overextended and pma voice
v1.1.0
ox_core
When a player uses the volume up or volume down buttons, it does not increase or decrease the overall volume of the radio. When using the volume up button it will set the volume to ten as opposed to adding then to the current volume.
resource > client > client.lua
RegisterNUICallback('volume_up', function()
local volume = volumeState or voice:getRadioVolume()
if volumeState then
volumeState = nil
notify('inform', locale('volume_unmute'), 1000)
end
if volume <= 90 then
volume += 10
voice:setRadioVolume(volume)
notify('inform', locale('volume_up', math.floor(volume)), 1500, 'volume-high')
else
notify('error', locale('volume_max'), 2500)
end
end)
RegisterNUICallback('volume_down', function()
local volume = volumeState or voice:getRadioVolume()
if volumeState then
volumeState = nil
notify('inform', locale('volume_unmute'), 1000)
end
if volume >= 20 then
volume -= 10
voice:setRadioVolume(volume)
notify('inform', locale('volume_down', math.floor(volume)), 1500, 'volume-low')
else
notify('error', locale('volume_min'), 2500)
end
end)
The
local volume
variable is being created within the function as opposed to being global meaning that it essentially resets every function call.
resource > client > client.lua
local volume = volumeState or voice:getRadioVolume()
RegisterNUICallback('volume_up', function()
if volumeState then
volumeState = nil
notify('inform', locale('volume_unmute'), 1000)
end
if volume <= 90 then
volume += 10
voice:setRadioVolume(volume)
notify('inform', locale('volume_up', math.floor(volume)), 1500, 'volume-high')
else
notify('error', locale('volume_max'), 2500)
end
end)
RegisterNUICallback('volume_down', function()
if volumeState then
volumeState = nil
notify('inform', locale('volume_unmute'), 1000)
end
if volume >= 20 then
volume -= 10
voice:setRadioVolume(volume)
notify('inform', locale('volume_down', math.floor(volume)), 1500, 'volume-low')
else
notify('error', locale('volume_min'), 2500)
end
end)
Instead of creating the
local volume
variable within the function, it is instead creating it outside the function making its value not coupled on the function's existence.
config.lua
ac = {
-- Language for notifications and UI
locale = 'en',
-- Whether to check for newer resource version and notify in server console.
versionCheck = true,
-- Whether to use custom notification function.
useCustomNotify = true,
-- Whether to use command for opening the radio UI.
useCommand = true,
-- Default keybind for the '/radio' command.
commandKey = 'F7',
-- Whether to disconnect from radio when there is no radio item in player's inventory.
noRadioDisconnect = true,
-- Number of available frequencies.
maximumFrequencies = 5000,
-- How much the frequency value can change per step.
frequencyStep = 0.01,
-- Channel frequency restrictions.
restrictedChannels = {
},
-- ! The following options will override the pma-voice convars.
-- Whether to enable radio submix (voice sounds like on real radio).
radioEffect = true,
-- Whether to enable animation while talking on radio.
radioAnimation = true,
-- Default keybind for talking on radio.
radioKey = 'COMMA',
}
setr voice_useNativeAudio true
setr voice_useSendingRangeOnly true
setr voice_enableRadios 1
setr voice_enableRadioAnim 1
pma-voice issue
The server state is correct so you're not on the radio for other players - they can't hear you and you can't hear them.
There is currently a pending PR in pma-voice that fixes this issue. Until it gets hopefully merged, you can apply the changes manually.
Download the latest pma-voice release to fix this issue.
ac_radio issue
This could happen after restarting the resource while on server.
Player jobs gets updated after selecting a character and/or changing them (eg. setting a new job).
This will be fixed in the coming days.
Download the latest ac_radio release to fix this issue.
Hey, nice looking radio UI!
restrictedChannels = {
[1] = 'police',
}
I can still join this radio 1Mhz while working not in police. Did I made something wrong?
v1.0.2
es_extended
When i open the radio i can't move my mouse and its stuck in the middle of the screen
i understand you can do /radio will you get it to work on use. keep up the great work.
to jam radio signal of specific player job with specific distance
so this way radio connection of players in the specified area will be lost, but only players on the specific area other players who connected with different area wont lost their conection.
OR
If players move away from their HQ, the signal gradually weakens. After reaching a specific distance, they lose signal on their radios, preventing communication with other players on the same frequency. However, players equipped with an item like an 'antenna' can extend their signal range and communicate with others on that radio frequency. Upon signal loss, include a notification or sound effect to alert players. Additionally, consider implementing durability for the 'antenna' to add an element of resource management.
I apologize for my limited English. If you need more details or explanations about this request, I am happy to provide them.
I'm suggesting this feature for FiveM servers to make the game more realistic and strategic. By simulating radio signal limitations, we can introduce challenges that promote teamwork and planning among players. This applies not only to city RP servers but also to any server with a simulation RP theme.
v1.2.0
es_extended
When I switch the windows from the FiveM window to another window and then I get back to the FiveM one, the radio UI shows up without having set any keybind, is that normal or it's a bug? Am I the only one having that bug?
Thanks
(When ac_radio and pma-voice installed in server, of course)
v1.0.2
ox_core
I installed ac-radio, the script works without problems except for one detail, I changed the basic configuration key (ALT) to Caps Lock. the problem is that not all players see their configuration change for some it works without problem, for others on the contrary it stays on the initial key and for others it goes to another key . Any idea how to fix this, I've already tried deleting the cache and the server cache
i'm on standalone no framework
Mabye add that you need an item to use the radio and if you not have the radio item you cant open your radio
For more roleplay
Can you do something like rp-radio does for standalone for restrictedChannels?
https://github.com/FrazzIe/rp-radio
GivePlayerAccessToFrequency
RemovePlayerAccessToFrequency
GivePlayerAccessToFrequencies
Nothing really out there that does it like this.
Can there be able to use 2 or more radios at a time. Like when you are at a scene, and wants to hear the ems radio and fire for command.
I think it's needed at a big scene, or internal coms and main at the same time
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.