Advertisement
Guest User

**Radio System - 8 Channels - From Scratch**

a guest
Apr 30th, 2013
561
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 3.18 KB | None | 0 0
  1. // Radio System By SimpalK
  2. // My First FS
  3. // Thanks to Use :)
  4.  
  5. #include <a_samp>
  6.  
  7. #define radio 1
  8.  
  9. public OnFilterScriptInit()
  10. {
  11.     print("\n--------------------------------------");
  12.     print(" Radio System By SimpalK Loaded ");
  13.     print("--------------------------------------\n");
  14.     return 1;
  15. }
  16.  
  17. public OnFilterScriptExit()
  18. {
  19.     print("\n--------------------------------------");
  20.     print(" Radio System By SimpalK Unloaded ");
  21.     print("--------------------------------------\n");
  22.     return 1;
  23. }
  24.  
  25. public OnPlayerCommandText(playerid, cmdtext[])
  26. {
  27.     if (strcmp("/radio", cmdtext, true, 10) == 0)
  28.     {
  29.         ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST,"{FF00FF}Radio Channels","Classical\nCountry\nFolk\nJazz\nPop\nRap\nRock\nBlues\n{FFFF00}Stop Radio","Select","Close");
  30.         return 1;
  31.     }
  32.     return 0;
  33. }
  34.  
  35. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  36. {
  37.     if(dialogid == 1)
  38.     {
  39.         if(response)
  40.         {
  41.             if(listitem == 0)
  42.             {
  43.                 PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=22146");
  44.                 GameTextForPlayer(playerid,"Loading ~b~Classical Songs....",3000,6);
  45.             }
  46.             if(listitem == 1)
  47.             {
  48.                 PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1283687");
  49.                 GameTextForPlayer(playerid,"Loading ~b~Country Songs....",3000,6);
  50.             }
  51.             if(listitem == 2)
  52.             {
  53.                 PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=28532");
  54.                 GameTextForPlayer(playerid,"Loading ~b~Folk Songs....",3000,6);
  55.             }
  56.             if(listitem == 3)
  57.             {
  58.                 PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=86433");
  59.                 GameTextForPlayer(playerid,"Loading ~b~Jazz Songs....",3000,6);
  60.             }
  61.             if(listitem == 4)
  62.             {
  63.                 PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=203280");
  64.                 GameTextForPlayer(playerid,"Loading ~b~Pop Songs....",3000,6);
  65.             }
  66.             if(listitem == 5)
  67.             {
  68.                 PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=111772");
  69.                 GameTextForPlayer(playerid,"Loading ~b~Rap Songs....",3000,6);
  70.             }
  71.             if(listitem == 6)
  72.             {
  73.                 PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1660760");
  74.                 GameTextForPlayer(playerid,"Loading ~b~Rock Songs....",3000,6);
  75.             }
  76.             if(listitem == 7)
  77.             {
  78.                 PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=19275");
  79.                 GameTextForPlayer(playerid,"Loading ~b~Blues Songs....",3000,6);
  80.             }
  81.             if(listitem == 8)
  82.             {
  83.                 StopAudioStreamForPlayer(playerid);
  84.                 GameTextForPlayer(playerid,"~r~RADIO Stopped!",2000,6);
  85.             }
  86.         }
  87.         return 1;
  88.     }
  89.     return 1;
  90. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement