NelsonCoutinho

Radio System.

Oct 9th, 2016
505
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.98 KB | None | 0 0
  1. #include <a_samp>
  2. #include <zcmd>
  3. //============================================================================//
  4. #define DIALOG_MUSICAS 1
  5. #define DIALOG_RADIOS 2
  6. #define DIALOG_MP3 3
  7. #define DIALOG_CREDITOS 4
  8. //============================================================================//
  9. #if defined FILTERSCRIPT
  10. //============================================================================//
  11. public OnFilterScriptInit()
  12. {
  13. print("\n--------------------------------------");
  14. print(" Radio/Mp3 System By: Smokiie");
  15. print("--------------------------------------\n");
  16. return 1;
  17. }
  18. //============================================================================//
  19. public OnFilterScriptExit()
  20. {
  21. return 1;
  22. }
  23. //============================================================================//
  24. #else
  25.  
  26. //============================================================================//
  27. #endif
  28.  
  29. //============================================================================//
  30.  
  31. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  32. {
  33. if(dialogid == DIALOG_MUSICAS)
  34. {
  35. switch(listitem)
  36. {
  37. case 0:
  38. {
  39. ShowPlayerDialog(playerid, DIALOG_RADIOS, DIALOG_STYLE_LIST, "Radios", "Radio Hunter\nDesligar", "Escolher", #);
  40. }
  41. case 1:
  42. {
  43. ShowPlayerDialog(playerid, DIALOG_MP3, DIALOG_STYLE_LIST, "MP3", "Baile de Favela\nMalandramente\nDesligar", "Escolher", #);
  44. }
  45. case 2:
  46. {
  47. ShowPlayerDialog(playerid, DIALOG_CREDITOS, DIALOG_STYLE_MSGBOX, "Creditos", "System Created By: Smokiie_Gamer\nBom Jogo.", "Confirmar", #);
  48. }
  49. }
  50. }
  51. if(dialogid == DIALOG_MP3)
  52. {
  53. switch(listitem)
  54. {
  55. case 0:
  56. {
  57. PlayAudioStreamForPlayer(playerid, "https://europa.sscdn.co/palcomp3/5/5/d/3/djclesiomix-baile-de-favela-mc-joao-2015-1dbf8314.mp3");
  58. SendClientMessage(playerid, -1, "Você escolheu a Musica ' Baile de Favela '");
  59. }
  60. case 1:
  61. {
  62. PlayAudioStreamForPlayer(playerid, "https://fobos.sscdn.co/palcomp3/5/2/c/0/mcsnandinhoenegoban-nandinho-feat-nego-bam-malandramente-rd-da-nh-light-c21b5bb0.mp3");
  63. SendClientMessage(playerid, -1, "Você escolheu a Musica ' Malandramente '");
  64. }
  65. case 2:
  66. {
  67. StopAudioStreamForPlayer(playerid);
  68. SendClientMessage(playerid, -1, "Você desidiu parar a Musica !");
  69. }
  70. }
  71. }
  72. if(dialogid == DIALOG_RADIOS)
  73. {
  74. switch(listitem)
  75. {
  76. case 0:
  77. {
  78. PlayAudioStreamForPlayer(playerid, "http://live.hunterfm.com/live");
  79. SendClientMessage(playerid, -1, "Você escolheu a Radio ' Hunter '");
  80. }
  81. case 1:
  82. {
  83. StopAudioStreamForPlayer(playerid);
  84. SendClientMessage(playerid, -1, "Você desidiu parar a Radio !");
  85. }
  86. }
  87. }
  88. return 1;
  89. }
  90. //============================================================================//
  91. CMD:musicas(playerid)
  92. {
  93. ShowPlayerDialog(playerid, DIALOG_MUSICAS, DIALOG_STYLE_LIST, "System", "Radios\nMp3\nCreditos", "Escolher", #);
  94. return true;
  95. }
Advertisement
Add Comment
Please, Sign In to add comment