Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- // Radio List for SA-MP 0.3d+
- // By: BlueRey [Fxp.co.il]
- //
- //
- // Date: 09/05/2012
- // Version: 0.4 ENG
- //
- #include <a_samp>
- #define DEIALOG_ID 7777
- new radiolist[][][] =
- {
- {"http://scfire-ntc-aa04.stream.aol.com:80/stream/1071","HOT 108 JAMZ"},
- {"http://scfire-mtc-aa05.stream.aol.com:80/stream/1003","Trance Channel"},
- {"http://68.68.105.106:80","idobi Radio"},
- {"http://80.237.153.76:21000","MUSIK.DRUMSTEP"},
- {"http://scfire-mtc-aa04.stream.aol.com:80/stream/1023","181FM POP"},
- {"http://scfire-dtc-aa05.stream.aol.com:80/stream/1074","977 The Hitz Channel"},
- {"http://scfire-ntc-aa04.stream.aol.com:80/stream/1093","Energy 98"},
- {"http://72.232.2.83:8000","DUBSTEP.FM"},
- {"http://81.218.219.203:8000","Pulse-FM Israel"},
- {"http://icecast.clickfm.co.il:8002/click2dance","Click2Dance IL"}
- };
- new bool:Radio[MAX_PLAYERS];
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if(!strcmp(cmdtext,"/radio",true))
- {
- new list[500];
- for(new i; i <= sizeof(radiolist); i++)
- {
- if(i == sizeof(radiolist)) format(list,500,"%s\n \n{FF0000}Stop Lisenig",list);
- else format(list,500,"%s\n{FAFAFA}%02d) {FF9900}%s",list,i+1,radiolist[i][1]);
- }
- ShowPlayerDialog(playerid,DEIALOG_ID,DIALOG_STYLE_LIST,"{00C8C8}Please select a Station",list,"Play","Close");
- return 1;
- }
- if(!strcmp(cmdtext,"/music-all-off",true) && IsPlayerAdmin(playerid))
- {
- for(new i,m=GetMaxPlayers(); i < m; i++) if(IsPlayerConnected(i) && Radio[i]) StopAudioStreamForPlayer(i),Radio[i] = false;
- return 1;
- }
- if(!strcmp(cmdtext,"/minfo",true)) return SendClientMessage(playerid,0xFFFFFFAA,"Radio List [V0.4] | By: BlueRey © Fxp.co.il"); // do not remove
- if(!strcmp(cmdtext,"/moff",true))
- {
- StopAudioStreamForPlayer(playerid);
- Radio[playerid] = false;
- return 1;
- }
- return 0;
- }
- public OnPlayerConnect(playerid) Radio[playerid] = false;
- public OnDialogResponse(playerid,dialogid,response,listitem,inputtext[])
- {
- if(!response) return 1;
- if(dialogid == DEIALOG_ID)
- {
- if(listitem == sizeof(radiolist)) return OnPlayerCommandText(playerid,"/radio");
- if(listitem == sizeof(radiolist)+1) return StopAudioStreamForPlayer(playerid),Radio[playerid] = false;
- StopAudioStreamForPlayer(playerid);
- PlayAudioStreamForPlayer(playerid,radiolist[listitem][0]);
- new str[50]; format(str,50,"Now listening to \"%s\"...",radiolist[listitem][1]);
- SendClientMessage(playerid,0x33CCFFAA,str);
- SendClientMessage(playerid,0xFFFFFFAA,"Stop listening: /MOFF");
- Radio[playerid] = true;
- return 1;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement