Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //================================//
- // //
- // PlayHard Radio //
- // //
- // //
- // A simple audio-streaming radio //
- // //
- //============------==============//
- #include <a_samp>
- //---========Station Names==========---
- //-If you want to change the station name just change the name between the brackets " ".
- #define station1 "Blues"
- #define station2 "Rock"
- #define station3 "Pop"
- #define station4 "Country"
- #define station5 "Dance"
- #define station6 "Rap and Hiphop"
- //---=====Audio Streaming URLS======---
- //-If you want to change the Audio streaming url change the url from the brackets. Make sure it goes with station#.
- #define station1stream "http://stream.laut.fm/bluesclub"
- #define station2stream "http://67.159.45.87:8226"
- #define station3stream "http://live2.radyotvonline:8025"
- #define station4stream "http://72.13.81.5:5010"
- #define station5stream "http://tai.egihosting.com/dance-32k-mp3"
- #define station6stream "http://105-stream-02.datacomm.ch:8000/105dope"
- //---===============================---
- #define red "{FF002B}"
- #define yellow "{FAF623}"
- #define COLOR_WHITE 0xFFFFFFFF
- #if defined FILTERSCRIPT
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" PlayHard Radio 0.1a is running.");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- #else
- main()
- {
- print("\n----------------------------------");
- print(" PlayHard Radio 0.1a");
- print("----------------------------------\n");
- }
- #endif
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/phradio", cmdtext, true, 10) == 0)
- {
- ShowPlayerDialog(playerid,354,DIALOG_STYLE_LIST,""red"Stations "yellow"List","1. "station1"\r\n2. "station2"\r\n3. "station3"\r\n4. "station4"\r\n5. "station5"\r\n6. "station6"","Select", "Cancel");
- return 1;
- }
- if (strcmp("/stopradio", cmdtext, true, 10) == 0)
- {
- StopAudioStreamForPlayer(playerid);
- return 1;
- }
- return 0;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- switch(dialogid)
- {
- case 354:
- {
- if(!response)
- {
- SendClientMessage(playerid, COLOR_WHITE, "You have escaped from the stations list.");
- return 1;
- }
- switch(listitem)
- {
- case 0:
- {
- PlayAudioStreamForPlayer(playerid, ""station1stream"");
- SendClientMessage(playerid, COLOR_WHITE, "-"red"PlayHard: "yellow"Type /stopradio to stop audio streaming.");
- }
- case 1:
- {
- PlayAudioStreamForPlayer(playerid, ""station2stream"");
- SendClientMessage(playerid, COLOR_WHITE, "-"red"PlayHard: "yellow"Type /stopradio to stop audio streaming.");
- }
- case 2:
- {
- PlayAudioStreamForPlayer(playerid, ""station3stream"");
- SendClientMessage(playerid, COLOR_WHITE, "-"red"PlayHard: "yellow"Type /stopradio to stop audio streaming.");
- }
- case 3:
- {
- PlayAudioStreamForPlayer(playerid, ""station4stream"");
- SendClientMessage(playerid, COLOR_WHITE, "-"red"PlayHard: "yellow"Type /stopradio to stop audio streaming.");
- }
- case 4:
- {
- PlayAudioStreamForPlayer(playerid, ""station5stream"");
- SendClientMessage(playerid, COLOR_WHITE, "-"red"PlayHard: "yellow"Type /stopradio to stop audio streaming.");
- }
- case 5:
- {
- PlayAudioStreamForPlayer(playerid, ""station6stream"");
- SendClientMessage(playerid, COLOR_WHITE, "-"red"PlayHard: "yellow"Type /stopradio to stop audio streaming.");
- }
- }
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement