SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 08/07/2018, 05:17 AM   #1
NinjaChicken
Huge Clucker
 
NinjaChicken's Avatar
 
Join Date: Dec 2011
Posts: 467
Reputation: 22
Default Not Sure If This Is Possible, But .mp3 List?

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

CMDicksong, 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?
__________________
Crap that made me Giggle and Shit
Quote:
Originally Posted by Eminem 2ka9 View Post
My players walk like they pissed themselves, how do I set it to a normal walk style where they actually run fast and not like benders?
Quote:
Originally Posted by justsomeguy View Post
Did I just saw a prisoner with a goddamn katana? How did he smuggle that in!? Did he just shove that katana up his anus?
Owner and Operator Of www.nl-gaming.net

NinjaChicken is offline   Reply With Quote
Old 08/07/2018, 05:45 AM   #2
NaS
High-roller
 
NaS's Avatar
 
Join Date: Mar 2008
Location: 🇩🇪
Posts: 1,785
Reputation: 635
Default Re: Not Sure If This Is Possible, But .mp3 List?

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.
NaS is offline   Reply With Quote
Old 08/07/2018, 05:53 AM   #3
jlalt
Banned
 
Join Date: Oct 2014
Location: Iran
Posts: 1,266
Reputation: 366
Default Re: Not Sure If This Is Possible, But .mp3 List?

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 ]
jlalt is offline   Reply With Quote
Old 08/07/2018, 06:03 AM   #4
NinjaChicken
Huge Clucker
 
NinjaChicken's Avatar
 
Join Date: Dec 2011
Posts: 467
Reputation: 22
Default Re: Not Sure If This Is Possible, But .mp3 List?

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
__________________
Crap that made me Giggle and Shit
Quote:
Originally Posted by Eminem 2ka9 View Post
My players walk like they pissed themselves, how do I set it to a normal walk style where they actually run fast and not like benders?
Quote:
Originally Posted by justsomeguy View Post
Did I just saw a prisoner with a goddamn katana? How did he smuggle that in!? Did he just shove that katana up his anus?
Owner and Operator Of www.nl-gaming.net

NinjaChicken is offline   Reply With Quote
Old 08/07/2018, 06:06 AM   #5
jlalt
Banned
 
Join Date: Oct 2014
Location: Iran
Posts: 1,266
Reputation: 366
Default Re: Not Sure If This Is Possible, But .mp3 List?

http://telegramapi.eu5.org/youtubeapi/index.php?v=
After v goes the code of YouTube, watch?v=x

http://telegramapi.eu5.org/youtubeap...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.
jlalt is offline   Reply With Quote
Old 09/07/2018, 08:13 AM   #6
spinu
Little Clucker
 
Join Date: Jun 2018
Posts: 17
Reputation: 0
Default Re: Not Sure If This Is Possible, But .mp3 List?

Quote:
Originally Posted by jlalt View Post
http://telegramapi.eu5.org/youtubeapi/index.php?v=
After v goes the code of YouTube, watch?v=x

http://telegramapi.eu5.org/youtubeap...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

Code:
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??
spinu is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Tool/Web/Other] Ban List v1 - View an active ban list [PHP] [MYSQL] MD5 Tools and Files 11 30/06/2015 10:17 PM
Port 7777 open, server online/on hosted list yet not on internet list.. Jake187 Server Support 20 30/10/2012 12:38 AM
How to put my server on the Hosted list as well as in Internet list? Eljayar General 6 29/02/2012 09:27 PM
Server not showing in the internet list but it shows in the hosted list. robanswe Server Support 4 09/07/2011 08:28 PM
internet list vs payed hosted list? madman227 Server Support 5 23/06/2010 09:28 PM


All times are GMT. The time now is 04:18 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.