Advertisement
Guest User

Youtube Music By RandomDude CMD Version

a guest
Apr 21st, 2013
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.64 KB | None | 0 0
  1.  
  2. #include <a_samp>
  3. #include <zcmd>
  4.  
  5. #define ORANGE 0xFF9933AA
  6. #define RED 0xAA3333AA
  7.  
  8.  
  9. #if defined FILTERSCRIPT
  10.  
  11.  
  12. public OnFilterScriptInit()
  13. {
  14. print("\n--------------------------------------");
  15. print("Music System By RandomDude.");
  16. print("--------------------------------------\n");
  17. return 1;
  18. }
  19.  
  20. public OnFilterScriptExit()
  21. {
  22. return 1;
  23. }
  24.  
  25. #else
  26.  
  27. #endif
  28.  
  29. public OnPlayerSpawn(playerid)
  30. {
  31. SendClientMessage(playerid,ORANGE,"[UPDATION]/musiccmds for music commands!");
  32. return 1;
  33. }
  34.  
  35. public OnPlayerDeath(playerid, killerid, reason)
  36. {
  37. SendClientMessage(playerid,ORANGE,"Don't Worry The Music is still playing.");
  38. return 1;
  39. }
  40. public OnPlayerText(playerid, text[])
  41. {
  42. return 1;
  43. }
  44. CMD:musiccmds(playerid,params[])
  45. {
  46. SendClientMessage(playerid,ORANGE,"Songs By Wiz Khalifa! Let It Go-/letigo. Black And Yellow-/blackyellow. Roll Up-/rollup Work Hard Play Hard-/Work");
  47. SendClientMessage(playerid,ORANGE,"Wild and Free-/wild. On My Level-/onmylevel.");
  48. return 1;
  49. }
  50. CMD:stopmusic(playerid,params[])
  51. {
  52. YoutubeStopStreamForPlayer(playerid);
  53. return 1;
  54. }
  55. //=======================================MUSIC COMMANDS FOR IN GAME FOR WIZ KHALIFA========================================
  56. CMD:letitgo(playerid,params[])
  57. {
  58. StreamA(playerid);
  59. SendClientMessage(playerid,ORANGE,"Let It Go By Wiz Khalifa will start in a few seconds.");
  60. SendClientMessage(playerid,RED,"If you are going to leave the server and have music playing you will crash /stopmusic before you leave");
  61. return 1;
  62. }
  63. CMD:blackyellow(playerid,params[])
  64. {
  65. StreamB(playerid);
  66. SendClientMessage(playerid,ORANGE,"Black and Yellow by Wiz Khalifa will start in a few seconds.");
  67. SendClientMessage(playerid,RED,"If you are going to leave the server and have music playing you will crash /stopmusic before you leave");
  68. return 1;
  69. }
  70. CMD:rollup(playerid,params[])
  71. {
  72. StreamC(playerid);
  73. SendClientMessage(playerid,ORANGE,"Roll Up by Wiz Khalifa will start in a few seconds.");
  74. SendClientMessage(playerid,RED,"If you are going to leave the server and have music playing you will crash /stopmusic before you leave");
  75. return 1;
  76. }
  77. CMD:work(playerid,params[])
  78. {
  79. StreamD(playerid);
  80. SendClientMessage(playerid,ORANGE,"Work Hard Play Hard by Wiz Khalifa will start in a few seconds.");
  81. SendClientMessage(playerid,RED,"If you are going to leave the server and have music playing you will crash /stopmusic before you leave");
  82. return 1;
  83. }
  84. CMD:wild(playerid,params[])
  85. {
  86. StreamE(playerid);
  87. SendClientMessage(playerid,ORANGE,"Wild and Free by Wiz Khalifa will start in a few seconds.");
  88. SendClientMessage(playerid,RED,"If you are going to leave the server and have music playing you will crash /stopmusic before you leave");
  89. return 1;
  90. }
  91. CMD:onmylevel(playerid,params[])
  92. {
  93. StreamF(playerid);
  94. SendClientMessage(playerid,ORANGE,"On My Level by Wiz Khalifa will start in a few seconds.");
  95. SendClientMessage(playerid,RED,"If you are going to leave the server and have music playing you will crash /stopmusic before you leave");
  96. return 1;
  97. }
  98. //====================================LIL WAYNE SONG COMMANDS==========================================================
  99. CMD:loveme(playerid,params[])
  100. {
  101. StreamG(playerid);
  102. return 1;
  103. }
  104. CMD:john(playerid,params[])
  105. {
  106. StreamH(playerid);
  107. return 1;
  108. }
  109. CMD:droptheworld(playerid,params[])
  110. {
  111. StreamI(playerid);
  112. return 1;
  113. }
  114. CMD:lollipop(playerid,params[])
  115. {
  116. StreamJ(playerid);
  117. return 1;
  118. }
  119. CMD:shooter(playerid,params[])
  120. {
  121. StreamK(playerid);
  122. return 1;
  123. }
  124. CMD:fireman(playerid,params[])
  125. {
  126. StreamL(playerid);
  127. return 1;
  128. }
  129. //=============================================================Streams For Wiz Khalifa================================================================================================================
  130. StreamA(playerid){
  131. YoutubeStreamForPlayer(playerid,"http://www.youtube.com/watch?v=IJn-EHd7VeU");
  132. 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.");
  133. return 1;
  134. }
  135. StreamB(playerid){
  136. YoutubeStreamForPlayer(playerid,"http://www.youtube.com/watch?v=UePtoxDhJSw");
  137. 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.");
  138. return 1;
  139. }
  140. StreamC(playerid){
  141. YoutubeStreamForPlayer(playerid,"http://www.youtube.com/watch?v=UhQz-0QVmQ0");
  142. 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.");
  143. return 1;
  144. }
  145. StreamD(playerid){
  146. YoutubeStreamForPlayer(playerid,"http://www.youtube.com/watch?v=TWHNr0BrNgo");
  147. 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.");
  148. return 1;
  149. }
  150. StreamE(playerid){
  151. YoutubeStreamForPlayer(playerid,"http://www.youtube.com/watch?v=Wa5B22KAkEk");
  152. 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.");
  153. return 1;
  154. }
  155. StreamF(playerid){
  156. YoutubeStreamForPlayer(playerid,"http://www.youtube.com/watch?v=hmP7TYtDVUU");
  157. 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.");
  158. return 1;
  159. }
  160. StreamG(playerid){
  161. YoutubeStreamForPlayer(playerid,"http://www.youtube.com/watch?v=KY44zvhWhp4"); //Love Me
  162. 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.");
  163. return 1;
  164. }
  165. //==========================================Streams for LiL Wayne=========================================================================================================================================
  166. StreamH(playerid){
  167. YoutubeStreamForPlayer(playerid,"http://www.youtube.com/watch?v=3fumBcKC6RE");//John
  168. 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.");
  169. return 1;
  170. }
  171. StreamI(playerid){
  172. YoutubeStreamForPlayer(playerid,"http://www.youtube.com/watch?v=ErCAOMi5EGM");//Drop The World
  173. 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.");
  174. return 1;
  175. }
  176. StreamJ(playerid){
  177. YoutubeStreamForPlayer(playerid,"http://www.youtube.com/watch?v=2IH8tNQAzSs");//LolliPop
  178. 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.");
  179. return 1;
  180. }
  181. StreamK(playerid){
  182. YoutubeStreamForPlayer(playerid,"http://www.youtube.com/watch?v=5ibeIqOv1ww");//Shooter
  183. 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.");
  184. return 1;
  185. }
  186. StreamL(playerid){
  187. YoutubeStreamForPlayer(playerid,"http://www.youtube.com/watch?v=7y0ChoYgSek");//Fireman
  188. 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.");
  189. return 1;
  190. }
  191.  
  192. //===============================================Stocks For Streamer To Work===============================================
  193. stock YoutubeStreamForPlayer(playerid, vlink[])
  194. {
  195. new videoid[128], mp3link[128];
  196. strmid(videoid,vlink,strfind(vlink,"v=")+2,strfind(vlink,"v=")+15);
  197. format(mp3link, 128, "http://mwrserver.com/youtube.php?videoid=%s", videoid);
  198. PlayAudioStreamForPlayer(playerid,mp3link);
  199. return 1;
  200. }
  201. stock YoutubeStreamForAll(vlink[])
  202. {
  203. new videoid[128], mp3link[128];
  204. strmid(videoid,vlink,strfind(vlink,"v=")+2,strfind(vlink,"v=")+15);
  205. format(mp3link, 128, "http://mwrserver.com/youtube.php?videoid=%s", videoid);
  206. for(new i=0;i<MAX_PLAYERS;i++) PlayAudioStreamForPlayer(i,mp3link);
  207. return 1;
  208. }
  209. stock YoutubeStopStreamForAll()
  210. {
  211. for(new i=0;i<MAX_PLAYERS;i++)
  212. {
  213. StopAudioStreamForPlayer(i);
  214. }
  215. return 1;
  216. }
  217. stock YoutubeStopStreamForPlayer(playerid)
  218. {
  219. StopAudioStreamForPlayer(playerid);
  220. return 1;
  221. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement