PDA

View Full Version : Not Sure If This Is Possible, But .mp3 List?


NinjaChicken
08/07/2018, 05:17 AM
Alright, so basically i have a radio server, radio.nl-gaming.net, and on it i've placed a few .mp3 files i have no problems playing them ingame with inserting their direct link, but i can't figure out if its even possible and if it is how i'd do it,

basically i want it to have a command ingame like

CMD:picksong, and it would display every song in the radio folder as a list (without .mp3 at the end preferably) and allow players to pick the song they want to play, I could do this by making a list dialog but if i end up having 100's of songs on the radio server that is going to take alot of effort to add them all one by one to the dialogs, is their and easier way and just have a check made where it will get the file names and links or whatever?

NaS
08/07/2018, 05:45 AM
You can use a plugin like FileManager. It can access folders and files outside of the SAMP Server's directory and also find (list) files in directories.

jlalt
08/07/2018, 05:53 AM
As the song name is being part of the link.
You would make an array which contains song names [ static way ] or you make the song dir not including index file and sending request from server to your host and getting the available songs list [ dynamic way ]
80% of the url is predefined just append song name with format in it and play.
Anyway... Its 2k18 bruh, I've wrote api to play song by its name or youtube url... [ thanks to youtubemp3api.com and youtubetoany.com ]
[ I may share it here if you want ]

NinjaChicken
08/07/2018, 06:03 AM
Yeah bro, up to you hey i don't mind, shoot me a P'M if youd like and we can talk about it further haha

jlalt
08/07/2018, 06:06 AM
http://telegramapi.eu5.org/youtubeapi/index.php?v=
After v goes the code of YouTube, watch?v=x

http://telegramapi.eu5.org/youtubeapi/index.php?n=Maroon 5 sugar
After n goes the song name.

Note: If you want the php source to host ir yourself I would share it too.

spinu
09/07/2018, 08:13 AM
http://telegramapi.eu5.org/youtubeapi/index.php?v=
After v goes the code of YouTube, watch?v=x

http://telegramapi.eu5.org/youtubeapi/index.php?n=Maroon 5 sugar
After n goes the song name.

Note: If you want the php source to host ir yourself I would share it too.

you cant use PlayAudioStreamForPlayer like


new url[14];
new surl[256];
if(sscanf(params,"s[14]",url)) return SendClientMessage(playerid, GREY, "* usage: /play <Video Id>");
format(surl,sizeof (surl), "http://telegramapi.eu5.org/youtubeapi/index.php?v=%s%", url);
PlayAudioStreamForPlayer(playerid, surl);
return 1;


to play a yt vid.

How to do then??