Advertisement
Guest User

Shoutcast 0.3D Server

a guest
Apr 7th, 2012
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1. // Includes
  2. #include <audio>
  3.  
  4. // New Stuff
  5. new Radio[MAX_PLAYERS];
  6.  
  7. // Public Stuff
  8. public Audio_OnClientConnect(playerid)
  9. {
  10. new string[128];
  11. format(string, sizeof(string), "Audio client ID %d connected", playerid);
  12. SendClientMessageToAll(COLOR_YELLOW, string);
  13. // Transfer the audio pack when the player connects
  14. Audio_TransferPack(playerid);
  15. return 1;
  16. }
  17.  
  18. public Audio_OnClientDisconnect(playerid)
  19. {
  20. new string[128];
  21. format(string, sizeof(string), "Audio client ID %d disconnected", playerid);
  22. SendClientMessageToAll(COLOR_YELLOW, string);
  23. Audio_Stop(playerid, Radio[playerid]);
  24. return 1;
  25. }
  26.  
  27. public OnPlayerCommandText(playerid, cmdtext[])
  28. {
  29. if(strcmp(cmdtext, "/startradio",true)==0)
  30. {
  31. Radio[playerid] = Audio_PlayStreamed(playerid, "http://109.169.26.79:8036/home.html",false,false,false);
  32. Audio_SetVolume(playerid, Radio[playerid], 100);
  33. SendClientMessage(playerid,COLOR_YELLOW,"You Have Been Connected to Serious Life Roleplay.");
  34. return 1;
  35. }
  36. if(strcmp(cmdtext, "/stopradio",true)==0)
  37. {
  38. Audio_Stop(playerid, Radio[playerid]);
  39. SendClientMessage(playerid,COLOR_YELLOW,"You Have Been Disconnected From Serious Life Roleplay.");
  40. return 1;
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement