[Release] Internet Radio / Audio File Player

This is something I made quickly and didn’t test fully, but it should work.

/radio URL - Plays the radio stream / online audio file
/volume 0.0-1.0 - Changes the volume of the playback
/stopradio - Stops the playback

Download

NOTE: This won’t work with some audio formats as the embedded “browser” can’t play them. Nothing I can do about it, sorry.

18 Likes

Thxxxxxxxxxxx, <3333

please i try and you do. Can you tell me hod do

Is there any way to stream an audio clip to the server…
Im working on a purge server at the moment and i need to stream a siren.

  • so players know that the purge has started.

Thanks in advance!

So it plays only for the player who activated this command?

Hello where is enter the url in the radio please

does this script play radio/url you put ingame? such as /radio (my youtube URL)??

It’s posible to disable the /radio url to make /radio and play my radio only ?

it’s not working for me, can you give me an exemple of radio, i tryed some urls but it’s not working on my server

1 Like

same isnt working for me i tried youtube urls, mp3 urls

for youtube Videos i’m not sure that it should work but for normal feed and i dont get why it’s doesnt, itested ACC MP3 format and nothing happened (sorry for my english)

if any one can give us a working exemple please ?

1 Like

@pongo1231 when this plugin support mp3 and pls extension too. I hope as soon as possible

thank you in advance for your work

[C]: in function ‘error’
citizen:/scripting/lua/scheduler.lua:41: in field ‘CreateThreadNow’
citizen:/scripting/lua/scheduler.lua:174: in function citizen:/scripting/lua/scheduler.lua:138
Error running system event handling function for resource radio: citizen:/scripting/lua/scheduler.lua:41: Failed to execute thread: server.lua:33: attempt to call a nil value (method ‘Split’)
stack traceback:
server.lua:33: in function ‘stringSplit’
server.lua:5: in upvalue ‘handler’
citizen:/scripting/lua/scheduler.lua:175: in function citizen:/scripting/lua/scheduler.lua:174
stack traceback:
[C]: in function ‘error’
citizen:/scripting/lua/scheduler.lua:41: in field ‘CreateThreadNow’
citizen:/scripting/lua/scheduler.lua:174: in function citizen:/scripting/lua/scheduler.lua:138
Sending heartbeat to live-internal.fivem.net:30110
Error running system event handling function for resource radio: citizen:/scripting/lua/scheduler.lua:41: Failed to execute thread: server.lua:33: attempt to call a nil value (method ‘Split’)
stack traceback:
server.lua:33: in function ‘stringSplit’
server.lua:5: in upvalue ‘handler’
citizen:/scripting/lua/scheduler.lua:175: in function citizen:/scripting/lua/scheduler.lua:174
stack traceback:
[C]: in function ‘error’
citizen:/scripting/lua/scheduler.lua:41: in field ‘CreateThreadNow’
citizen:/scripting/lua/scheduler.lua:174: in function citizen:/scripting/lua/scheduler.lua:138

where is the error and I fix the error
I would like to hear http://stream05.iloveradio.de/iloveradio2.mp3

It uses the old stringSplit method.
Replace:

function stringSplit(self, delimiter)
local a = self:Split(delimiter)
local t = {}

for i = 0, #a - 1 do
table.insert(t, a[i])
end

return t
end

Blockquote

With:

function stringSplit(inputstr, sep)
if sep == nil then
sep = “%s”
end
local t={} ; i=1
for str in string.gmatch(inputstr, “([^”…sep…"]+)") do
t[i] = str
i = i + 1
end
return t
end

1 Like

the script does not work there is no sound
to the proof
I make / radio http://stream05.iloveradio.de/iloveradio2.mp3
there is no sound … & no mistake

Same for me tho. It’s probably because it’s a really old version.

It properly doesnt play mp3 format - try with .ogg

no ogg error i sorry