Jump to content

System of music online


ZuKi|R

Recommended Posts

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
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
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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...