_iLustcheR_

MusicSystem v1.1

Jul 20th, 2013
317
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 3.56 KB | None | 0 0
  1. // MusicSystem v0.2 by LustcheR - Itzhak
  2.  
  3. #include <a_samp>
  4.  
  5. #define MusicDialog 1
  6. #define MusicAllDialog 2
  7.  
  8. #if defined FILTERSCRIPT
  9.  
  10. public OnFilterScriptInit()
  11. {
  12.     print("\n--------------------------------------");
  13.     print("    MusicSystem by LustcheR - Itzhak    ");
  14.     print("--------------------------------------\n");
  15.     return 1;
  16. }
  17.  
  18. public OnFilterScriptExit()
  19. {
  20.     return 1;
  21. }
  22.  
  23. #else
  24. #endif
  25.  
  26. public OnPlayerConnect(playerid)
  27. {
  28.     SendClientMessage(playerid, 0xFF0000AA, "[MusicSystem] >> {FFFFFF}LustcheR - בשרת זה קיימת מערכת מוזיקה אשר נבנתה על ידי יצחק");
  29.     return 1;
  30. }
  31.  
  32. public OnPlayerCommandText(playerid, cmdtext[])
  33. {
  34.     if (strcmp("/Music",cmdtext, true) == 0)
  35.     {
  36.         ShowPlayerDialog(playerid, MusicDialog, DIALOG_STYLE_LIST, "{FFFF00}MusicList", "EZ - לא מפסיק לחלום\nTaylor Swift - I Knew You Were Trouble\nBastille - Pompeii\nChris Brown - Turn Up The Music\nIdo B & Zooki - רחוק מכאן\n{FF0000}Stop Music", "כיבוי", "הפעל");
  37.         return 1;
  38.     }
  39.     if (strcmp("/MusicAll",cmdtext, true) == 0)
  40.     {
  41.         if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "/Help - פקודה זו אינה נמצאה במערכת, לעזרה הקלד");
  42.         ShowPlayerDialog(playerid, MusicAllDialog, DIALOG_STYLE_LIST, "{FFFF00}MusicList", "EZ - לא מפסיק לחלום\nTaylor Swift - I Knew You Were Trouble\nBastille - Pompeii\nChris Brown - Turn Up The Music\nIdo B & Zooki - רחוק מכאן\n{FF0000}Stop Music", "כיבוי", "הפעל");
  43.         return 1;
  44.     }
  45.     return 0;
  46. }
  47.  
  48. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  49. {
  50.     if(dialogid == MusicDialog && response)
  51.     {
  52.         switch(listitem)
  53.         {
  54.             case 0: PlayAudioStreamForPlayer(playerid, "http://k002.kiwi6.com/hotlink/gwll52vh6b/-_.mp3");
  55.             case 1: PlayAudioStreamForPlayer(playerid, "http://k002.kiwi6.com/hotlink/61i74g9f62/taylor_swift_-_i_knew_you_were_trouble.mp3");
  56.             case 2: PlayAudioStreamForPlayer(playerid, "http://k002.kiwi6.com/hotlink/4954x5l51b/bastille_-_pompeii.mp3");
  57.             case 3: PlayAudioStreamForPlayer(playerid, "http://k002.kiwi6.com/hotlink/4i9nxu5wdx/chris_brown_-_turn_up_the_music.mp3");
  58.             case 4: PlayAudioStreamForPlayer(playerid, "http://k002.kiwi6.com/hotlink/8yp573sgc4/ido_b_and_zooki_-_.mp3");
  59.             case 5: StopAudioStreamForPlayer(playerid), SendClientMessage(playerid, 0xFF0000AA, "[MusicSystem] >> {FFFFFF}השיר הופסק");
  60.         }
  61.     }
  62.     if(dialogid == MusicAllDialog && response)
  63.     {
  64.         switch(listitem)
  65.         {
  66.             case 0: for(new i; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i)) PlayAudioStreamForPlayer(i, "http://k002.kiwi6.com/hotlink/gwll52vh6b/-_.mp3");
  67.             case 1: for(new i; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i)) PlayAudioStreamForPlayer(i, "http://k002.kiwi6.com/hotlink/61i74g9f62/taylor_swift_-_i_knew_you_were_trouble.mp3");
  68.             case 2: for(new i; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i)) PlayAudioStreamForPlayer(i, "http://k002.kiwi6.com/hotlink/4954x5l51b/bastille_-_pompeii.mp3");
  69.             case 3: for(new i; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i)) PlayAudioStreamForPlayer(i, "http://k002.kiwi6.com/hotlink/4i9nxu5wdx/chris_brown_-_turn_up_the_music.mp3");
  70.             case 4: for(new i; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i)) PlayAudioStreamForPlayer(i, "http://k002.kiwi6.com/hotlink/8yp573sgc4/ido_b_and_zooki_-_.mp3");
  71.             case 5: for(new i; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i)) StopAudioStreamForPlayer(i), SendClientMessageToAll(0xFF0000AA, "[MusicSystem] >> {FFFFFF}השיר הופסק לכולם");
  72.         }
  73.     }
  74.     return 1;
  75. }
Advertisement
Add Comment
Please, Sign In to add comment