Advertisement
Guest User

Basic Music player

a guest
Sep 4th, 2014
535
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.77 KB | None | 0 0
  1. #define FILTERSCRIPT
  2.  
  3. #include <a_samp>
  4. #include <zcmd>
  5.  
  6. #if defined FILTERSCRIPT
  7.  
  8. public OnFilterScriptInit()
  9. {
  10. print("\n--------------------------------------");
  11. print(" Basic Music Filterscript Loaded...");
  12. print("--------------------------------------\n");
  13. return 1;
  14. }
  15.  
  16. public OnFilterScriptExit()
  17. {
  18. return 1;
  19. }
  20.  
  21. #else
  22. #endif
  23.  
  24. cmd(playmusic, playerid, params[])
  25. {
  26. ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST ,"Select a Genre","Heavy Metal\nRock\nRap","Select","Cancel");
  27. return 1;
  28. }
  29.  
  30. cmd(stopmusic, playerid, params[])
  31. {
  32. StopAudioStreamForPlayer(playerid);
  33. return 1;
  34. }
  35.  
  36. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  37. {
  38. if(dialogid == 1)
  39. {
  40. if(response)
  41. {
  42. if(listitem == 0)
  43. {
  44. ShowPlayerDialog(playerid,2,DIALOG_STYLE_LIST ,"Heavy Metal","The Death of Me\nAmerika\nAbout That Life\nAngel of Death\nHoly Wars","Select","Cancel");
  45. }
  46. if(listitem == 1)
  47. {
  48. ShowPlayerDialog(playerid,3,DIALOG_STYLE_LIST ,"Rock","Saviour","Select","Cancel");
  49. }
  50. if(listitem == 2)
  51. {
  52. ShowPlayerDialog(playerid,4,DIALOG_STYLE_LIST ,"Rap/Hip Hop","I Gave You Power","Select","Cancel");
  53. }
  54. }
  55. }
  56. if(dialogid == 2)
  57. {
  58. if(response)
  59. {
  60. if(listitem == 0)
  61. {
  62. PlayAudioStreamForPlayer(playerid, "http://a.tumblr.com/tumblr_mkejr7acEm1rbuu02o1.mp3");
  63. GameTextForPlayer(playerid, "~r~The Death of Me ~y~- ~g~Asking Alexandria",5000,1);
  64. }
  65. if(listitem == 1)
  66. {
  67. PlayAudioStreamForPlayer(playerid, "http://tegos.ru/mp3_rus/rock/Rammstein_-_America.mp3");
  68. GameTextForPlayer(playerid, "~r~Amerika ~y~- ~g~Rammstein",5000,1);
  69. }
  70. if(listitem == 2)
  71. {
  72. PlayAudioStreamForPlayer(playerid, "http://a.tumblr.com/tumblr_mnbxv7yrvj1qkcrqbo1.mp3");
  73. GameTextForPlayer(playerid, "~r~About That Life ~y~- ~g~Attila",5000,1);
  74. }
  75. if(listitem == 3)
  76. {
  77. PlayAudioStreamForPlayer(playerid, "http://reviewstalker.com/wp-content/uploads/2013/01/01-Angel-Of-Death.mp3");
  78. GameTextForPlayer(playerid, "~r~Angel of Death ~y~- ~g~Slayer",5000,1);
  79. }
  80. if(listitem == 4)
  81. {
  82. PlayAudioStreamForPlayer(playerid, "http://a.tumblr.com/tumblr_m59mdoQcX41r44txlo1.mp3");
  83. GameTextForPlayer(playerid, "~r~Holy Wars ~y~- ~g~Megadeth",5000,1);
  84. }
  85. }
  86. }
  87. if(dialogid == 3)
  88. {
  89. if(response)
  90. {
  91. if(listitem == 0)
  92. {
  93. PlayAudioStreamForPlayer(playerid, "http://a.tumblr.com/tumblr_luveoraytg1qg9louo1.mp3");
  94. GameTextForPlayer(playerid, "~r~Saviour ~y~- ~g~Rise Against",5000,1);
  95. }
  96. }
  97. }
  98. if(dialogid == 4)
  99. {
  100. if(response)
  101. {
  102. if(listitem == 0)
  103. {
  104. PlayAudioStreamForPlayer(playerid, "http://n2.vmuzike.net/music/Nas/I_Gave_You_Power.mp3");
  105. GameTextForPlayer(playerid, "~r~I Gave You Power ~y~- ~g~Nas",5000,1);
  106. }
  107. }
  108. }
  109. return 1;
  110. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement