Guest User

Radio

a guest
Aug 17th, 2012
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 4.53 KB | None | 0 0
  1.  
  2.  
  3. #include <a_samp>
  4. #include <zcmd>
  5.  
  6. #define ListadeMusica 1234
  7. new bool:Ouvintess[MAX_PLAYERS]= false;
  8. public OnFilterScriptInit()
  9. {
  10.  print("*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==*");
  11.  print("*                                          *");
  12.  print("*Sistema de Radio v1.0 Carregado           *");
  13.  print("*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*");
  14.  return 1;
  15. }
  16. ////////////////////////////////////////////////////////////////////////////////
  17. public OnFilterScriptExit()
  18. {
  19.  print("*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==*");
  20.  print("*                                          *");
  21.  print("*Sistema de Radio v1.0 Descarregado          *");
  22.  print("*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*");
  23.  return 1;
  24.  }
  25. public OnPlayerConnect(playerid)
  26. {
  27.   Ouvintess[playerid]= true;
  28.   return 1;
  29. }
  30. public OnPlayerDisconnect(playerid)
  31. {
  32.   Ouvintess[playerid]= false;
  33.   return 1;
  34. }
  35. CMD:radio2(playerid,params[])
  36. {
  37.     ShowPlayerDialog(playerid, ListadeMusica, DIALOG_STYLE_LIST,
  38.     "{E40000}Escolha Sua Radio",
  39.     "{FFFFFF}Radio{FFFFFF} Hip-Hop\n{FF0000}Radio Super mix\n{FF0000}Radio Electro\n{FF0000}Radio Relax\n{55FFAA}Radio Jovem Pan\n{FFAA55}Radio Mix evolution\nRadio Fusion\nRadio Hunter\nDesligar Radio",
  40.     "Escutar", "Fechar");
  41.     return 1;
  42.  }
  43.  
  44. CMD:ouvintes(playerid,params[])
  45. {
  46. static Nome[24]; Nome[0] = '\0';
  47. static str[500]; str[0] = '\0';
  48. static armas[500]; armas[0] = '0';
  49. new count;
  50. for(new i=0;i<MAX_PLAYERS;i++){
  51. if(Ouvintess[i] > false){
  52. Ouvintess[playerid] = false;
  53. GetPlayerName(i, Nome, sizeof(Nome));
  54. format(str, sizeof(str),"{FF55AA}Ouvintes: %s\n",Nome,GetPlayerWantedLevel(i));
  55. strcat(armas, str);
  56. count++;
  57. }
  58. }
  59. if(count<=0)return ShowPlayerDialog(playerid, 10, DIALOG_STYLE_MSGBOX, "===== {FF0000}Ouvintes{FFFFFF} ======", "{00FF00}Nenhum  Ouvinte Online", "OK", "");
  60. if(count>0)ShowPlayerDialog(playerid, 10, DIALOG_STYLE_MSGBOX, "===== {FF0000}Ouvintes{FFFFFF} ======", armas, "OK", "");
  61. return 1;
  62. }
  63.  
  64. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  65. {
  66.  if(dialogid == ListadeMusica)
  67.     {
  68.         if(response)
  69.          {
  70.             if(listitem == 0)
  71.              {
  72.                 GameTextForPlayer(playerid, "~n~~n~~r~~h~] ~w~Radio Hip-Hop ~r~~h~]", 2000, 5);
  73.                 PlayAudioStreamForPlayer(playerid,"http://208.76.152.73:8000");
  74.                 Ouvintess[playerid] = true;
  75.             }
  76.             if(listitem == 1) {
  77.                 PlayAudioStreamForPlayer(playerid,"http://radiosupermix.com.br:7585");// SUPER MIX
  78.                 GameTextForPlayer(playerid, "~n~~n~~r~~h~] ~w~Radio Supermix ~r~~h~]", 2000, 5);
  79.                 Ouvintess[playerid] = true;
  80.             }
  81.             if(listitem == 2) {
  82.                 PlayAudioStreamForPlayer(playerid,"http://streaming15.brlogic.com:8084/live");//Radio Electro Vibe
  83.                 GameTextForPlayer(playerid, "~n~~n~~r~~h~] ~w~Radio Electo Vibe~r~~h~]", 2000, 5);
  84.                 Ouvintess[playerid] = true;
  85.  
  86.             }
  87.             if(listitem == 3) {
  88.                 PlayAudioStreamForPlayer(playerid,"http://streaming18.brlogic.com:8204/live");//Relax
  89.                 GameTextForPlayer(playerid, "~n~~n~~r~~h~] ~w~Radio Relax~r~~h~]", 2000, 5);
  90.                 Ouvintess[playerid] = true;
  91.             }
  92.             if(listitem == 4){
  93.                GameTextForPlayer(playerid, "~n~~n~~r~~h~] ~w~Radio Jovem Pan~r~~h~]", 2000, 5);
  94.                PlayAudioStreamForPlayer(playerid,"http://ouvir.radioblast.com.br:80/");
  95.                Ouvintess[playerid] = true;
  96.             }
  97.             if(listitem == 5){
  98.                GameTextForPlayer(playerid, "~n~~n~~r~~h~] ~w~Radio Mix Evolution~r~~h~]", 2000, 5);
  99.                PlayAudioStreamForPlayer(playerid,"http://s3.voscast.com:7554/");
  100.                Ouvintess[playerid] = true;
  101.             }
  102.  
  103.             if(listitem == 6){
  104.                GameTextForPlayer(playerid, "~n~~n~~r~~h~] ~w~Radio Fusion~r~~h~]", 2000, 5);
  105.                PlayAudioStreamForPlayer(playerid,"http://65.60.1.98:8000");
  106.                Ouvintess[playerid] = true;
  107.             }
  108.             if(listitem == 7){
  109.                GameTextForPlayer(playerid, "~n~~n~~r~~h~] ~w~Radio Hunter~r~~h~]", 2000, 5);
  110.                PlayAudioStreamForPlayer(playerid,"http://96.47.227.156:9426");
  111.                Ouvintess[playerid] = true;
  112.             }
  113.  
  114.             if(listitem == 8) {
  115.                 GameTextForPlayer(playerid, "~n~~n~~r~~h~] ~w~ Radio Desativada~r~~h~]", 2000, 5);
  116.                 StopAudioStreamForPlayer(playerid);
  117.                 Ouvintess[playerid] = false;
  118.  
  119.             }
  120.  
  121.  
  122.         }
  123.  
  124.     }
  125.  return 0;
  126.   }
Advertisement
Add Comment
Please, Sign In to add comment