Advertisement
Guest User

Youtube Music By RandomDude Dialog Version

a guest
Apr 21st, 2013
497
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.81 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. #include <a_samp>
  27. #include <zcmd>
  28.  
  29. #define ORANGE 0xFF9933AA
  30. #define Dialog_Music 123
  31. #define Dialog_WizKhalifa 7163
  32. #define Dialog_Lilwayne 9183
  33.  
  34. #if defined FILTERSCRIPT
  35.  
  36.  
  37. public OnFilterScriptInit()
  38. {
  39. print("\n--------------------------------------");
  40. print("Music System By RandomDude.");
  41. print("--------------------------------------\n");
  42. return 1;
  43. }
  44.  
  45. public OnFilterScriptExit()
  46. {
  47. return 1;
  48. }
  49.  
  50. #else
  51.  
  52. main()
  53. {
  54. print("\n----------------------------------");
  55. print(" Blank Gamemode by your name here");
  56. print("----------------------------------\n");
  57. }
  58.  
  59. #endif
  60. public OnPlayerRequestClass(playerid, classid)
  61. {
  62. SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
  63. SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
  64. SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
  65. return 1;
  66. }
  67.  
  68. public OnPlayerConnect(playerid)
  69. {
  70. return 1;
  71. }
  72.  
  73. public OnPlayerDisconnect(playerid, reason)
  74. {
  75. return 1;
  76. }
  77.  
  78. public OnPlayerSpawn(playerid)
  79. {
  80. return 1;
  81. }
  82.  
  83. public OnPlayerDeath(playerid, killerid, reason)
  84. {
  85. return 1;
  86. }
  87. public OnPlayerText(playerid, text[])
  88. {
  89. return 1;
  90. }
  91. CMD:music(playerid,params[])
  92. {
  93. ShowPlayerDialog(playerid,Dialog_Music,2,"Music [FS] By RandomDude.","Wiz Khalifa\nLiL Wayne\nRick Ross\nWale\n50 Cent\nTupac Shakur","Okay","Cancel");
  94. return 1;
  95. }
  96. CMD:stopmusic(playerid,params[])
  97. {
  98. YoutubeStopStreamForPlayer(playerid);
  99. return 1;
  100. }
  101. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  102. {
  103. if(dialogid == Dialog_Music)
  104. {
  105. if(response)
  106. {
  107. if(listitem==0)
  108. {
  109. 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");
  110. }
  111. if(listitem==1)
  112. {
  113. ShowPlayerDialog(playerid,Dialog_Lilwayne,2,"Music Thats By LiL Wayne","Love Me\nJohn\nDrop The World\nLolliPop\nShooter\nFireman","Okay","Cancel");
  114. }
  115. if(listitem==2)
  116. {
  117. SendClientMessage(playerid, ORANGE,"Change This To THE MUSIC DIALOG CREATE A NEW DIALOG HERE");
  118. }
  119. if(listitem==3)
  120. {
  121. SendClientMessage(playerid, ORANGE,"Change This To THE MUSIC DIALOG CREATE A NEW DIALOG HERE");
  122. }
  123. if(listitem==4)
  124. {
  125. SendClientMessage(playerid, ORANGE,"Change This To THE MUSIC DIALOG CREATE A NEW DIALOG HERE");
  126. }
  127. if(listitem==5)
  128. {
  129. SendClientMessage(playerid, ORANGE,"Change This To THE MUSIC DIALOG CREATE A NEW DIALOG HERE");
  130. }
  131. if(listitem==6)
  132. {
  133. SendClientMessage(playerid, ORANGE,"Change This To THE MUSIC DIALOG CREATE A NEW DIALOG HERE");
  134. }
  135. }
  136. }
  137. if(dialogid == Dialog_WizKhalifa)
  138. {
  139. if(response)
  140. {
  141. if(listitem==0)
  142. {
  143. YoutubeStreamForPlayer(playerid,"http://www.youtube.com/watch?v=IJn-EHd7VeU");
  144. SendClientMessage(playerid,ORANGE,"Please wait a few seconds if your track does not turn on.");
  145. }
  146. if(listitem==1)
  147. {
  148. YoutubeStreamForPlayer(playerid,"http://www.youtube.com/watch?v=UePtoxDhJSw");
  149. SendClientMessage(playerid,ORANGE,"Please wait a few seconds if your track does not turn on.");
  150. }
  151. if(listitem==2)
  152. {
  153. YoutubeStreamForPlayer(playerid,"http://www.youtube.com/watch?v=UhQz-0QVmQ0");
  154. SendClientMessage(playerid,ORANGE,"Please wait a few seconds if your track does not turn on.");
  155. }
  156. if(listitem==3)
  157. {
  158. YoutubeStreamForPlayer(playerid,"http://www.youtube.com/watch?v=TWHNr0BrNgo");
  159. SendClientMessage(playerid,ORANGE,"Please wait a few seconds if your track does not turn on.");
  160. }
  161. if(listitem==4)
  162. {
  163. YoutubeStreamForPlayer(playerid,"http://www.youtube.com/watch?v=Wa5B22KAkEk");
  164. SendClientMessage(playerid,ORANGE,"Please wait a few seconds if your track does not turn on.");
  165. }
  166. if(listitem==5)
  167. {
  168. YoutubeStreamForPlayer(playerid,"http://www.youtube.com/watch?v=hmP7TYtDVUU");
  169. SendClientMessage(playerid,ORANGE,"Please wait a few seconds if your track does not turn on.");
  170. }
  171. }
  172. }
  173. if(dialogid == Dialog_Lilwayne)
  174. {
  175. if(response)
  176. {
  177. if(listitem==0)
  178. {
  179. YoutubeStreamForPlayer(playerid,"http://www.youtube.com/watch?v=KY44zvhWhp4");
  180. SendClientMessage(playerid,ORANGE,"Please wait a few seconds if your track does not turn on.");
  181. }
  182. if(listitem==1)
  183. {
  184. YoutubeStreamForPlayer(playerid,"http://www.youtube.com/watch?v=3fumBcKC6RE");
  185. SendClientMessage(playerid,ORANGE,"Please wait a few seconds if your track does not turn on.");
  186. }
  187. if(listitem==2)
  188. {
  189. YoutubeStreamForPlayer(playerid,"http://www.youtube.com/watch?v=ErCAOMi5EGM");
  190. SendClientMessage(playerid,ORANGE,"Please wait a few seconds if your track does not turn on.");
  191. }
  192. if(listitem==3)
  193. {
  194. YoutubeStreamForPlayer(playerid,"http://www.youtube.com/watch?v=2IH8tNQAzSs");
  195. SendClientMessage(playerid,ORANGE,"Please wait a few seconds if your track does not turn on.");
  196. }
  197. if(listitem==4)
  198. {
  199. YoutubeStreamForPlayer(playerid,"http://www.youtube.com/watch?v=5ibeIqOv1ww");
  200. SendClientMessage(playerid,ORANGE,"Please wait a few seconds if your track does not turn on.");
  201. }
  202. if(listitem==5)
  203. {
  204. YoutubeStreamForPlayer(playerid,"http://www.youtube.com/watch?v=7y0ChoYgSek");
  205. SendClientMessage(playerid,ORANGE,"Please wait a few seconds if your track does not turn on.");
  206. }
  207. }
  208. }
  209. return 1;
  210. }
  211. stock YoutubeStreamForPlayer(playerid, vlink[])
  212. {
  213. new videoid[128], mp3link[128];
  214. strmid(videoid,vlink,strfind(vlink,"v=")+2,strfind(vlink,"v=")+15);
  215. format(mp3link, 128, "http://mwrserver.com/youtube.php?videoid=%s", videoid);
  216. PlayAudioStreamForPlayer(playerid,mp3link);
  217. return 1;
  218. }
  219. stock YoutubeStreamForAll(vlink[])
  220. {
  221. new videoid[128], mp3link[128];
  222. strmid(videoid,vlink,strfind(vlink,"v=")+2,strfind(vlink,"v=")+15);
  223. format(mp3link, 128, "http://mwrserver.com/youtube.php?videoid=%s", videoid);
  224. for(new i=0;i<MAX_PLAYERS;i++) PlayAudioStreamForPlayer(i,mp3link);
  225. return 1;
  226. }
  227. stock YoutubeStopStreamForAll()
  228. {
  229. for(new i=0;i<MAX_PLAYERS;i++) StopAudioStreamForPlayer(i);
  230. return 1;
  231. }
  232. stock YoutubeStopStreamForPlayer(playerid)
  233. {
  234. StopAudioStreamForPlayer(playerid);
  235. return 1;
  236. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement