Guest User

codeMS

a guest
Dec 5th, 2015
311
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 2.44 KB | None | 0 0
  1. #include <a_samp>
  2. #include <zcmd>
  3.  
  4. #define FILTERSCRIPT
  5.  
  6. #define D_Radios 2016
  7.  
  8. enum _InfoRadios {
  9.     Radio_Name[35], Radio_IP[60]
  10. }
  11.  
  12. new const RadioSystem[][_InfoRadios] = {
  13.     {{"Web Ritz Brasil"},                   {"http://stm7.painel.foxsolucoes.net:10480"}},
  14.     {{"All Hits"},                          {"http://199.195.192.234:9998"}},
  15.     {{"Mega som"},                          {"http://174.142.196.188:8848"}},
  16.     {{"Rap 181"},                           {"http://108.61.73.117:8054"}},
  17.     {{"Eletronia"},                         {"http://37.59.254.25:8024"}},
  18.     {{"Radio Atlanta"},                     {"http://198.50.197.80:9954"}},
  19.     {{"Reggae"},                            {"http://50.7.66.10:9052"}},
  20.     {{"Som sertanejo"},                     {"http://64.15.147.221:9026"}},
  21.     {{"Radio +Sertanejo"},                  {"http://listen.radionomy.com/-Sertanejo"}},
  22.     {{"Radio Rock FM"},                     {"http://69.4.232.118:80/live"}},
  23.     {{"AC/DC Radio"},                       {"http://67.159.5.57:9436"}},
  24.     {{"Mundo Funk"},                        {"http://170.75.145.138:10004"}},
  25.     {{"Radio Classic Rock"},                {"http://Listen.Radionomy.com:80/-1ClassicRock"}},
  26.     {{"Radio Dance Wave"},                  {"http://206.190.151.156:11070"}},
  27.     {{"Jovem Pam(Itajai - SC)"},            {"http://69.46.0.170:9970"}},
  28.     {{"Jovem Pam(Cascavel - PR)"},          {"http://69.46.0.170:9986"}},
  29.     {{"Radio Hunter"},                      {"http://listen.shoutcast.com:80/RadioHunter-TheHitzChannel"}},
  30.     {{"Radio Interativa FM"},               {"http://206.217.201.45:8100"}},
  31.     {{"Radio Aqui Sertanejo"},              {"http://158.69.25.26:8353/stream"}},
  32.     {{"Radio Sertanejo Universitario(SU)"}, {"http://167.114.208.30:8080/radiosu.mp3"}},
  33.     {{"Desligar"},                          {"null"}}
  34. };
  35.    
  36.  
  37. public OnFilterScriptInit() return 1;
  38.  
  39. CMD:radios(playerid)
  40. {
  41.     new ListaRadios[450] = "{FFFFFF}", LineRadio[50];
  42.     for(new i = 0; i < sizeof(RadioSystem); ++i)
  43.     {
  44.         format(LineRadio, sizeof(LineRadio), "%d - %s\n", i+1, RadioSystem[i][Radio_Name]);
  45.         strcat(ListaRadios, LineRadio);
  46.     }
  47.     ShowPlayerDialog(playerid, D_Radios, DIALOG_STYLE_INPUT, "{FFFF00}#{FFFFFF}Rádios:", ListaRadios, "Selecionar", "Sair");
  48.     return 1;
  49. }
  50.  
  51. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  52. {
  53.     if(dialogid == D_Radios)
  54.     {
  55.         if(response)
  56.         {
  57.             if(strval(inputtext)-1 == 20) return StopAudioStreamForPlayer(playerid);
  58.             if(strval(inputtext)-1 > 20 || strval(inputtext) <= 0) return cmd_radios(playerid);
  59.             PlayAudioStreamForPlayer(playerid, RadioSystem[strval(inputtext)-1][Radio_IP]);
  60.             SendClientMessage(playerid, -1, RadioSystem[strval(inputtext)-1][Radio_Name]);
  61.         }
  62.         return 1;
  63.     }
  64.     return 0;
  65. }
Advertisement
Add Comment
Please, Sign In to add comment