Advertisement
Guest User

Bla blalol

a guest
Dec 14th, 2013
564
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.76 KB | None | 0 0
  1. #include <a_samp>
  2. #include <ZCMD>
  3. #include <foreach>
  4. #include <sscanf>
  5.  
  6. #if defined FILTERSCRIPT
  7.  
  8. public OnFilterScriptInit()
  9. {
  10.     print("\n--------------------------------------");
  11.     print(" Audio streaming. Filterscript - Jay Gill");
  12.     print("--------------------------------------\n");
  13.     return 1;
  14. }
  15.  
  16. public OnFilterScriptExit()
  17. {
  18.     return 1;
  19. }
  20.  
  21. #else
  22.  
  23. main()
  24. {
  25.     print("\n-----------------------------------------");
  26.     print(" Audio streaming. Filterscript - Jay Gill");
  27.     print("-------------------------------------------\n");
  28. }
  29.  
  30. #endif
  31.  
  32. CMD:streamaudio(playerid, params[])
  33. {
  34.     new string[128];
  35.     if(sscanf(params, "s[256]", params)) return SendClientMessage(playerid, -1,"{FF8000}ERROR{FFFFFF}: /stream [url]");
  36.  
  37.     if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "{AA3333}You are not an RCON Admin.");
  38.     format(string, sizeof(string), "An admin has statred global song.[ /stopmusic to stop listening ]");
  39.     SendClientMessageToAll( 0xFFFF00AA, string);
  40.     foreach(Player, i)
  41.     {
  42.         PlayAudioStreamForPlayer(i, params);
  43.     }
  44.     return 1;
  45. }
  46.  
  47. CMD:streamhelp(playerid, params[])
  48. {
  49.     if(IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, " '/streamaudio' - '/stopmusicforall'");
  50.     SendClientMessage(playerid, -1, " '/stopmusic'");
  51.     return 1;
  52. }
  53.  
  54. CMD:stopmusic(playerid, params[])
  55. {
  56.     StopAudioStreamForPlayer(playerid);
  57.     SendClientMessage(playerid, 0xAA3333AA, " You have stopped listening to music.");
  58.     return 1;
  59. }
  60.  
  61. CMD:stopmusicforall(playerid, params[])
  62. {
  63.     if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "{AA3333}You are not an RCON Admin.");
  64.     foreach(Player, i)
  65.     {
  66.         StopAudioStreamForPlayer(i);
  67.         SendClientMessage(i, 0xAA3333AA, " An admin has stopped your audio.");
  68.     }
  69.     return 1;
  70. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement