Advertisement
Guest User

STRCMP - WALTERSANTOS. 2017

a guest
Nov 5th, 2017
365
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.91 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. #define RADIOS 5324
  4. #define URL 5325
  5. #define Amarelo 0xEBFF00AA
  6.  
  7.  
  8. public OnFilterScriptInit()
  9. {
  10. print(" ======================================");
  11. print(" Aproveitem ao Maximo ");
  12. print(" FILTERSCRIPT BY: WalterSantos ");
  13. print(" Rádios Atualizadas para seu Servidor ");
  14. print(" ======================================");
  15. return 1;
  16. }
  17. public OnPlayerCommandText(playerid, cmdtext[])
  18. {
  19. if (strcmp("/radios", cmdtext, true, 10) == 0)
  20. {
  21. ShowPlayerDialog(playerid,RADIOS,DIALOG_STYLE_LIST,"Radios","{00F5FF}Radio Hunter\n{009ACD}Radio Funk\n{FFD700}Radio Sertanejo\n{CD00CD}Radio Hip Hop\n{FF0000}Radio Reggae\n{00688B}Tocar URL\n{EEE0E5}Desligar Radio","Selecionar","Cancelar");
  22. return 1;
  23. }
  24. return 0;
  25. }
  26.  
  27.  
  28. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  29. {
  30. if(dialogid == RADIOS)
  31. {
  32. if(response)
  33. {
  34. if(listitem == 0)
  35. {
  36. PlayAudioStreamForPlayer(playerid,"http://listen.shoutcast.com:80/RadioHunter-TheHitzChannel");
  37. SendClientMessage(playerid,Amarelo,"[INFO]: {00F5FF}Rádio Hunter selecionada!");
  38. }
  39. if(listitem == 1)
  40. {
  41. PlayAudioStreamForPlayer(playerid,"http://listen.shoutcast.com/jpfunkmusic");
  42. SendClientMessage(playerid,Amarelo,"[INFO]: {00F5FF}Rádio Funk selecionada!");
  43. }
  44. if(listitem == 2)
  45. {
  46. PlayAudioStreamForPlayer(playerid,"http://170.75.144.250:15672");
  47. SendClientMessage(playerid, Amarelo,"[INFO]: {00F5FF}Rádio Sertanejo selecionada!");
  48. }
  49. if(listitem == 3)
  50. {
  51. PlayAudioStreamForPlayer(playerid,"http://108.61.30.179:4010");
  52. SendClientMessage(playerid, Amarelo,"[INFO]: {00F5FF}Rádio Hip Hop selecionada!");
  53. }
  54. if(listitem == 4)
  55. {
  56. PlayAudioStreamForPlayer(playerid,"http://176.31.246.143:8300");
  57. SendClientMessage(playerid, Amarelo,"[INFO]: {00F5FF}Rádio Reggae selecionada!");
  58. }
  59. if(listitem == 5)
  60. {
  61. ShowPlayerDialog(playerid, URL, DIALOG_STYLE_INPUT, "Insira a URL", "Insira sua URL de um arquivo .MP3\nExemplo: {FF0000}http://sv12.onlinevideoconverter.com/download?file=j9a0h7a0d3e4g6e4", "Tocar", "Sair");
  62. }
  63. if(listitem == 6)
  64. {
  65. StopAudioStreamForPlayer(playerid);
  66. SendClientMessage(playerid, Amarelo,"[INFO]: {00F5FF}Rádio Desligada!{00F5FF}");
  67. }
  68. }
  69. }
  70. if(dialogid == URL)
  71. {
  72. if(!response) return 1;
  73. SendClientMessage(playerid, Amarelo, "Rádio via URL ligada com sucesso!");
  74. PlayAudioStreamForPlayer(playerid, inputtext);
  75. return true;
  76. }
  77. return 1;
  78. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement