Does this work for anyone?
@pongo1231 Hey Dude, are you activ again? Is there an opinion to fix that fantastic script that it works again, please?
ERROR:
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
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
Super thx. Do you ve a example URL plus?
http://62.210.135.86:8000/mp3
That should work. It works on the Internet radio I made for my server, which appears to be similar to this resource.
Thx SaltyGrandpa…!..!..!
will check write then back
Oh well yeh it does not work with that stream or either of my ogg format streams
What about it? This script does not work
Clearly -
…
Yes the script does not work. Will not play any format of stream
I got it to play a single radio station by adding the url directly into the server.lua
sound = ‘http://162.210.196.142:23015/stream’
and then changed the command /radio to skip the url check, not sure how to get it to work the way intended…
@pongo1231 just trumbled over this topic.
Have you ever looked in to stream audio, in a specific area of the map (with distance drop in volume)?
I’m currently looking into adding music athmosphere in Bahamamas, for example.
Could i see a snipit of your code i cant seem to get this to work?
client
RegisterNetEvent("playradio")
AddEventHandler("playradio", function(url)
SendNUIMessage({
playradio = true,
sound = 'http://198.7.58.248:15402/stream'
})
end)
RegisterNetEvent("changevolume")
AddEventHandler("changevolume", function(volume)
SendNUIMessage({
changevolume = true,
volume = tonumber(volume)
})
end)
RegisterNetEvent("vol")
AddEventHandler("changevolume", function(volume)
SendNUIMessage({
changevolume = true,
volume = 0.1
})
end)
RegisterNetEvent("stopradio")
AddEventHandler("stopradio", function()
SendNUIMessage({
stopradio = true
})
end)
server
RegisterCommand("radio", function(source)
TriggerClientEvent("playradio", source)
TriggerClientEvent("chatMessage", source, "^1[Radio] ^2Now Playing Radio One")
end)
RegisterCommand("stopradio", function(source, args)
TriggerClientEvent("stopradio", source)
end)
Thanks
I tried this but volume doesn’t change?