Guest User

Untitled

a guest
May 5th, 2014
690
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.28 KB | None | 0 0
  1. /*
  2.     * The big credtt to: iRaiDeN;
  3.         * Give you relief mode, play songs without convert;
  4.             * Features:
  5.                 - PlayAudioForPlayer(clientid,url[])
  6.                     - PlayAudioForAll(url[])
  7.                         - StopAudioForPlayer(clientid)
  8.                             - StopAudioForAll()
  9.  
  10.     ********************* Enjoy ********************************************* */
  11.  
  12. #if defined _AudioStream_INC
  13.     #endinput
  14. #endif
  15. #define _AudioStream_INC
  16.  
  17. #if !defined function
  18.     #define function:%0(%1) forward %0(%1); public %0(%1)
  19. #else
  20.     #undef function
  21. #endif
  22.  
  23. new
  24.     localURL[128],
  25.     localString[128];
  26.    
  27.  
  28. function:PlayAudioForPlayer(clientid,url[])
  29. {
  30.     strmid(url,localURL,strfind(url, "v=")+2,strfind(url, "v=")+19);
  31.     format(localString, 128, "http://mwrserver.com/youtube.php?videoid=%s",localURL);
  32.     PlayAudioStreamForPlayer(clientid,localString);
  33. }
  34.  
  35. function:PlayAudioForAll(url[])
  36. {
  37.     strmid(url,localURL,strfind(url, "v=")+2,strfind(url, "v=")+19);
  38.     format(localString, 128, "http://mwrserver.com/youtube.php?videoid=%s",localURL);
  39.     for(new i; i != MAX_PLAYERS; i++) PlayAudioStreamForPlayer(i,localString);
  40. }
  41.  
  42. function:StopAudioForPlayer(clientid) return StopAudioStreamForPlayer(clientid);
  43. function:StopAudioForAll() for(new i; i != MAX_PLAYERS; i++) StopAudioStreamForPlayer(i);
Advertisement
Add Comment
Please, Sign In to add comment