Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //-------------------------------------------------
- //
- // Zeros Radio Scrip~ please do not remove credits
- //
- //-------------------------------------------------
- #include <a_samp>
- #if defined FILTERSCRIPT
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" Radio System is starting ..");
- print(" Radio system has started.");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- print("\n--------------------------------------");
- print(" Radio System has been shut down due to a Filterscript unload/Exit.");
- print("--------------------------------------\n");
- return 1;
- }
- #else
- main()
- {
- print("\n----------------------------------");
- print(" Radio By Zero");
- print("----------------------------------\n");
- }
- #endif
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/radio", cmdtext, true, 10) == 0) //Change this one to whatever you want.
- {
- ShowPlayerDialog(playerid,90,DIALOG_STYLE_LIST,"EuG Music List Created by zero","1. Dance\r\n2. R&B\r\n3. Rock\r\n4. Electro\r\n5.Country\r\n6.Top40\r\n7.DirtyMix","Start", "Quit");
- }
- if (strcmp("/stopradio", cmdtext, true, 10) == 0)
- {
- StopAudioStreamForPlayer(playerid);//This is the function we need to stop the audio from streaming the music.
- return 1;
- }
- return 0;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- switch(dialogid)
- {
- case 90: //Remember the ID we changed in ShowPlayerDialog? (90) That's how the DialogResponse will get to know which Dialog it's going to use.
- {
- if(!response)// This one is used for option 2 which we changed to (Cancel).
- {
- SendClientMessage(playerid, 0x42F3F198, "You quit the dialog.");//This one sends a message when you close the dialog using (Cancel).
- return 1;
- }
- switch(listitem)//This one will list the items.
- {
- case 0://Case 0 is basically the first line we made in ShowPlayerDialog (1.)
- {
- PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1275319");//This function will play our desired radio. So we have to put the url between its brackets.
- SendClientMessage(playerid, 0x42F3F198, "Type /stopradio to stop audio streaming."); //This line sends a message to the listener that he can stop it using /stopradio.
- }
- case 1://Case 1 is the second line we put in ShowPlayerDialog (\r\n2.)
- {
- PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=663859/");//This function will play our desired radio. So we have to put the url between its brackets.
- SendClientMessage(playerid, 0x42F3F198, "Type /stopradio to stop audio streaming.");//This line sends a message to the listener that he can stop it using /stopradio.
- }
- case 2://Case 2 is the third line we put in ShowPlayerDialog(\r\n3.)
- {
- PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=21585/");//This function will play our desired radio. So we have to put the url between its brackets.
- SendClientMessage(playerid, 0x42F3F198, "Type /stopradio to stop audio streaming.");//This line sends a message to the listener that he can stop it using /stopradio.
- }
- case 3://Case 1 is the second line we put in ShowPlayerDialog (\r\n4.)
- {
- PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1275319/");//This function will play our desired radio. So we have to put the url between its brackets.
- SendClientMessage(playerid, 0x42F3F198, "Type /stopradio to stop audio streaming.");//This line sends a message to the listener that he can stop it using /stopradio.
- }
- case 4://Case 1 is the second line we put in ShowPlayerDialog (\r\n5.)
- {
- PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=668943/");//This function will play our desired radio. So we have to put the url between its brackets.
- SendClientMessage(playerid, 0x42F3F198, "Type /stopradio to stop audio streaming.");//This line sends a message to the listener that he can stop it using /stopradio.
- }
- case 5://Case 1 is the second line we put in ShowPlayerDialog (\r\n5.)
- {
- PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1281016/");//This function will play our desired radio. So we have to put the url between its brackets.
- SendClientMessage(playerid, 0x42F3F198, "Type /stopradio to stop audio streaming.");//This line sends a message to the listener that he can stop it using /stopradio.
- }
- case 6://Case 1 is the second line we put in ShowPlayerDialog (\r\n6.)
- {
- PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1283896/");//This function will play our desired radio. So we have to put the url between its brackets.
- SendClientMessage(playerid, 0x42F3F198, "Type /stopradio to stop audio streaming.");//This line sends a message to the listener that he can stop it using /stopradio.
- }
- case 7://Case 1 is the second line we put in ShowPlayerDialog (\r\n6.)
- {
- PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=4490/");//This function will play our desired radio. So we have to put the url between its brackets.
- SendClientMessage(playerid, 0x42F3F198, "Type /stopradio to stop audio streaming.");//This line sends a message to the listener that he can stop it using /stopradio.
- }
- //You can continue cases here but make sure you make a new line in the ShowPlayerDialog on /radio command \r\n4. 4th \r\n5. 5th channel etc..
- }
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment