Advertisement
Guest User

MusicDialog

a guest
Jan 7th, 2012
295
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 14.96 KB | None | 0 0
  1. /*
  2.  *                        Music Dialog v1.1
  3.  *                 (c) Copyright 2011 by (Mattos)
  4.  *
  5.  * Author: Mateus Costa de Mattos (http://www.brasilwarzone.webs.com)
  6.  * Date: 7th january 2012
  7.  *
  8.  */
  9.  
  10. #include <a_samp>
  11.  
  12. #define COR_VERMELHA        0xFF0000AA
  13. #define COR_AMARELA     0xFFFF00AA
  14. #define COR_VERDE       0x00CC00AA
  15. #define MENUMUSICAS         800
  16.  
  17. #define ShowMusicDialog(%0) ShowPlayerDialog(%0, MENUMUSICAS, DIALOG_STYLE_LIST, "SISTEMA DE MÚSICA - {006600}By Mattos", "Desligar Música\nInserir URL de Musica\nRadios\nPop/Rock\nMPB\nMetal\nEletrônica\nRap/Rip Hop\nPagode/Samba\nFunk", "Selecionar", "Cancelar")
  18.  
  19. new MusicaLigada[MAX_PLAYERS];
  20.  
  21. public OnPlayerCommandText(playerid, cmdtext[])
  22. {
  23.     if(strcmp(cmdtext,"/musica",true) == 0)
  24.     {
  25.         ShowMusicDialog(playerid);
  26.         return 1;
  27.     }
  28.     return 0;
  29. }
  30.  
  31. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  32. {
  33.     if(dialogid == MENUMUSICAS && response)
  34.     {
  35.         switch(listitem)
  36.         {
  37.             case 0: // Desligar Música
  38.             {
  39.                 if (MusicaLigada[playerid] == 0) return SendClientMessage(playerid, COR_VERMELHA, "| Não tem nenhuma música ligada.");
  40.                 MusicaLigada[playerid] = 0;
  41.                 SendClientMessage(playerid, COR_VERDE, "| Música desligada.");
  42.                 StopAudioStreamForPlayer(playerid);
  43.             }
  44.             case 1: // Inserir URL de Musica
  45.             {
  46.                 ShowPlayerDialog(playerid, (MENUMUSICAS + 1), DIALOG_STYLE_INPUT,"URL DE ÁUDIO - {006600}By Mattos", "Insira uma URL de uma música com a extenção .mp3\ne com inicio http://", "Tocar", "Cancelar");
  47.             }
  48.             case 2: // Radios
  49.             {
  50.                 ShowPlayerDialog(playerid, (MENUMUSICAS + 2), DIALOG_STYLE_LIST, "RADIOS - {006600}By Mattos",
  51.                 "Radio World Music BR\nTECHNO4EVER\nHigh Voltage\n80's\n90's\nFM AfterVeat Eletronica\nFM Absolute Country Hits\nFM Alternative Rock X Hits\nFM Blues\nFM Classic Country\nFM Dance\nFM Trance\nFM Club\nSertanejo BR\nFunk BR\nVTN BR\nRap BR\nGames BR\nPagode Station\nAC/DC Radio\nChronix Metal\nRock Radio\nLove FM BR\nTropical FM BR\nVibration PopRock\nBlack Beats\nTechnoBase FM\nBestRadio BR\nTequila Hip Hop\nRadio Baixa Funk\nRock Station\nVoltar",
  52.                 "Selecionar", "Cancelar");
  53.             }    
  54.             case 3: // Pop/Rock
  55.             {
  56.                 SendClientMessage(playerid, COR_VERMELHA, "| Em breve uma lista com várias músicas."); return 1;
  57.                 ShowPlayerDialog(playerid, (MENUMUSICAS + 3), DIALOG_STYLE_LIST, "POP/ROCK - {006600}By Mattos", "Exemplo\nVoltar", "Selecionar", "Cancelar");
  58.             }            
  59.             case 4: // MPB
  60.             {
  61.                 SendClientMessage(playerid, COR_VERMELHA, "| Em breve uma lista com várias músicas."); return 1;
  62.                 ShowPlayerDialog(playerid, (MENUMUSICAS + 4), DIALOG_STYLE_LIST, "MPB - {006600}By Mattos", "Exemplo\nVoltar", "Selecionar", "Cancelar");
  63.             }
  64.             case 5: // Metal
  65.             {
  66.                 SendClientMessage(playerid, COR_VERMELHA, "| Em breve uma lista com várias músicas."); return 1;
  67.                 ShowPlayerDialog(playerid, (MENUMUSICAS + 5), DIALOG_STYLE_LIST, "METAL - {006600}By Mattos", "Exemplo\nVoltar", "Selecionar", "Cancelar");
  68.             }
  69.             case 6: // Eletronica
  70.             {
  71.                 SendClientMessage(playerid, COR_VERMELHA, "| Em breve uma lista com várias músicas."); return 1;
  72.                 ShowPlayerDialog(playerid, (MENUMUSICAS + 3), DIALOG_STYLE_LIST, "ELETRONICA - {006600}By Mattos", "Exemplo\nVoltar", "Selecionar", "Cancelar");
  73.             }
  74.             case 7: // Rap/Rip Hop
  75.             {
  76.                 SendClientMessage(playerid, COR_VERMELHA, "| Em breve uma lista com várias músicas."); return 1;
  77.                 ShowPlayerDialog(playerid, (MENUMUSICAS + 7), DIALOG_STYLE_LIST, "RAP/RIP HOP- {006600}By Mattos", "Exemplo\nVoltar", "Selecionar", "Cancelar");
  78.             }
  79.             case 8: // Pagode/Samba
  80.             {
  81.                 SendClientMessage(playerid, COR_VERMELHA, "| Em breve uma lista com várias músicas."); return 1;
  82.                 ShowPlayerDialog(playerid, (MENUMUSICAS + 8), DIALOG_STYLE_LIST, "PAGODE/SAMBA - {006600}By Mattos", "Exemplo\nVoltar", "Selecionar", "Cancelar");
  83.             }
  84.             case 9: // Funk
  85.             {
  86.                 SendClientMessage(playerid, COR_VERMELHA, "| Em breve uma lista com várias músicas."); return 1;
  87.                 ShowPlayerDialog(playerid, (MENUMUSICAS + 8), DIALOG_STYLE_LIST, "FUNK - {006600}By Mattos", "Exemplo\nVoltar", "Selecionar", "Cancelar");
  88.             }            
  89.         }
  90.         return 1;
  91.     }
  92. //==============================================================================
  93. //                           Inserir URL de Musica
  94. //==============================================================================
  95.     if(dialogid == (MENUMUSICAS + 1) && response)
  96.     {
  97.         PlayAudioStreamForPlayer(playerid, inputtext);
  98.         MusicaLigada[playerid] = 1;
  99.         return 1;
  100.     }
  101. //==============================================================================
  102. //                                  Radios
  103. //==============================================================================
  104.     if(dialogid == (MENUMUSICAS + 2) && response)
  105.     {
  106.         switch(listitem)
  107.         {
  108.             case 0: PlayAudioStreamForPlayer(playerid, "http://212.124.115.93:8000"), MusicaLigada[playerid] = 1, SendClientMessage(playerid, COR_AMARELA, "| Você ligou a rádio: Radio World Music."); // Radio World Music
  109.             case 1: PlayAudioStreamForPlayer(playerid, "http://listen.to.techno4ever.net/dsl/mp3"), MusicaLigada[playerid] = 1, SendClientMessage(playerid, COR_AMARELA, "| Você ligou a rádio: TECHNO4EVER."); // TECHNO4EVER
  110.             case 2: PlayAudioStreamForPlayer(playerid, "http://sc8.1.fm:8035"), MusicaLigada[playerid] = 1, SendClientMessage(playerid, COR_AMARELA, "| Você ligou a rádio: High Voltage."); // High Voltage
  111.             case 3: PlayAudioStreamForPlayer(playerid, "http://sc10.1.fm:6900"), MusicaLigada[playerid] = 1, SendClientMessage(playerid, COR_AMARELA, "| Você ligou a rádio: 80's."); // 80's          
  112.             case 4: PlayAudioStreamForPlayer(playerid, "http://sc1.1.fm:8065"), MusicaLigada[playerid] = 1, SendClientMessage(playerid, COR_AMARELA, "| Você ligou a rádio: 90's."); // 90's          
  113.             case 5: PlayAudioStreamForPlayer(playerid, "http://sc11.1.fm:8250"), MusicaLigada[playerid] = 1, SendClientMessage(playerid, COR_AMARELA, "| Você ligou a rádio: FM AfterVeat Eletronica."); // FM AfterVeat Eletronica          
  114.             case 6: PlayAudioStreamForPlayer(playerid, "http://sc9.1.fm:7800"), MusicaLigada[playerid] = 1, SendClientMessage(playerid, COR_AMARELA, "| Você ligou a rádio: FM Absolute Country Hits."); // FM Absolute Country Hits          
  115.             case 7: PlayAudioStreamForPlayer(playerid, "http://sc12.1.fm:8070"), MusicaLigada[playerid] = 1, SendClientMessage(playerid, COR_AMARELA, "| Você ligou a rádio: FM Alternative Rock X Hits."); // FM Alternative Rock X Hits          
  116.             case 8: PlayAudioStreamForPlayer(playerid, "http://sc16.1.fm:8030"), MusicaLigada[playerid] = 1, SendClientMessage(playerid, COR_AMARELA, "| Você ligou a rádio: FM Blues."); // FM Blues          
  117.             case 9: PlayAudioStreamForPlayer(playerid, "http://sc17.1.fm:7806"), MusicaLigada[playerid] = 1, SendClientMessage(playerid, COR_AMARELA, "| Você ligou a rádio: FM Classic Country."); // FM Classic Country          
  118.             case 10: PlayAudioStreamForPlayer(playerid, "http://sc8.1.fm:8050"), MusicaLigada[playerid] = 1, SendClientMessage(playerid, COR_AMARELA, "| Você ligou a rádio: FM Dance."); // FM Dance          
  119.             case 11: PlayAudioStreamForPlayer(playerid, "http://sc9.1.fm:8040"), MusicaLigada[playerid] = 1, SendClientMessage(playerid, COR_AMARELA, "| Você ligou a rádio: FM Trance."); // FM Trance          
  120.             case 12: PlayAudioStreamForPlayer(playerid, "http://sc14.1.fm:8060"), MusicaLigada[playerid] = 1, SendClientMessage(playerid, COR_AMARELA, "| Você ligou a rádio: FM Club."); // FM Club          
  121.             case 13: PlayAudioStreamForPlayer(playerid, "http://89.149.244.211:7080"), MusicaLigada[playerid] = 1, SendClientMessage(playerid, COR_AMARELA, "| Você ligou a rádio: Sertanejo BR."); // Sertanejo BR          
  122.             case 14: PlayAudioStreamForPlayer(playerid, "http://64.56.64.72:10452"), MusicaLigada[playerid] = 1, SendClientMessage(playerid, COR_AMARELA, "| Você ligou a rádio: Funk BR."); // Funk BR          
  123.             case 15: PlayAudioStreamForPlayer(playerid, "http://184.154.154.37:9087"), MusicaLigada[playerid] = 1, SendClientMessage(playerid, COR_AMARELA, "| Você ligou a rádio: VTN BR."); // VTN BR          
  124.             case 16: PlayAudioStreamForPlayer(playerid, "http://67.228.177.4:9944"), MusicaLigada[playerid] = 1, SendClientMessage(playerid, COR_AMARELA, "| Você ligou a rádio: Rap BR."); // Rap BR          
  125.             case 17: PlayAudioStreamForPlayer(playerid, "http://74.222.1.205:10658"), MusicaLigada[playerid] = 1, SendClientMessage(playerid, COR_AMARELA, "| Você ligou a rádio: Games BR."); // Games BR          
  126.             case 18: PlayAudioStreamForPlayer(playerid, "http://174.142.166.194:7410"), MusicaLigada[playerid] = 1, SendClientMessage(playerid, COR_AMARELA, "| Você ligou a rádio: Pagode Station."); // Pagode Station          
  127.             case 19: PlayAudioStreamForPlayer(playerid, "http://67.159.5.57:9916 AC/DC"), MusicaLigada[playerid] = 1, SendClientMessage(playerid, COR_AMARELA, "| Você ligou a rádio: AC/DC Radio."); // AC/DC Radio          
  128.             case 20: PlayAudioStreamForPlayer(playerid, "http://205.188.215.225:8022"), MusicaLigada[playerid] = 1, SendClientMessage(playerid, COR_AMARELA, "| Você ligou a rádio: Chronix Metal."); // Chronix Metal          
  129.             case 21: PlayAudioStreamForPlayer(playerid, "http://78.129.227.10:8000"), MusicaLigada[playerid] = 1, SendClientMessage(playerid, COR_AMARELA, "| Você ligou a rádio: Rock Radio."); // Rock Radio          
  130.             case 22: PlayAudioStreamForPlayer(playerid, "http://173.193.242.194:8242"), MusicaLigada[playerid] = 1, SendClientMessage(playerid, COR_AMARELA, "| Você ligou a rádio: Love FM BR."); // Love FM BR          
  131.             case 23: PlayAudioStreamForPlayer(playerid, "http://74.86.86.132:8052"), MusicaLigada[playerid] = 1, SendClientMessage(playerid, COR_AMARELA, "| Você ligou a rádio: Tropical FM BR."); // Tropical FM BR          
  132.             case 24: PlayAudioStreamForPlayer(playerid, "http://91.121.55.217:8260"), MusicaLigada[playerid] = 1, SendClientMessage(playerid, COR_AMARELA, "| Você ligou a rádio: Vibration PopRock."); // Vibration PopRock          
  133.             case 25: PlayAudioStreamForPlayer(playerid, "http://85.17.26.77:80"), MusicaLigada[playerid] = 1, SendClientMessage(playerid, COR_AMARELA, "| Você ligou a rádio: Black Beats."); // Black Beats          
  134.             case 26: PlayAudioStreamForPlayer(playerid, "http://78.159.104.167:80"), MusicaLigada[playerid] = 1, SendClientMessage(playerid, COR_AMARELA, "| Você ligou a rádio: TechnoBase FM."); // TechnoBase FM          
  135.             case 27: PlayAudioStreamForPlayer(playerid, "http://184.172.134.4:8443"), MusicaLigada[playerid] = 1, SendClientMessage(playerid, COR_AMARELA, "| Você ligou a rádio: BestRadio BR."); // BestRadio BR          
  136.             case 28: PlayAudioStreamForPlayer(playerid, "http://46.108.158.43:7000"), MusicaLigada[playerid] = 1, SendClientMessage(playerid, COR_AMARELA, "| Você ligou a rádio: Tequila Hip Hop."); // Tequila Hip Hop          
  137.             case 29: PlayAudioStreamForPlayer(playerid, "http://74.222.1.24:10858"), MusicaLigada[playerid] = 1, SendClientMessage(playerid, COR_AMARELA, "| Você ligou a rádio: Radio Baixa Funk."); // Radio Baixa Funk          
  138.             case 30: PlayAudioStreamForPlayer(playerid, "http://rs11.stream24.org:8130"), MusicaLigada[playerid] = 1, SendClientMessage(playerid, COR_AMARELA, "| Você ligou a rádio: Rock Station."); // Rock Station
  139.             case 31: ShowMusicDialog(playerid);
  140.         }
  141.         return 1;
  142.     }
  143. //==============================================================================
  144. //                              Pop/Rock
  145. //==============================================================================
  146.     if(dialogid == (MENUMUSICAS + 3) && response)
  147.     {
  148.         switch(listitem)
  149.         {
  150.             case 0: PlayAudioStreamForPlayer(playerid, "http://exemplo.mp3"), MusicaLigada[playerid] = 1;
  151.             case 1: ShowMusicDialog(playerid);
  152.         }
  153.         return 1;
  154.     }
  155.  
  156. //==============================================================================
  157. //                                   MPB
  158. //==============================================================================
  159.     if(dialogid == (MENUMUSICAS + 4) && response)
  160.     {
  161.         switch(listitem)
  162.         {
  163.             case 0: PlayAudioStreamForPlayer(playerid, "http://exemplo.mp3"), MusicaLigada[playerid] = 1;
  164.             case 1: ShowMusicDialog(playerid);
  165.  
  166.         }
  167.         return 1;
  168.     }
  169.  
  170. //==============================================================================
  171. //                                  Metal
  172. //==============================================================================
  173.     if(dialogid == (MENUMUSICAS + 5) && response)
  174.     {
  175.         switch(listitem)
  176.         {
  177.             case 0: PlayAudioStreamForPlayer(playerid, "http://exemplo.mp3"), MusicaLigada[playerid] = 1;
  178.             case 1: ShowMusicDialog(playerid);
  179.         }
  180.         return 1;
  181.     }
  182.  
  183. //==============================================================================
  184. //                                   Eletronica
  185. //==============================================================================
  186.     if(dialogid == (MENUMUSICAS + 6) && response)
  187.     {
  188.         switch(listitem)
  189.         {
  190.             case 0: PlayAudioStreamForPlayer(playerid, "http://exemplo.mp3"), MusicaLigada[playerid] = 1;
  191.             case 1: ShowMusicDialog(playerid);
  192.         }
  193.         return 1;
  194.     }
  195. //==============================================================================
  196. //                              Rap/Rip Hop
  197. //==============================================================================
  198.     if(dialogid == (MENUMUSICAS + 7) && response)
  199.     {
  200.         switch(listitem)
  201.         {
  202.             case 0: PlayAudioStreamForPlayer(playerid, "http://exemplo.mp3"), MusicaLigada[playerid] = 1;
  203.             case 1: ShowMusicDialog(playerid);
  204.         }
  205.         return 1;
  206.     }
  207. //==============================================================================
  208. //                                 Pagode/Samba
  209. //==============================================================================
  210.     if(dialogid == (MENUMUSICAS + 8) && response)
  211.     {
  212.         switch(listitem)
  213.         {
  214.             case 0: PlayAudioStreamForPlayer(playerid, "http://exemplo.mp3"), MusicaLigada[playerid] = 1;
  215.             case 1: ShowMusicDialog(playerid);
  216.         }
  217.         return 1;
  218.     }  
  219.     return 1;
  220. //==============================================================================
  221. //                                     Funk
  222. //==============================================================================
  223.     if(dialogid == (MENUMUSICAS + 9) && response)
  224.     {
  225.         switch(listitem)
  226.         {
  227.             case 0: PlayAudioStreamForPlayer(playerid, "http://exemplo.mp3"), MusicaLigada[playerid] = 1;
  228.             case 1: ShowMusicDialog(playerid);
  229.         }
  230.         return 1;
  231.     }  
  232.     return 1;
  233. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement