ridhoaliga

Simple Radio System

Oct 18th, 2021
640
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <a_samp>
  2. #include <zcmd>
  3.  
  4. #define DIALOG_RADIO 15 // no 15 bisa di ganti kalau ada yg sama :3
  5. #if defined Credits
  6. Credits :
  7. - Tung Tung
  8. - Shoutcast ( for radio )
  9. #endif
  10.  
  11. public OnFilterScriptInit()
  12. {
  13.     return 1;
  14. }
  15.  
  16. public OnFilterScriptExit()
  17. {
  18.     return 1;
  19. }
  20. public OnPlayerConnect(playerid)
  21. {  
  22.     SendClientMessage(playerid, -1, "This server use radio system by TungTung");
  23.     return 1;
  24. }
  25. CMD:radio(playerid, params[])
  26. {
  27.     new string[512];
  28.     strcat(string, "www.krawallradio.com\n");
  29.     strcat(string, "100% HARD ROCK\n");
  30.     strcat(string, "COOLfahrenheit 93\n");
  31.     strcat(string, "New. Music. Unfiltered. idobi.com\n");
  32.     strcat(string, "BluePoint Radio - 103.2 FM\n");
  33.     strcat(string, "Hitradio OE3\n");
  34.     strcat(string, "BlackBeats.FM - finest in blackbeats\n");
  35.     strcat(string, "BestRadio\n");
  36.     strcat(string, "Stop Radio!");
  37.     ShowPlayerDialog(playerid, DIALOG_RADIO, DIALOG_STYLE_LIST, "Radio Streaming", string, "Oke", "Close");
  38.     return 1;
  39. }
  40. CMD:radiocredits(playerid, params[])
  41. {
  42.     SendClientMessage(playerid, -1, "Thanks To :");
  43.     SendClientMessage(playerid, -1, "- Tung TUng ( make radio system )");
  44.     SendClientMessage(playerid, -1, "- Shoutcast ( for radio online )");
  45.     SendClientMessage(playerid, -1, "- SAMP Team");
  46.     return 1;
  47. }
  48. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  49. {
  50.     if(dialogid == DIALOG_RADIO)
  51.     {
  52.         if(response)
  53.         {
  54.             if(listitem == 0)
  55.             {
  56.                 PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=293940");
  57.             }
  58.             if(listitem == 1)
  59.             {
  60.                 PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=709317");
  61.             }
  62.             if(listitem == 2)
  63.             {
  64.                 PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=175821");
  65.             }
  66.             if(listitem == 3)
  67.             {
  68.                 PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=914897");
  69.             }
  70.             if(listitem == 4)
  71.             {
  72.                 PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=193174");
  73.             }
  74.             if(listitem == 5)
  75.             {
  76.                 PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=195363");
  77.             }
  78.             if(listitem == 6)
  79.             {
  80.                 PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=302745");
  81.             }
  82.             if(listitem == 6)
  83.             {
  84.                 PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=158237");
  85.             }
  86.             if(listitem == 7)
  87.             {
  88.                 StopAudioStreamForPlayer(playerid);
  89.                 SendClientMessage(playerid, -1, "Radio stream is stopped :) ");
  90.             }
  91.         }
  92.     }
  93.     return 1;
  94. }
RAW Paste Data