ZuKi|R Posted December 17, 2017 Share Posted December 17, 2017 I am creating a radio system in line, the thing is that it is me who wants to make for example use a command / removed (link of the music) and that that link is added to the system of on-line radio little porfavor explain to me, this is my code not if it will be well client.lua function CambiarEstacionOnline(source,cmd,stream) setSoundVolume(stream, 0) stream = playSound(" "..stream.." ") end addCommandHandler("radio",CambiarEstacionOnline) Link to comment
Tails Posted December 18, 2017 Share Posted December 18, 2017 local stream local volume = 1 function CambiarEstacionOnline(cmd,url) if (url) then if (isElement(stream)) then stopSound(stream) end stream = playSound(url) setSoundVolume(stream, volume) end end addCommandHandler("radio",CambiarEstacionOnline) function muteStream() if (isElement(stream)) then volume = volume == 1 and 0 or 1 setSoundVolume(stream, volume) end end addCommandHandler("mute",muteStream) I hope this is what you were looking for. I have a really hard time understanding you. Link to comment
ZuKi|R Posted December 18, 2017 Author Share Posted December 18, 2017 16 hours ago, Tails said: Espero que esto sea lo que estabas buscando. Me cuesta mucho trabajo entenderlo. Hello, want say that I want exchange the estacion or the url of the musica and that to the whole servant you exchanged equally, for example by using a command ( /radio "Link of musica" ) and immediately to execute the command exchange to him the estacion of the musica for which ( sorry mi inglish ) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now