Advertisement
Guest User

Youtube Streamer FILTERSCRIPT

a guest
Apr 21st, 2013
1,256
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.50 KB | None | 0 0
  1. /*==============================================================================
  2. | Music System By RandomDude. |
  3. | Keep My Credits |
  4. | Enjoy! |
  5. | LOL |
  6. ==============================================================================*/
  7. #include <a_samp>
  8. #include <zcmd>
  9.  
  10. #define ORANGE 0xFF9933AA
  11. #define RED 0xAA3333AA
  12.  
  13.  
  14. #if defined FILTERSCRIPT
  15.  
  16.  
  17. public OnFilterScriptInit()
  18. {
  19. print("\n--------------------------------------");
  20. print("Music System By RandomDude.");
  21. print("--------------------------------------\n");
  22. return 1;
  23. }
  24.  
  25. public OnFilterScriptExit()
  26. {
  27. return 1;
  28. }
  29.  
  30. #else
  31.  
  32. #endif
  33.  
  34. public OnPlayerSpawn(playerid)
  35. {
  36. SendClientMessage(playerid,ORANGE,"[UPDATION]/musiccmds for music commands!");
  37. return 1;
  38. }
  39.  
  40. public OnPlayerDeath(playerid, killerid, reason)
  41. {
  42. SendClientMessage(playerid,ORANGE,"Don't Worry The Music is still playing.");
  43. return 1;
  44. }
  45. public OnPlayerText(playerid, text[])
  46. {
  47. return 1;
  48. }
  49. CMD:musiccmds(playerid,params[])
  50. {
  51. SendClientMessage(playerid,ORANGE,"Songs By Wiz Khalifa! Let It Go-/letigo. Black And Yellow-/blackyellow. Roll Up-/rollup Work Hard Play Hard-/Work");
  52. SendClientMessage(playerid,ORANGE,"Wild and Free-/wild. On My Level-/onmylevel.");
  53. return 1;
  54. }
  55. CMD:stopmusic(playerid,params[])
  56. {
  57. YoutubeStopStreamForPlayer(playerid);
  58. return 1;
  59. }
  60. //=======================================MUSIC COMMANDS FOR IN GAME FOR WIZ KHALIFA========================================
  61. CMD:letitgo(playerid,params[])
  62. {
  63. StreamA(playerid);
  64. SendClientMessage(playerid,ORANGE,"Let It Go By Wiz Khalifa will start in a few seconds.");
  65. SendClientMessage(playerid,RED,"If you are going to leave the server and have music playing you will crash /stopmusic before you leave");
  66. return 1;
  67. }
  68. CMD:blackyellow(playerid,params[])
  69. {
  70. StreamB(playerid);
  71. SendClientMessage(playerid,ORANGE,"Black and Yellow by Wiz Khalifa will start in a few seconds.");
  72. SendClientMessage(playerid,RED,"If you are going to leave the server and have music playing you will crash /stopmusic before you leave");
  73. return 1;
  74. }
  75. CMD:rollup(playerid,params[])
  76. {
  77. StreamC(playerid);
  78. SendClientMessage(playerid,ORANGE,"Roll Up by Wiz Khalifa will start in a few seconds.");
  79. SendClientMessage(playerid,RED,"If you are going to leave the server and have music playing you will crash /stopmusic before you leave");
  80. return 1;
  81. }
  82. CMD:work(playerid,params[])
  83. {
  84. StreamD(playerid);
  85. SendClientMessage(playerid,ORANGE,"Work Hard Play Hard by Wiz Khalifa will start in a few seconds.");
  86. SendClientMessage(playerid,RED,"If you are going to leave the server and have music playing you will crash /stopmusic before you leave");
  87. return 1;
  88. }
  89. CMD:wild(playerid,params[])
  90. {
  91. StreamE(playerid);
  92. SendClientMessage(playerid,ORANGE,"Wild and Free by Wiz Khalifa will start in a few seconds.");
  93. SendClientMessage(playerid,RED,"If you are going to leave the server and have music playing you will crash /stopmusic before you leave");
  94. return 1;
  95. }
  96. CMD:onmylevel(playerid,params[])
  97. {
  98. StreamF(playerid);
  99. SendClientMessage(playerid,ORANGE,"On My Level by Wiz Khalifa will start in a few seconds.");
  100. SendClientMessage(playerid,RED,"If you are going to leave the server and have music playing you will crash /stopmusic before you leave");
  101. return 1;
  102. }
  103. //=============================================================Streams For Wiz Khalifa================================================================================================================
  104. StreamA(playerid){
  105. YoutubeStreamForPlayer(playerid,"http://www.youtube.com/watch?v=IJn-EHd7VeU");
  106. SendClientMessage(playerid,0x55ffaaff,"Please wait a couple of seconds and the song will start also do not leave without typing /stopmusic because it pauses you on the esc menu if you don't.");
  107. return 1;
  108. }
  109. StreamB(playerid){
  110. YoutubeStreamForPlayer(playerid,"http://www.youtube.com/watch?v=UePtoxDhJSw");
  111. SendClientMessage(playerid,0x55ffaaff,"Please wait a couple of seconds and the song will start also do not leave without typing /stopmusic because it pauses you on the esc menu if you don't.");
  112. return 1;
  113. }
  114. StreamC(playerid){
  115. YoutubeStreamForPlayer(playerid,"http://www.youtube.com/watch?v=UhQz-0QVmQ0");
  116. SendClientMessage(playerid,0x55ffaaff,"Please wait a couple of seconds and the song will start also do not leave without typing /stopmusic because it pauses you on the esc menu if you don't.");
  117. return 1;
  118. }
  119. StreamD(playerid){
  120. YoutubeStreamForPlayer(playerid,"http://www.youtube.com/watch?v=TWHNr0BrNgo");
  121. SendClientMessage(playerid,0x55ffaaff,"Please wait a couple of seconds and the song will start also do not leave without typing /stopmusic because it pauses you on the esc menu if you don't.");
  122. return 1;
  123. }
  124. StreamE(playerid){
  125. YoutubeStreamForPlayer(playerid,"http://www.youtube.com/watch?v=Wa5B22KAkEk");
  126. SendClientMessage(playerid,0x55ffaaff,"Please wait a couple of seconds and the song will start also do not leave without typing /stopmusic because it pauses you on the esc menu if you don't.");
  127. return 1;
  128. }
  129. StreamF(playerid){
  130. YoutubeStreamForPlayer(playerid,"http://www.youtube.com/watch?v=hmP7TYtDVUU");
  131. SendClientMessage(playerid,0x55ffaaff,"Please wait a couple of seconds and the song will start also do not leave without typing /stopmusic because it pauses you on the esc menu if you don't.");
  132. return 1;
  133. }
  134.  
  135. //===============================================Stocks For Streamer To Work===============================================
  136. stock YoutubeStreamForPlayer(playerid, vlink[])
  137. {
  138. new videoid[128], mp3link[128];
  139. strmid(videoid,vlink,strfind(vlink,"v=")+2,strfind(vlink,"v=")+15);
  140. format(mp3link, 128, "http://mwrserver.com/youtube.php?videoid=%s", videoid);
  141. PlayAudioStreamForPlayer(playerid,mp3link);
  142. return 1;
  143. }
  144. stock YoutubeStreamForAll(vlink[])
  145. {
  146. new videoid[128], mp3link[128];
  147. strmid(videoid,vlink,strfind(vlink,"v=")+2,strfind(vlink,"v=")+15);
  148. format(mp3link, 128, "http://mwrserver.com/youtube.php?videoid=%s", videoid);
  149. for(new i=0;i<MAX_PLAYERS;i++) PlayAudioStreamForPlayer(i,mp3link);
  150. return 1;
  151. }
  152. stock YoutubeStopStreamForAll()
  153. {
  154. for(new i=0;i<MAX_PLAYERS;i++)
  155. {
  156. StopAudioStreamForPlayer(i);
  157. }
  158. return 1;
  159. }
  160. stock YoutubeStopStreamForPlayer(playerid)
  161. {
  162. StopAudioStreamForPlayer(playerid);
  163. return 1;
  164. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement