Advertisement
Guest User

Youtube Music System By RandomDude

a guest
Apr 24th, 2013
261
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.33 KB | None | 0 0
  1. /*==============================================================================
  2. | Music System By RandomDude. |
  3. | Keep My Credits |
  4. | Enjoy! |
  5. | LOL |
  6. ==============================================================================*/
  7. /*
  8. Music-
  9.  
  10. Wiz Khalifa-
  11. Let It Go
  12. Black And Yellow
  13. Roll Up
  14. Work Hard Play Hard
  15. Wild and Free
  16. On My Level
  17.  
  18. Lil Wayne-
  19. Love Me
  20. John
  21. Drop The World
  22. LolliPop
  23. Shooter
  24. Fireman
  25.  
  26. Rick Ross-
  27. Don't Kill My Vibe
  28. Numb
  29. Bugatti
  30. Hustlin'
  31. Hold Me Back
  32. Push It
  33. */
  34. #include <a_samp>
  35. #include <zcmd>
  36.  
  37. #define ORANGE 0xFF9933AA
  38. #define Dialog_Music 123
  39. #define Dialog_WizKhalifa 7163
  40. #define Dialog_Lilwayne 9183
  41. #define Dialog_Rickross 6412
  42.  
  43. #if defined FILTERSCRIPT
  44.  
  45.  
  46. public OnFilterScriptInit()
  47. {
  48. print("\n--------------------------------------");
  49. print("Music System By RandomDude.");
  50. print("--------------------------------------\n");
  51. return 1;
  52. }
  53.  
  54. public OnFilterScriptExit()
  55. {
  56. return 1;
  57. }
  58.  
  59. #else
  60.  
  61. main()
  62. {
  63. print("\n----------------------------------");
  64. print(" Blank Gamemode by your name here");
  65. print("----------------------------------\n");
  66. }
  67.  
  68. #endif
  69. public OnPlayerRequestClass(playerid, classid)
  70. {
  71. SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
  72. SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
  73. SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
  74. return 1;
  75. }
  76.  
  77. public OnPlayerConnect(playerid)
  78. {
  79. return 1;
  80. }
  81.  
  82. public OnPlayerDisconnect(playerid, reason)
  83. {
  84. return 1;
  85. }
  86.  
  87. public OnPlayerSpawn(playerid)
  88. {
  89. return 1;
  90. }
  91.  
  92. public OnPlayerDeath(playerid, killerid, reason)
  93. {
  94. return 1;
  95. }
  96. public OnPlayerText(playerid, text[])
  97. {
  98. return 1;
  99. }
  100. CMD:music(playerid,params[])
  101. {
  102. ShowPlayerDialog(playerid,Dialog_Music,2,"Music [FS] By RandomDude.","Wiz Khalifa\nLiL Wayne\nRick Ross\nWale\n50 Cent\nTupac Shakur","Okay","Cancel");
  103. return 1;
  104. }
  105. CMD:stopmusic(playerid,params[])
  106. {
  107. YoutubeStopStreamForPlayer(playerid);
  108. return 1;
  109. }
  110. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  111. {
  112. if(dialogid == Dialog_Music)
  113. {
  114. if(response)
  115. {
  116. if(listitem==0)
  117. {
  118. ShowPlayerDialog(playerid,Dialog_WizKhalifa,2,"Music Thats By Wiz Khalifa","Let It Go\nBlack And Yellow\nRoll Up\nWork Hard Play Hard\nWild and Free\nOn My Level","Okay","Cancel");
  119. }
  120. if(listitem==1)
  121. {
  122. ShowPlayerDialog(playerid,Dialog_Lilwayne,2,"Music Thats By LiL Wayne","Love Me\nJohn\nDrop The World\nLolliPop\nShooter\nFireman","Okay","Cancel");
  123. }
  124. if(listitem==2)
  125. {
  126. ShowPlayerDialog(playerid,Dialog_Rickross,2,"Music Thats By Rick Ross","Don't Kill My Vibe\nNumb\nBugatti\nHustlin'\nHold Me Back\nPush It","Okay","Cancel");
  127. }
  128. if(listitem==3)
  129. {
  130. SendClientMessage(playerid, ORANGE,"Change This To THE MUSIC DIALOG CREATE A NEW DIALOG HERE");
  131. }
  132. if(listitem==4)
  133. {
  134. SendClientMessage(playerid, ORANGE,"Change This To THE MUSIC DIALOG CREATE A NEW DIALOG HERE");
  135. }
  136. if(listitem==5)
  137. {
  138. SendClientMessage(playerid, ORANGE,"Change This To THE MUSIC DIALOG CREATE A NEW DIALOG HERE");
  139. }
  140. if(listitem==6)
  141. {
  142. SendClientMessage(playerid, ORANGE,"Change This To THE MUSIC DIALOG CREATE A NEW DIALOG HERE");
  143. }
  144. }
  145. }
  146. if(dialogid == Dialog_WizKhalifa)
  147. {
  148. if(response)
  149. {
  150. if(listitem==0)
  151. {
  152. YoutubeStreamForPlayer(playerid,"http://www.youtube.com/watch?v=IJn-EHd7VeU");
  153. SendClientMessage(playerid,ORANGE,"Please wait a few seconds if your track does not turn on.");
  154. }
  155. if(listitem==1)
  156. {
  157. YoutubeStreamForPlayer(playerid,"http://www.youtube.com/watch?v=UePtoxDhJSw");
  158. SendClientMessage(playerid,ORANGE,"Please wait a few seconds if your track does not turn on.");
  159. }
  160. if(listitem==2)
  161. {
  162. YoutubeStreamForPlayer(playerid,"http://www.youtube.com/watch?v=UhQz-0QVmQ0");
  163. SendClientMessage(playerid,ORANGE,"Please wait a few seconds if your track does not turn on.");
  164. }
  165. if(listitem==3)
  166. {
  167. YoutubeStreamForPlayer(playerid,"http://www.youtube.com/watch?v=TWHNr0BrNgo");
  168. SendClientMessage(playerid,ORANGE,"Please wait a few seconds if your track does not turn on.");
  169. }
  170. if(listitem==4)
  171. {
  172. YoutubeStreamForPlayer(playerid,"http://www.youtube.com/watch?v=Wa5B22KAkEk");
  173. SendClientMessage(playerid,ORANGE,"Please wait a few seconds if your track does not turn on.");
  174. }
  175. if(listitem==5)
  176. {
  177. YoutubeStreamForPlayer(playerid,"http://www.youtube.com/watch?v=hmP7TYtDVUU");
  178. SendClientMessage(playerid,ORANGE,"Please wait a few seconds if your track does not turn on.");
  179. }
  180. }
  181. }
  182. if(dialogid == Dialog_Lilwayne)
  183. {
  184. if(response)
  185. {
  186. if(listitem==0)
  187. {
  188. YoutubeStreamForPlayer(playerid,"http://www.youtube.com/watch?v=KY44zvhWhp4");
  189. SendClientMessage(playerid,ORANGE,"Please wait a few seconds if your track does not turn on.");
  190. }
  191. if(listitem==1)
  192. {
  193. YoutubeStreamForPlayer(playerid,"http://www.youtube.com/watch?v=3fumBcKC6RE");
  194. SendClientMessage(playerid,ORANGE,"Please wait a few seconds if your track does not turn on.");
  195. }
  196. if(listitem==2)
  197. {
  198. YoutubeStreamForPlayer(playerid,"http://www.youtube.com/watch?v=ErCAOMi5EGM");
  199. SendClientMessage(playerid,ORANGE,"Please wait a few seconds if your track does not turn on.");
  200. }
  201. if(listitem==3)
  202. {
  203. YoutubeStreamForPlayer(playerid,"http://www.youtube.com/watch?v=2IH8tNQAzSs");
  204. SendClientMessage(playerid,ORANGE,"Please wait a few seconds if your track does not turn on.");
  205. }
  206. if(listitem==4)
  207. {
  208. YoutubeStreamForPlayer(playerid,"http://www.youtube.com/watch?v=5ibeIqOv1ww");
  209. SendClientMessage(playerid,ORANGE,"Please wait a few seconds if your track does not turn on.");
  210. }
  211. if(listitem==5)
  212. {
  213. YoutubeStreamForPlayer(playerid,"http://www.youtube.com/watch?v=7y0ChoYgSek");
  214. SendClientMessage(playerid,ORANGE,"Please wait a few seconds if your track does not turn on.");
  215. }
  216. }
  217. }
  218. if(dialogid == Dialog_Rickross)
  219. {
  220. if(response)
  221. {
  222. if(listitem==0)
  223. {
  224. YoutubeStreamForPlayer(playerid,"https://www.youtube.com/watch?v=5vyLvBBbtMo");
  225. SendClientMessage(playerid,ORANGE,"Please wait a few seconds if your track does not turn on.");
  226. }
  227. if(listitem==1)
  228. {
  229. YoutubeStreamForPlayer(playerid,"https://www.youtube.com/watch?v=ZO_YmLbHTc8");
  230. SendClientMessage(playerid,ORANGE,"Please wait a few seconds if your track does not turn on.");
  231. }
  232. if(listitem==2)
  233. {
  234. YoutubeStreamForPlayer(playerid,"https://www.youtube.com/watch?v=djE-BLrdDDc");
  235. SendClientMessage(playerid,ORANGE,"Please wait a few seconds if your track does not turn on.");
  236. }
  237. if(listitem==3)
  238. {
  239. YoutubeStreamForPlayer(playerid,"http://www.youtube.com/watch?v=JU9TouRnO84");
  240. SendClientMessage(playerid,ORANGE,"Please wait a few seconds if your track does not turn on.");
  241. }
  242. if(listitem==4)
  243. {
  244. YoutubeStreamForPlayer(playerid,"http://www.youtube.com/watch?v=HVO5WhIm4uI");
  245. SendClientMessage(playerid,ORANGE,"Please wait a few seconds if your track does not turn on.");
  246. }
  247. if(listitem==5)
  248. {
  249. YoutubeStreamForPlayer(playerid,"http://www.youtube.com/watch?v=qk2jeE1LOn8");
  250. SendClientMessage(playerid,ORANGE,"Please wait a few seconds if your track does not turn on.");
  251. }
  252. }
  253. }
  254. return 1;
  255. }
  256. stock YoutubeStreamForPlayer(playerid, vlink[])
  257. {
  258. new videoid[128], mp3link[128];
  259. strmid(videoid,vlink,strfind(vlink,"v=")+2,strfind(vlink,"v=")+15);
  260. format(mp3link, 128, "http://mwrserver.com/youtube.php?videoid=%s", videoid);
  261. PlayAudioStreamForPlayer(playerid,mp3link);
  262. return 1;
  263. }
  264. stock YoutubeStreamForAll(vlink[])
  265. {
  266. new videoid[128], mp3link[128];
  267. strmid(videoid,vlink,strfind(vlink,"v=")+2,strfind(vlink,"v=")+15);
  268. format(mp3link, 128, "http://mwrserver.com/youtube.php?videoid=%s", videoid);
  269. for(new i=0;i<MAX_PLAYERS;i++) PlayAudioStreamForPlayer(i,mp3link);
  270. return 1;
  271. }
  272. stock YoutubeStopStreamForAll()
  273. {
  274. for(new i=0;i<MAX_PLAYERS;i++) StopAudioStreamForPlayer(i);
  275. return 1;
  276. }
  277. stock YoutubeStopStreamForPlayer(playerid)
  278. {
  279. StopAudioStreamForPlayer(playerid);
  280. return 1;
  281. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement