Guest User

Music System By NeXoR

a guest
Jul 4th, 2013
646
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.34 KB | None | 0 0
  1.  
  2. #include <a_samp>
  3. #include <a_players>
  4.  
  5. public OnFilterScriptInit()
  6. {
  7. print("\n--------------------------------------");
  8. print(" Music System By NeXoR");
  9. print("--------------------------------------\n");
  10. return 1;
  11. }
  12.  
  13. public OnFilterScriptExit()
  14. {
  15. print("\n--------------------------------------");
  16. print(" Music System By NeXoR");
  17. print("--------------------------------------\n");
  18. return true;
  19. }
  20.  
  21.  
  22. public OnPlayerCommandText(playerid, cmdtext[])
  23. {
  24. if (strcmp("/music", cmdtext, true, 10) == 0)
  25. {
  26. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0x00ff99ff, "{FF0000}This command can be used only for RCON Administrators.");
  27. ShowPlayerDialog(playerid,17,DIALOG_STYLE_LIST,"Music System By NeXoR.","PSY - Gentleman\nPSY - Gangnam Style\nGusttavo Lima - Balada Boa\nMichel Telo - Bara Bara Bara\nMacklemore - Thrift Shop\nFlo Rida - Whistle\nFlo Rida - Wild Ones\nDon Omar - Danza Kudro\nPitbull - International Love\nWill I Am - Scream and Shout\nStromae - Alors On Dance\nDavid Guetta - She Wolf","Play","Cancel");
  28. }
  29.  
  30. if(strcmp(cmdtext,"/StopMusic",true)==0) return StopAudioStreamForPlayer(playerid);
  31.  
  32. if(!strcmp(cmdtext, "/gentleman", true))
  33. {
  34. new string[256];
  35. for(new i; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i))
  36. PlayAudioStreamForPlayer(i,"http://k002.kiwi6.com/hotlink/l1245bz226/psy_-_gentleman.mp3");
  37. format(string,sizeof(string),"{FF0000} AudioStream : The Administrator %s Started the global playback of the song : Gentleman",GetName(playerid));
  38. SendClientMessageToAll(0xFFFF00C8,string);
  39. return 1;
  40. }
  41.  
  42. if(!strcmp(cmdtext, "/balada", true))
  43. {
  44. new string[256];
  45. for(new i; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i))
  46. PlayAudioStreamForPlayer(i,"http://k002.kiwi6.com/hotlink/80tujm46k7/gustavo_lima_-_balada_boa_tcherere_tch_tch_.mp3");
  47. format(string,sizeof(string),"{FF0000} AudioStream : The Administrator %s Started the global playback of the song : Balada Boa",GetName(playerid));
  48. SendClientMessageToAll(0xFFFF00C8,string);
  49. return 1;
  50. }
  51.  
  52. if(!strcmp(cmdtext, "/bara", true))
  53. {
  54. new string[256];
  55. for(new i; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i))
  56. PlayAudioStreamForPlayer(i,"http://k002.kiwi6.com/hotlink/ub9ck140qm/michel_telo_bara_bara_bere_bere_2012_hd.mp3");
  57. format(string,sizeof(string),"{FF0000} AudioStream : The Administrator %s Started the global playback of the song : Bara Bara Bara",GetName(playerid));
  58. SendClientMessageToAll(0xFFFF00C8,string);
  59. return 1;
  60. }
  61.  
  62. if(!strcmp(cmdtext, "/thrift", true))
  63. {
  64. new string[256];
  65. for(new i; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i))
  66. PlayAudioStreamForPlayer(i,"http://k002.kiwi6.com/hotlink/tzaafx7yiy/macklemore_-_thrift_shop_ft._wanz_lyrics.mp3");
  67. format(string,sizeof(string),"{FF0000} AudioStream : The Administrator %s Started the global playback of the song : Thrift Shop",GetName(playerid));
  68. SendClientMessageToAll(0xFFFF00C8,string);
  69. return 1;
  70. }
  71.  
  72. if(!strcmp(cmdtext, "/gangnam", true))
  73. {
  74. new string[256];
  75. for(new i; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i))
  76. PlayAudioStreamForPlayer(i,"http://k007.kiwi6.com/hotlink/tewzvg24y7/psy_-_gangnam_style_-----_m_v.mp3");
  77. format(string,sizeof(string),"{FF0000} AudioStream : The Administrator %s Started the global playback of the song : Gangnam Style",GetName(playerid));
  78. SendClientMessageToAll(0xFFFF00C8,string);
  79. return 1;
  80. }
  81.  
  82. if(!strcmp(cmdtext, "/whistle", true))
  83. {
  84. new string[256];
  85. for(new i; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i))
  86. PlayAudioStreamForPlayer(i,"http://k002.kiwi6.com/hotlink/envtg6c3gp/flo_rida_-_whistle_official_video_.mp3");
  87. format(string,sizeof(string),"{FF0000} AudioStream : The Administrator %s Started the global playback of the song : Whistle",GetName(playerid));
  88. SendClientMessageToAll(0xFFFF00C8,string);
  89. return 1;
  90. }
  91.  
  92. if(!strcmp(cmdtext, "/wild", true))
  93. {
  94. new string[256];
  95. for(new i; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i))
  96. PlayAudioStreamForPlayer(i,"http://k002.kiwi6.com/hotlink/pbsga714fz/flo_rida_-_wild_ones_ft._sia_official_v.mp3");
  97. format(string,sizeof(string),"{FF0000} AudioStream : The Administrator %s Started the global playback of the song : Wild Ones",GetName(playerid));
  98. SendClientMessageToAll(0xFFFF00C8,string);
  99. return 1;
  100. }
  101.  
  102. if(!strcmp(cmdtext, "/danza", true))
  103. {
  104. new string[256];
  105. for(new i; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i))
  106. PlayAudioStreamForPlayer(i,"http://k007.kiwi6.com/hotlink/02i5m92ryr/don_omar_-_danza_kuduro_ft._lucenzo.mp3");
  107. format(string,sizeof(string),"{FF0000} AudioStream : The Administrator %s Started the global playback of the song : Danza Kudro",GetName(playerid));
  108. SendClientMessageToAll(0xFFFF00C8,string);
  109. return 1;
  110. }
  111.  
  112. if(!strcmp(cmdtext, "/ilove", true))
  113. {
  114. new string[256];
  115. for(new i; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i))
  116. PlayAudioStreamForPlayer(i,"http://k007.kiwi6.com/hotlink/1pl0qb910r/pitbull_featuring_chris_brown_-_international_love.mp3");
  117. format(string,sizeof(string),"{FF0000} AudioStream : The Administrator %s Started the global playback of the song : International Love",GetName(playerid));
  118. SendClientMessageToAll(0xFFFF00C8,string);
  119. return 1;
  120. }
  121.  
  122. if(!strcmp(cmdtext, "/scream", true))
  123. {
  124. new string[256];
  125. for(new i; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i))
  126. PlayAudioStreamForPlayer(i,"http://k002.kiwi6.com/hotlink/1f4fr5l5bp/will.i.am_-_scream_and_amp_shout_ft._britn.mp3");
  127. format(string,sizeof(string),"{FF0000} AudioStream : The Administrator %s Started the global playback of the song : Scream And Shout",GetName(playerid));
  128. SendClientMessageToAll(0xFFFF00C8,string);
  129. return 1;
  130. }
  131.  
  132. if(!strcmp(cmdtext, "/alors", true))
  133. {
  134. new string[256];
  135. for(new i; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i))
  136. PlayAudioStreamForPlayer(i,"http://k007.kiwi6.com/hotlink/8c99e3soi6/stromae_-_alors_on_danse.mp3");
  137. format(string,sizeof(string),"{FF0000} AudioStream : The Administrator %s Started the global playback of the song : Alos On Dance",GetName(playerid));
  138. SendClientMessageToAll(0xFFFF00C8,string);
  139. return 1;
  140. }
  141.  
  142. if(!strcmp(cmdtext, "/wolf", true))
  143. {
  144. new string[256];
  145. for(new i; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i))
  146. PlayAudioStreamForPlayer(i,"http://k007.kiwi6.com/hotlink/3nw737vr3w/david_guetta_-_she_wolf_falling_to_piec.mp3");
  147. format(string,sizeof(string),"{FF0000} AudioStream : The Administrator %s Started the global playback of the song : She Wolf",GetName(playerid));
  148. SendClientMessageToAll(0xFFFF00C8,string);
  149. return 1;
  150. }
  151. return 1;
  152. }
  153.  
  154. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  155. {
  156. if(dialogid == 17 && response)
  157. {
  158. switch(listitem)
  159. {
  160. case 0:{
  161. OnPlayerCommandText(playerid,"/gentleman");
  162. }case 1:{
  163. OnPlayerCommandText(playerid,"/gangnam");
  164. }case 2:{
  165. OnPlayerCommandText(playerid,"/balada");
  166. }case 3:{
  167. OnPlayerCommandText(playerid,"/bara");
  168. }case 4:{
  169. OnPlayerCommandText(playerid,"/thrift");
  170. }case 5:{
  171. OnPlayerCommandText(playerid,"/whistle");
  172. }case 6:{
  173. OnPlayerCommandText(playerid,"/wild");
  174. }case 7:{
  175. OnPlayerCommandText(playerid,"/danza");
  176. }case 8:{
  177. OnPlayerCommandText(playerid,"/ilove");
  178. }case 9:{
  179. OnPlayerCommandText(playerid,"/scream");
  180. }case 10:{
  181. OnPlayerCommandText(playerid,"/alors");
  182. }case 11:{
  183. OnPlayerCommandText(playerid,"/wolf");
  184. }
  185.  
  186. }
  187. return 1;
  188. }
  189. return 1;
  190. }
  191.  
  192.  
  193. stock GetName(playerid)
  194. {
  195. new name[MAX_PLAYER_NAME];
  196. GetPlayerName(playerid, name, sizeof(name));
  197. return name;
  198. }
Advertisement
Add Comment
Please, Sign In to add comment