Advertisement
joepryan

Music Player By KingyKings

Aug 3rd, 2012
404
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.35 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. #pragma tabsize 0
  4.  
  5. #if defined FILTERSCRIPT
  6.  
  7. #endif
  8. // You can add your own music.. Either replace what i have done or just add! :) add this to add extra \n[songname onto the dialog list
  9. // then copy and paste this
  10. //if(listitem == [add number ;D])
  11. // {
  12. // SendClientMessage(playerid, 0x00FF0000, "[song] Is Now Playing Type /stop to stop it.");
  13. // PlayAudioStreamForPlayer(playerid, "SONG URL");
  14. // }
  15. // onto the bottom, which then you can change the Listitem number to the running number.. i guess you will figure it out! enjoy! :)
  16. public OnPlayerConnect(playerid)
  17. {
  18. return 1;
  19. }
  20.  
  21. public OnPlayerCommandText(playerid, cmdtext[])
  22. {
  23. if (strcmp("/music", cmdtext, true, 10) == 0)
  24. {
  25. ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Music List","Airplanes B.o.B\nParty Rock Anthem\nForget You\nCar Theif\nPay Phone\nRussian Roulette\nWow Wow Wow\nBeyond The Sea","Play","Cancel");
  26. SendClientMessage(playerid,0x00FF0000,"(_[Music Player By KingyKings]_)");
  27. return 1;
  28. }
  29. if(!strcmp("/stop",cmdtext)){
  30. StopAudioStreamForPlayer(playerid);
  31. SendClientMessage(playerid,0x00FF0000,"(_[Music Stopped]_)");
  32. return 1;
  33. }
  34. return 0;
  35. }
  36.  
  37. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  38. {
  39. if(dialogid == 1)
  40. {
  41. if(response)
  42. {
  43. if(listitem == 0)
  44. {
  45. SendClientMessage(playerid, 0x00FF0000, "Airplanes B.o.B is Now Playing Type /stop to stop it.");
  46. PlayAudioStreamForPlayer(playerid, "http://www.michiganhiphop.com/wp-content/uploads/2010/04/BoB_feat_Eminem_Hayley_Williams-Airplanes_Part_2-MIHipHop2.mp3");
  47. }
  48. if(listitem == 1)
  49. {
  50. SendClientMessage(playerid, 0x00FF0000, "Party Rock Anthem Is Now Playing Type /stop to stop it.");
  51. PlayAudioStreamForPlayer(playerid, "http://www.jakesallstarkaraoke.com/media/LMFAO_-_Party_Rock_Anthem.mp3");
  52. }
  53. if(listitem == 2)
  54. {
  55. SendClientMessage(playerid, 0x00FF0000, "Forget you Is Now Playing Type /stop to stop it.");
  56. PlayAudioStreamForPlayer(playerid, "http://osbornemedia.com/files/Cee-Lo_Green_-_Forget_You.mp3");
  57. }
  58. if(listitem == 3)
  59. {
  60. SendClientMessage(playerid, 0x00FF0000, "Car Theif Is Now Playing Type /stop to stop it.");
  61. PlayAudioStreamForPlayer(playerid, "http://music.freeman-stat.us/bboys/Car_Thief.mp3");
  62. }
  63. if(listitem == 4)
  64. {
  65. SendClientMessage(playerid, 0x00FF0000, "Pay Phone Is Now Playing Type /stop to stop it.");
  66. PlayAudioStreamForPlayer(playerid, "http://a.tumblr.com/tumblr_m47kr6noTw1qddszxo1.mp3");
  67. }
  68. if(listitem == 5)
  69. {
  70. SendClientMessage(playerid, 0x00FF0000, "Russian Roulette Is Now Playing Type /stop to stop it.");
  71. PlayAudioStreamForPlayer(playerid, "http://www.raffaelebifulco.com/rb/home/content/mp3/Rihanna%20-%20Russian%20Roulette.mp3");
  72. }
  73. if(listitem == 6)
  74. {
  75. SendClientMessage(playerid, 0x00FF0000, "Wow Wow Wow Is Now Playing Type /stop to stop it.");
  76. PlayAudioStreamForPlayer(playerid, "http://www.djbroc.com/blog/rocspod1/wow.mp3");
  77. }
  78. if(listitem == 7)
  79. {
  80. SendClientMessage(playerid, 0x00FF0000, "Beyond the Sea is Now Playing Type /stop to stop it.");
  81. PlayAudioStreamForPlayer(playerid, "http://www.yorkshireentertainment.co.uk/downloads/mp3-short/Mike%20Brown%20VS%20mp3s/beyond_the_sea.mp3");
  82. return 1;
  83. }
  84. }
  85. }
  86. return 0;
  87. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement