pro-mos Posted February 19, 2016 Share Posted February 19, 2016 On some servers map music download takes so long, while other servers like FFS and such, the same map music loads in no time... how is that possible? is the host is faster? or they're just using another method for music, like streaming the music for players instead of making them downloading it? i want some answers please, how can improve the music download? -------------------------- UPDATE: i found that in MTA/mods/resources i found no maps i played on FFS was there! that means that FFS using the method to stream the map music and other map scripts.. how to achieve that? Link to comment
tosfera Posted February 19, 2016 Share Posted February 19, 2016 You can always create yourself a custom map manager which spawns the objects for maps by using a script ( using a loop and createObject ) to take out map files. Same can be done for music, you can either stream it with playSound or download them in the background. I would go for streaming it though. Link to comment
pro-mos Posted February 19, 2016 Author Share Posted February 19, 2016 You can always create yourself a custom map manager which spawns the objects for maps by using a script ( using a loop and createObject ) to take out map files.Same can be done for music, you can either stream it with playSound or download them in the background. I would go for streaming it though. i got the first part, but how to stream the music without making the client downloading it? concider that there is so many maps, i cant take out every music file and upload it to a streaming service Link to comment
SpecT Posted February 19, 2016 Share Posted February 19, 2016 You could make a custom script loader. And when the function playSound is used it will stream the sound from the HTTP server. If the server has fastdl it would be much easier but if it doesn't then you could make it as the example below: Example: http://localhost:22005/mapName/music.mp3 Link to comment
tosfera Posted February 19, 2016 Share Posted February 19, 2016 You could make a custom script loader. And when the function playSound is used it will stream the sound from the HTTP server.If the server has fastdl it would be much easier but if it doesn't then you could make it as the example below: Example: http://localhost:22005/mapName/music.mp3 to go a bit more into detail, playing a song is the same for files as in links. Make sure you can listen to the mp3 on the link and then replace the songname in playSound with the link. Something like this: local sound = playSound ( "http://example.com/song.mp3" ); Link to comment
pro-mos Posted February 19, 2016 Author Share Posted February 19, 2016 You could make a custom script loader. And when the function playSound is used it will stream the sound from the HTTP server.If the server has fastdl it would be much easier but if it doesn't then you could make it as the example below: Example: http://localhost:22005/mapName/music.mp3 to go a bit more into detail, playing a song is the same for files as in links. Make sure you can listen to the mp3 on the link and then replace the songname in playSound with the link. Something like this: local sound = playSound ( "http://example.com/song.mp3" ); thanks man, got yea 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