SHARE
TWEET

Sistema de /iPod - PAWN

iPedrO_ Jul 22nd, 2012 293 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /* Usando zcmd, sscanf, PAWN
  2.  
  3. @Author - iPedrO_
  4.  
  5. Sistema de /iPod para players. (feito SÓ por mim).
  6. Usei as rádios do Sistema do Miku de MP3 para base.
  7. Mas o sistema de iPod foi feito por mim.
  8.  
  9. */
  10. #define DIALOG_MP3          112
  11.  
  12. enum pInfo
  13. {
  14. piPod
  15. }
  16.  
  17. static const Musicas[31][64] = {
  18. {"Adele-Someone like you"},
  19. {"Aline Barros e Fernandinho-Rendido Estou"},
  20. {"André Valadão-Milagres"},
  21. {"Audioslave-Show me how to live"},
  22. {"Britney Spears-Criminal"},
  23. {"Britney Spears-Till the World Ends"},
  24. {"Bruno Mars-Billionaire"},
  25. {"Bruno Mars-It Will Rain"},
  26. {"ColdPlay-Paradise"},
  27. {"Evanescence-Bring Me to Life"},
  28. {"Fernandinho-Faz Chover"},
  29. {"Guns N'Roses-Used to love Her"},
  30. {"Guns N'Roses-Welcome to the Jungle"},
  31. {"Iron Maiden-Fear of the Dark"},
  32. {"João Lucas e Marcelo-Eu quero Tchu"},
  33. {"Katy Perry-Teenage Dream"},
  34. {"Lázaro- Eu sou de Jesus"},
  35. {"LMFAO-Sexy and I Know It"},
  36. {"Slipknot-Before I Forget"},
  37. {"Tenacious D-Beelzeboss"},
  38. {"Tenacious D-The Metal"},
  39. {"Katy Perry-The One That Got Away"},
  40. {"Rihanna - We Found Love"},
  41. {"Jennifer Lopez - On the Floor"},
  42. {"Black Eyed Peas-I Gotta Feeling"},
  43. {"ColdPlay-Viva la Vida"},
  44. {"Led Zeppelin - Stairway to Heaven"},
  45. {"Metallica - One"},
  46. {"Tenacious D - Master Exploder"},
  47. {"Yolanda be Cool - We no Speak Americano"},
  48. {"Kansas - Carry on My Wayward Son"}
  49. };
  50.  
  51. static const URL[31][128] = {
  52. {"https://dl.dropbox.com/s/lex5dzikfb32owy/Adele%20-%20Someone%20like%20you.mp3"},
  53. {"https://dl.dropbox.com/s/6swkgacj0ifh8k4/Aline%20Barros%20e%20Fernandinho%20-%20Rendido%20Estou.mp3"},
  54. {"https://dl.dropbox.com/s/ibppbtcr8mqgj1i/Andr%C3%A9%20Valad%C3%A3o%20-%20Milagre.mp3"},
  55. {"https://dl.dropbox.com/s/32oam9qtfw3imfy/Audioslave%20-%20Show%20Me%20How%20To%20Live.mp3"},
  56. {"https://dl.dropbox.com/s/kzzk7bxs1qotmv0/Britney%20Spears%20-%20Criminal.mp3"},
  57. {"https://dl.dropbox.com/s/zu90r2yr2xnhr20/Britney%20Spears%20-%20Till%20the%20World%20Ends.mp3"},
  58. {"https://dl.dropbox.com/s/lrmk0vmi3zjcv0l/Bruno%20Mars%20-%20Billionaire.mp3"},
  59. {"https://dl.dropbox.com/s/5pedc6gvqwa4gyl/Bruno%20Mars%20-%20It%20Will%20Rain.mp3"},
  60. {"https://dl.dropbox.com/s/fjqk2fp9c6c6yvj/ColdPlay%20-%20Paradise.mp3"},
  61. {"https://dl.dropbox.com/s/xgc5n1ohcp6d5vj/Evanessence%20-%20Bring%20Me%20To%20Life.mp3"},
  62. {"https://dl.dropbox.com/s/5eqviff2hn1cscm/Fernandinho%20-%20Faz%20Chover.mp3"},
  63. {"https://dl.dropbox.com/s/o9fiiigqvqmxatr/Guns%20N%27%20Roses%20-%20Used%20To%20Love%20Her.mp3"},
  64. {"https://dl.dropbox.com/s/vnprey4mplatwm3/Guns%20N%C2%B4Roses%20-%20Welcome%20to%20the%20Jungle.mp3"},
  65. {"https://dl.dropbox.com/s/3opearbkd7ppxa4/Iron%20Maiden%20-%20Fear%20Of%20The%20Dark.mp3"},
  66. {"https://dl.dropbox.com/s/6ao5hrrvcy58jej/Jo%C3%A3o%20Lucas%20e%20Marcelo-Eu%20quero%20Tchu.mp3"},
  67. {"https://dl.dropbox.com/s/ijrzhc4ss5bz8o7/Katy%20Perry%20-%20Teenage%20Dream.mp3"},
  68. {"https://dl.dropbox.com/s/w0gxkv67dfc6apj/L%C3%A1zaro%20-%20Eu%20sou%20de%20Jesus.mp3"},
  69. {"https://dl.dropbox.com/s/i8bqcwzeya8cpyf/LMFAO%20-%20I%27m%20Sexy%20and%20I%20Know%20It.mp3"},
  70. {"https://dl.dropbox.com/s/k3py2wlo2m5tdhs/Slipknot%20-%20Before%20I%20Forget.mp3"},
  71. {"https://dl.dropbox.com/s/8d7t6cm0kggzf0x/Tenacious%20D%20-%20Beelzeboss.mp3"},
  72. {"https://dl.dropbox.com/s/k2ilubtvp4nxrn8/Tenacious%20D%20-%20The%20Metal.mp3"},
  73. {"https://dl.dropbox.com/s/ko30hwvtkct7d6c/Katy%20Perry%20-%20The%20One%20That%20Got%20Away.mp3"},
  74. {"https://dl.dropbox.com/s/ld3gnug5ao0z92r/Rihanna%20-%20We%20Found%20Love.mp3"},
  75. {"https://dl.dropbox.com/s/l4hku9xd5x2w27j/Jennifer%20Lopez%20-%20On%20The%20Floor.mp3"},
  76. {"https://dl.dropbox.com/s/j1fseug8la56421/Black%20Eyed%20Peas%20-%20I%20Gotta%20Feeling.mp3"},
  77. {"https://dl.dropbox.com/s/ftq5izlwlhyz4ay/ColdPlay%20-%20Viva%20la%20Vida.mp3"},
  78. {"https://dl.dropbox.com/s/92697b428kq5je9/Led%20Zeppelin%20-%20Stairway%20to%20Heaven.mp3"},
  79. {"https://dl.dropbox.com/s/0z61n8i2tl22mra/Metallica%20-%20One.mp3"},
  80. {"https://dl.dropbox.com/s/owjeqw6gb2wz9qe/Tenacious%20D%20-%20Master%20Exploder.mp3"},
  81. {"https://dl.dropbox.com/s/pj8swv1rc0h8v38/Yolanda%20be%20Cool%20-%20We%20No%20Speak%20Americano.mp3"},
  82. {"https://dl.dropbox.com/s/rb61nzpc4uds08x/Kansas%20-%20Carry%20on%20my%20Wayward%20Son.mp3"}
  83. };
  84.  
  85. cmd(ipod, playerid, params[])
  86. {
  87.    #pragma unused params
  88.    if(Player[playerid][piPod] == 1)
  89.         {
  90.                 new stringt[sizeof(Musicas)*64];
  91.                 SendClientMessage(playerid,COLOR_WHITE,"{FF0000}[BLS]: {FFFFFF}Escolha o que deseja ouvir!");
  92.                 for(new i = 0; i <sizeof(Musicas); i ++)
  93.                         format(stringt,sizeof(stringt),"%s\n - %s",stringt,Musicas[i]);
  94.  
  95.                 strcat(stringt,"\n - Ouvir rádio\n - Desligar");
  96.                 ShowPlayerDialog(playerid, DIALOG_MP3, DIALOG_STYLE_LIST,"{FF0000}Life {FFFFFF}Simulation RP - iPod - Selecione uma musica",stringt,"Ouvir","Sair");
  97.         }
  98.         else
  99.         {
  100.         SendClientMessage(playerid,COLOR_WHITE,"{FF0000}[BLS]: {FFFFFF}Você não tem um iPod. Compre um nas Lojas 24-7.");
  101.         }
  102.         return true;
  103. }
  104.  
  105. // Nesse caso vou usar o sistema de /comprar do meu GM:
  106.  
  107. else if(listitem == 8)
  108.                         {
  109.                             if(Player[playerid][pTraderPerk] > 0)
  110.                         {
  111.                                         new skill = 250 / 100;
  112.                                         new price = (skill)*(Player[playerid][pTraderPerk]);
  113.                                         new payout = 250 - price;
  114.                                         if(GetPlayerGP(playerid) < payout)
  115.                                         {
  116.                                         SendClientMessage(playerid, COLOR_GREY, "Você não pode pagar por isso.");
  117.                                         return true;
  118.                                         }
  119.                                         GivePlayerGP(playerid, - payout);
  120.                                         if(SBizzInfo[9][sbProducts] > 0)
  121.                                         {
  122.                                                 SBizzInfo[9][sbTill] += payout;
  123.                                                 ExtortionSBiz(9, payout);
  124.                                         }
  125.                                         format(string, sizeof(string), "~r~R$ %d", payout);
  126.                                         GameTextForPlayer(playerid, string, 5000, 1);
  127.                                 }
  128.                                 else
  129.                                 {
  130.                                     if(GetPlayerGP(playerid) < 250)
  131.                                         {
  132.                                         SendClientMessage(playerid, COLOR_GREY, "Você não pode pagar por isso.");
  133.                                         return true;
  134.                                         }
  135.                                     GivePlayerGP(playerid, -250);
  136.                                     if(SBizzInfo[9][sbProducts] > 0)
  137.                                         {
  138.                                                 SBizzInfo[9][sbTill] += 250;
  139.                                                 ExtortionSBiz(9, 250);
  140.                                         }
  141.                                         format(string, sizeof(string), "~r~R$ %d", 250);
  142.                                         GameTextForPlayer(playerid, string, 5000, 1);
  143.                                 }
  144.                                 if(SBizzInfo[9][sbProducts]>0)
  145.                 {
  146.                                         SBizzInfo[9][sbProducts]--;
  147.                                 }
  148.                                 PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  149.                                 format(string, sizeof(string), "Você comprou um iPod");
  150.                                 SendClientMessage(playerid, COLOR_GREY, string);
  151.                                 SendClientMessage(playerid, COLOR_WHITE, "DICA: Digite /iPod");
  152.                                 Player[playerid][piPod] = 1;
  153.                                 return true;
  154.                         }
  155.  
  156. else if(dialogid == DIALOG_MP3)
  157.         {
  158.             new Msg[128];
  159.         if(response)
  160.                 {
  161.                         if(listitem == sizeof(Musicas)) {
  162.                             ShowPlayerDialog(playerid, 2424, DIALOG_STYLE_LIST, "Brasil {FF0000}Life {FFFFFF}Simulation Rádios", "{FFFFFF}Radio Hunter\nRadio Super Mix\nRadio PureDJ\nRadio Nova Web\nRadio Electro Vibe\nRadio Team Expert\nRadio Relax\nDesligar", "OK", "Cancelar");
  163.                         }
  164.                         else if(listitem == sizeof(Musicas)+1) {
  165.                             StopAudioStreamForPlayer(playerid);
  166.                                 SendClientMessage(playerid,COLOR_WHITE,"{FF0000}[BLS]: {FFFFFF}iPod desligado!");
  167.                         }
  168.                         else if(listitem <= sizeof(Musicas)-1) {
  169.                                 StopAudioStreamForPlayer(playerid);
  170.                                 PlayAudioStreamForPlayer(playerid,URL[listitem]);
  171.                                 format(Msg,sizeof(Msg),"{FF0000}[BLS]: {FFFFFF}iPod tocando agora: %s!",Musicas[listitem]);
  172.                                 SendClientMessage(playerid,COLOR_WHITE,Msg);
  173.                         }
  174.                 }
  175.                 return true;
  176.     }// 03/05/2012
  177.  
  178. else if(dialogid == 2424)
  179.         {
  180.         if(response)
  181.                 {
  182.                 if(listitem == 0)
  183.                         {
  184.                                 StopAudioStreamForPlayer(playerid);
  185.                                 PlayAudioStreamForPlayer(playerid,"http://stream.radiohunter.com.br:7070/listen.pls");//Radio Hunter
  186.                                 SendClientMessage(playerid, 0x33CCFFAA, "{FF0000}[BLS]: {FFFFFF}Radio Hunter Ligada! Epere Alguns Segundos Para Tocar!");
  187.                 }
  188.                 else if(listitem == 1)
  189.                         {
  190.                         StopAudioStreamForPlayer(playerid);
  191.                                 PlayAudioStreamForPlayer(playerid,"http://radiosupermix.com.br:7585");// SUPER MIX
  192.                         SendClientMessage(playerid, 0x33CCFFAA, "{FF0000}[BLS]: {FFFFFF}Radio Super Mox Ligada! Epere Alguns Segundos Para Tocar!");
  193.                         }
  194.                 else if(listitem == 2)
  195.                         {
  196.                         StopAudioStreamForPlayer(playerid);
  197.                                 PlayAudioStreamForPlayer(playerid,"http://66.90.101.54:8120");//Radio PureDJ
  198.                         SendClientMessage(playerid, 0x33CCFFAA, "{FF0000}[BLS]: {FFFFFF}Radio PureDJ Ligada! Epere Alguns Segundos Para Tocar!");
  199.                 }
  200.                 else if(listitem == 3)
  201.                         {
  202.                                 StopAudioStreamForPlayer(playerid);
  203.                                 PlayAudioStreamForPlayer(playerid,"http://69.162.90.148:7080/");//Nova Web
  204.                             SendClientMessage(playerid, 0x33CCFFAA, "{FF0000}[BLS]: {FFFFFF}Radio Nova Web Ligada! Epere Alguns Segundos Para Tocar!");
  205.                 }
  206.                 else if(listitem == 4)
  207.                 {
  208.                         StopAudioStreamForPlayer(playerid);
  209.                                 PlayAudioStreamForPlayer(playerid,"http://streaming15.brlogic.com:8084/live");//Radio Electro Vibe
  210.                         SendClientMessage(playerid, 0x33CCFFAA, "{FF0000}[BLS]: {FFFFFF}Radio Electro Vibe Ligada! Epere Alguns Segundos Para Tocar!");
  211.                 }
  212.                 else if(listitem == 5)
  213.                 {
  214.                         StopAudioStreamForPlayer(playerid);
  215.                                 PlayAudioStreamForPlayer(playerid,"http://64.31.30.91:9980");//Team Expert
  216.                         SendClientMessage(playerid, 0x33CCFFAA, "{FF0000}[BLS]: {FFFFFF}Radio Team Expert Ligada! Epere Alguns Segundos Para Tocar!");
  217.                 }
  218.                 else if(listitem == 6)
  219.                         {
  220.                         StopAudioStreamForPlayer(playerid);
  221.                                 PlayAudioStreamForPlayer(playerid,"http://streaming18.brlogic.com:8204/live");//Relax
  222.                         SendClientMessage(playerid, 0x33CCFFAA, "{FF0000}[BLS]: {FFFFFF}Radio Relax Ligada! Epere Alguns Segundos Para Tocar!");
  223.                 }
  224.                 else if(listitem == 7)
  225.                         {
  226.                         StopAudioStreamForPlayer(playerid);
  227.                                 PlayAudioStreamForPlayer(playerid,"http://63.143.33.99:8000");//Brasil Hits
  228.                         SendClientMessage(playerid, 0x33CCFFAA, "{FF0000}[BLS]: {FFFFFF}Radio Brasil Hits Ligada! Epere Alguns Segundos Para Tocar!");
  229.                 }
  230.                 else if(listitem == 8)
  231.                         {
  232.                         StopAudioStreamForPlayer(playerid);
  233.                                 PlayAudioStreamForPlayer(playerid,"http://63.143.33.99:8000");//Brasil Hits
  234.                         SendClientMessage(playerid, 0x33CCFFAA, "{FF0000}[BLS]: {FFFFFF}Radio Brasil Hits Ligada! Epere Alguns Segundos Para Tocar!");
  235.                 }
  236.                 else if(listitem == 9)
  237.                         {
  238.                         StopAudioStreamForPlayer(playerid);
  239.                         SendClientMessage(playerid, 0x33CCFFAA, "{FF0000}[BLS]: {FFFFFF}Você desligou o iPod.");
  240.                 }
  241.  
  242.         }
  243.         }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top