papam77 Posted July 30, 2013 Share Posted July 30, 2013 Hello, I saw on some server plug.dj like server radio everything what was on Plug.dj was in game. But how can do it? playSound ("http://plug.dj/eag-tsr-gaming/") This link doesn't work because it hasn't end with media like .psl .mp3 .asl and etc... How can use Plug.dj room for radio? This room: http://plug.dj/eag-tsr-gaming/ Link to comment
Wei Posted July 30, 2013 Share Posted July 30, 2013 Note: The only supported audio formats are MP3, WAV, OGG, RIFF, MOD, XM, IT, S3M and PLS(e.g. Webstream). That means that you must have .Format at the and of the link Link to comment
papam77 Posted July 31, 2013 Author Share Posted July 31, 2013 Of course yes, but some server has Plug.dj room like radio. Link to comment
FatalTerror Posted July 31, 2013 Share Posted July 31, 2013 Of course yes, but some server has Plug.dj room like radio. Plug.DJ use Youtube as music provider. If you attemp to convert a Youtube video and play it with MTA then you can make your Plug.DJ radio. Link to comment
Baseplate Posted July 31, 2013 Share Posted July 31, 2013 Actually, you have to use playSound3D, not playSound. Link to comment
FatalTerror Posted July 31, 2013 Share Posted July 31, 2013 Actually, you have to use playSound3D, not playSound. It's the same thing. Link to comment
Baseplate Posted July 31, 2013 Share Posted July 31, 2013 Required Arguments for playSound: soundPath: The filepath to the sound file you want to play. (Sound file has to be predefined in the meta.xml file with tag.) Required Arguments for playSound3D soundPath: The filepath to the sound file you want to play. (Sound file has to be predefined in the meta.xml file with tag. And also can use url instead of filepath )x: A floating point number representing the X coordinate on the map. y: A floating point number representing the Y coordinate on the map. z: A floating point number representing the Z coordinate on the map. Link to comment
papam77 Posted July 31, 2013 Author Share Posted July 31, 2013 mtaserver.conf: EAG| |TSR| // Scripting Server 22012 25 1 22012 1 5 20 -- --> 1 1 0 85219 medium 1 server-id.keys logs/server.log logs/server_auth.log logs/db.log acl.xml logs/scripts.log 0 0 61 0 0 1 4 -- 24600 --> backups 1 3 "admin" startup="1" protected="0" /> client.lua: addEventHandler( 'onClientResourceStart', resourceRoot, function( ) local uSound = playSound3D( 'http://plug.dj/eag-tsr-gaming/', 359.14141, 173.59044, 1008.32, false ) setSoundMaxDistance( uSound, 1000 ) end ) Error: Download error: HTTP server file mismatch (EagleSystem) client.lua EAG|DeeJay: HTTP server file mismatch (EagleSystem) client.lua Link to comment
FatalTerror Posted July 31, 2013 Share Posted July 31, 2013 Required Arguments for playSound:soundPath: The filepath to the sound file you want to play. (Sound file has to be predefined in the meta.xml file with tag.) Required Arguments for playSound3D soundPath: The filepath to the sound file you want to play. (Sound file has to be predefined in the meta.xml file with tag. And also can use url instead of filepath )x: A floating point number representing the X coordinate on the map. y: A floating point number representing the Y coordinate on the map. z: A floating point number representing the Z coordinate on the map. The difference between these functions is only the coordinate on the map. It wont help him to create his Plug.DJ radio. It's not too hard to understand... Plug.DJ use Youtube as music provider. If you attemp to convert a Youtube video and play it with MTA then you can make your Plug.DJ radio. Link to comment
papam77 Posted July 31, 2013 Author Share Posted July 31, 2013 So how to do it? I don't understand now. Link to comment
FatalTerror Posted July 31, 2013 Share Posted July 31, 2013 So how to do it? I don't understand now. You use the Plug.DJ API to get the current song Youtube URL. After that, you convert this Youtube URL in a mp3 file and save it in your website folder. With LUA, you get this converted mp3 and you start it in your server. Now, to be more realist. Convert a Youtube Video is very slow. Convert a Youtube Video use much website ram Hope you understand. Link to comment
bandi94 Posted July 31, 2013 Share Posted July 31, 2013 Required Arguments for playSound:soundPath: The filepath to the sound file you want to play. (Sound file has to be predefined in the meta.xml file with tag.) Required Arguments for playSound3D soundPath: The filepath to the sound file you want to play. (Sound file has to be predefined in the meta.xml file with tag. And also can use url instead of filepath )x: A floating point number representing the X coordinate on the map. y: A floating point number representing the Y coordinate on the map. z: A floating point number representing the Z coordinate on the map. playSound also can play live stream URL's , my radio is using it .... Link to comment
papam77 Posted July 31, 2013 Author Share Posted July 31, 2013 And how can convert it to .mp3 ? Because it must be live from Plug.dj room Link to comment
bandi94 Posted July 31, 2013 Share Posted July 31, 2013 And how can convert it to .mp3 ? Because it must be live from Plug.dj room with php like this 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