Advertisement
Guest User

Music Bot

a guest
Nov 3rd, 2016
682
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.51 KB | None | 0 0
  1. //==============================================================================
  2. // MUSIC BOT ZA SAMP SERVERE
  3. // UZIVAJTE !
  4. //==============================================================================
  5. //
  6. //==============================================================================
  7. #include <a_samp>
  8. #define SCM SendClientMessage
  9. #define R "{FF0000}" //CRVENA
  10. #define G "{00FF00}" //ZELENA
  11. #define Y "{EEEA00}" //ZUTA
  12. #define B "{00A7EE}" //PLAVA
  13. //============================= Ovde mozete mijenjati muziku kako ocete
  14. #define Music1 "http://k003.kiwi6.com/hotlink/ffnreb4gl0/MC_STOJAN_and_MR._BLACK_-_ZAGRLJAJ_COVER_.mp3"
  15. #define Music2 "http://k003.kiwi6.com/hotlink/x65h2u27h2/IN_VIVO_-_REMEK_DELO_OFFICIAL_VIDEO_.mp3"
  16. new MB;
  17.  
  18.  
  19. //==============================================================================
  20. public OnPlayerConnect(playerid)
  21. {
  22. //MusicBot(playerid); U koliko se desi da MB zabaga, i nece da se pokrene aktivirati ovo.
  23. }
  24. public OnFilterScriptInit()
  25. {
  26. print("Music bott je ucitan!");
  27. MB = SetTimer("MusicBot", 240000, 1); //Ovo je 4minute dovoljno da se pjesma zavrsi
  28. }
  29. public OnFilterScriptExit()
  30. {
  31. print("Music bot - Nije ucitan!");
  32. }
  33. public OnPlayerCommandText(playerid, cmdtext[])
  34. {
  35. if(!strcmp(cmdtext, "/stopmusicbot", true))
  36. {
  37. StopAudioStreamForPlayer(playerid);
  38. SCM(playerid, -1, ""R"Zaustavili ste "B"MusicBot-a"R".");
  39. SCM(playerid, -1, "Ako zelite ponovo da pustitie MusicBot-a, koristite "R"/startmusicbot");
  40. KillTimer(MB);
  41. }
  42. if(!strcmp(cmdtext, "/startmusicbot", true))
  43. {
  44. MusicBot(playerid);
  45. SCM(playerid, -1, ""G"Pustili ste ponovo "B"MusicBot-a"G", uzivajte!");
  46. }
  47.  
  48. }
  49.  
  50.  
  51. forward MusicBot(playerid);
  52. public MusicBot(playerid)
  53. {
  54. switch(random(2)) //Kako povecate broj pesama, povecajte i ovaj ovde broj ;)
  55. {
  56. case 0:
  57. {
  58. SCM(-1, ""G"[MusicBot]: Za Vas samo "R"DJ Stojan i MC Black - Zagrljaj "G",uzivajte uz nas.");
  59. SCM(-1, ""G"[MusicBot]: Ako zelite da zaustavite MusicBot-a, ukucajte "R"/stopmusicbot "G".");
  60. PlayAudioStreamForPlayer(playerid, Music1);
  61. }
  62. case 1:
  63. {
  64. SCM(-1, ""G"[MusicBot]: Za Vas samo "R"IN VIVO - REMEK DELO "G",uzivajte uz nas.");
  65. SCM(-1, ""G"[MusicBot]: Ako zelite da zaustavite MusicBot-a, ukucajte "R"/stopmusicbot "G".");
  66. PlayAudioStreamForPlayer(playerid, Music2);
  67. }
  68. }
  69. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement