Jakwob-WG

[FS] radio

Oct 9th, 2014
261
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 5.55 KB | None | 0 0
  1. //Version 1.0
  2.  
  3. #define FILTERSCRIPT
  4.  
  5. #include <a_samp>
  6. #include <zcmd>
  7.  
  8. #if defined FILTERSCRIPT
  9.  
  10. #define Msg SendClientMessage
  11. #define PCMD CMD
  12. #define lb 0x33CCFFAA
  13. #define Red 0xFF0000FF
  14. #define Yellow 0xFFFF00AA
  15.  
  16. #define DIALOG_MUSIC 2014
  17.  
  18. #define MsgAll SendClientMessageToAll
  19. #define Msg SendClientMessage
  20.  
  21. public OnFilterScriptInit()
  22. {
  23.     return 1;
  24. }
  25.  
  26. public OnFilterScriptExit()
  27. {
  28.     return 1;
  29. }
  30.  
  31. #endif
  32.  
  33. new musicitems[] = "1\tDubstep FM\n\
  34.                   2\tCapital FM\n\
  35.                    3\tPulse Radio\n\
  36.                    4\tRadio Klass Romania\n\
  37.                    5\tIts a Trap Radio\n\
  38.                    6\tAbsolute Radio\n\
  39.                    7\tDrumstep Musik\n\
  40.                    8\tABC Dance\n\
  41.                    9\tUnderground Radio\n\
  42.                    10\tDefJay\n\
  43.                    11\tHardmode Radio\n\
  44.                    12\t#Musik.Club Radio\n\
  45.                    13\tTurn Off\n";
  46.  
  47.  
  48. enum PlayerInfo
  49. {
  50.         RadioOn,
  51.         RadioOff,
  52. }
  53. new pInfo[MAX_PLAYERS][PlayerInfo];
  54.  
  55. public OnPlayerConnect(playerid)
  56. {
  57.     pInfo[playerid][RadioOff] = 0;
  58.     Msg(playerid, Yellow, "This server uses {33CCFF}JRadio (By Jakwob)");
  59.     return 1;
  60. }
  61.  
  62. public OnPlayerDisconnect(playerid, reason)
  63. {
  64.     pInfo[playerid][RadioOff] = 0;
  65.     return 1;
  66. }
  67.  
  68. CMD:music(playerid, params[])
  69. {
  70.     ShowPlayerDialog(playerid,DIALOG_MUSIC,DIALOG_STYLE_LIST,"{33CCFF}Music Stations:",musicitems,"Tune in","Close");
  71.     return 1;
  72. }
  73.  
  74. CMD:reloadmusic(playerid, params[])
  75. {
  76.     return 1;
  77. }
  78.  
  79. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  80. {
  81.     if(dialogid == DIALOG_MUSIC)
  82.     {
  83.         if(response)
  84.         {
  85.             if(listitem == 0)
  86.             {
  87.                 pInfo[playerid][RadioOff] = 1;
  88.                 PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=40568");
  89.                 SendClientMessage(playerid, Yellow, ">  {33CCFF}You are tuned into {FFFF00}Dubstep FM");
  90.             }
  91.             else if(listitem == 1)
  92.             {
  93.                 pInfo[playerid][RadioOff] = 1;
  94.                 PlayAudioStreamForPlayer(playerid, "http://media-ice.musicradio.com/CapitalMP3.m3u");
  95.                 SendClientMessage(playerid, Yellow, ">  {33CCFF}You are tuned into {FFFF00}Capital FM");
  96.             }
  97.             else if(listitem == 2)
  98.             {
  99.                 pInfo[playerid][RadioOff] = 1;
  100.                 PlayAudioStreamForPlayer(playerid, "http://icy3.abacast.com/pulse87-pulse87mp3-64");
  101.                 SendClientMessage(playerid, Yellow, ">  {33CCFF}You are tuned into {FFFF00}Pulse 87");
  102.             }
  103.             else if(listitem == 3)
  104.             {
  105.                 pInfo[playerid][RadioOff] = 1;
  106.                 PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=7581");
  107.                 SendClientMessage(playerid, Yellow, ">  {33CCFF}You are tuned into {FFFF00}Radio Klass Romania");
  108.             }
  109.             else if(listitem == 4)
  110.             {
  111.                 pInfo[playerid][RadioOff] = 1;
  112.                 PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=99183630");
  113.                 SendClientMessage(playerid, Yellow, ">  {33CCFF}You are tuned into {FFFF00}Its a Trap Radio");
  114.             }
  115.             else if(listitem == 5)
  116.             {
  117.                 pInfo[playerid][RadioOff] = 1;
  118.                 PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=933381");
  119.                 SendClientMessage(playerid, Yellow, ">  {33CCFF}You are tuned into {FFFF00}Absolute Radio");
  120.             }
  121.             else if(listitem == 6)
  122.             {
  123.                 pInfo[playerid][RadioOff] = 1;
  124.                 PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=39428");
  125.                 SendClientMessage(playerid, Yellow, ">  {33CCFF}You are tuned into {FFFF00}Drumstep Musik");
  126.             }
  127.             else if(listitem == 7)
  128.             {
  129.                 pInfo[playerid][RadioOff] = 1;
  130.                 PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=116494");
  131.                 SendClientMessage(playerid, Yellow, ">  {33CCFF}You are tuned into {FFFF00}ABC Dance");
  132.             }
  133.             else if(listitem == 8)
  134.             {
  135.                 pInfo[playerid][RadioOff] = 1;
  136.                 PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=95395");
  137.                 SendClientMessage(playerid, Yellow, ">  {33CCFF}You are tuned into {FFFF00}Underground Radio");
  138.             }
  139.             else if(listitem == 9)
  140.             {
  141.                 pInfo[playerid][RadioOff] = 1;
  142.                 PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=84158");
  143.                 SendClientMessage(playerid, Yellow, ">  {33CCFF}You are tuned into {FFFF00}DefJay");
  144.             }
  145.             else if(listitem == 10)
  146.             {
  147.                 pInfo[playerid][RadioOff] = 1;
  148.                 PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1198934");
  149.                 SendClientMessage(playerid, Yellow, ">  {33CCFF}You are tuned into {FFFF00}Hardmode Radio");
  150.             }
  151.             else if(listitem == 11)
  152.             {
  153.                 pInfo[playerid][RadioOff] = 1;
  154.                 PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=17998");
  155.                 SendClientMessage(playerid, Yellow, ">  {33CCFF}You are tuned into {FFFF00}#Musik.Club Radio");
  156.             }
  157.             else if(listitem == 12)
  158.             {
  159.                 pInfo[playerid][RadioOff] = 0;
  160.                 StopAudioStreamForPlayer(playerid);
  161.                 SendClientMessage(playerid, Yellow,">  {33CCFF}Music off");
  162.             }
  163.         }
  164.     }
  165.     return 1;
  166. }
Advertisement
Add Comment
Please, Sign In to add comment