Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //On player/in car radio stations usable by command in a dialog
- //Created by BrianSherbino(2013)
- //v 0.1
- #include <a_samp>
- #include <zcmd>
- #pragma tabsize 0
- #define FILTERSCIPT
- #define DIALOG_RADIO 0
- #define DIALOG_RADIO2 1
- #define DIALOG_RADIO3 2
- #define DIALOG_RADIO4 3
- #define DIALOG_RADIO5 4
- #define COLOR_WHITE 0xFFFFFF00
- CMD:radio(playerid, params[])
- {
- ShowPlayerDialog(playerid, DIALOG_RADIO, DIALOG_STYLE_LIST, "Please pick a Music Genre:", "{C9C800}Dubstep\n{C9C800}Metal\n{C9C800}Pop\n{C9C800}Rock", "OK", "Cancel");
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == DIALOG_RADIO)
- {
- if(response)
- {
- if(listitem == 0)
- {
- ShowPlayerDialog(playerid, DIALOG_RADIO2, DIALOG_STYLE_LIST, "These are the Dubstep Radio Stations:", "{C9C800}Dubstep FM\n{C9C800}Dupstep Beyond", "Play", "Cancel");
- }
- if(listitem == 1)
- {
- ShowPlayerDialog(playerid, DIALOG_RADIO3, DIALOG_STYLE_LIST, "These are the Metal Radio Stations:", "{C9C800}Idobi Howl\n{C9C800}KNAC.COM", "Play", "Cancel");
- }
- if(listitem == 2)
- {
- ShowPlayerDialog(playerid, DIALOG_RADIO4, DIALOG_STYLE_LIST, "These are the Pop Radio Stations:", "{C9C800}100Hitz-Top 40\n{C9C800}181.FM POP", "Play", "Cancel");
- }
- if(listitem == 3)
- {
- ShowPlayerDialog(playerid, DIALOG_RADIO5, DIALOG_STYLE_LIST, "These are the Rock Radio Stations:", "{C9C800}181.FM ROCK\n{C9C800}181.FM 80's", "Play", "Cancel");
- }
- }
- }
- if(dialogid == DIALOG_RADIO2)
- {
- if(response)
- {
- if(listitem == 0)
- {
- //Dubstep Station 1
- PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=558051", 0,0,0,1,1);
- SendClientMessage(playerid, COLOR_WHITE, "Dubstep Station: Dubstep FM will now play.");
- }
- if(listitem == 1)
- {
- //Dubstep Station 2
- PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=127336", 0,0,0,1,1);
- SendClientMessage(playerid, COLOR_WHITE, "Dubstep Station: Dubstep Beyond will now play.");
- }
- }
- }
- if(dialogid == DIALOG_RADIO3)
- {
- if(response)
- {
- if(listitem == 0)
- {
- //Metal Station 1
- PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=15810", 0,0,0,1,1);
- SendClientMessage(playerid, COLOR_WHITE, "Metal Station: Idobi Howl will now play.");
- }
- if(listitem ==1)
- {
- //Metal Station 2
- PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=150273", 0,0,0,1,1);
- SendClientMessage(playerid, COLOR_WHITE, "Metal Station: KNAC.COM will now play.");
- }
- }
- }
- if(dialogid == DIALOG_RADIO4)
- {
- if(response)
- {
- if(listitem == 0)
- {
- //Pop Station 1
- PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=59205", 0,0,0,1,1);
- SendClientMessage(playerid, COLOR_WHITE, "Pop Station: 100Hitz-Top 40 will now play.");
- }
- if(listitem == 1)
- {
- //Pop Station 2
- PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=611786", 0,0,0,1,1);
- SendClientMessage(playerid, COLOR_WHITE, "Pop Station: 181.FM POP will now play.");
- }
- }
- }
- if(dialogid == DIALOG_RADIO5)
- {
- if(response)
- {
- if(listitem == 0)
- {
- //Rock Station 1
- PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=55402", 0,0,0,1,1);
- SendClientMessage(playerid, COLOR_WHITE, "Rock Station: 181.FM ROCK will now play.");
- }
- if(listitem == 1)
- {
- //Rock Station 2
- PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=277192", 0,0,0,1,1);
- SendClientMessage(playerid, COLOR_WHITE, "Rock Station: 181.FM 80's will now play.");
- }
- }
- }
- return 1;
- }
Add Comment
Please, Sign In to add comment