Guest User

Untitled

a guest
Aug 25th, 2018
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.78 KB | None | 0 0
  1. new Ouvintes[33] = 0;
  2.  
  3. if(dialogid == DialogMusicas)
  4. {
  5. if(response)
  6. {
  7. if(listitem == 0) // RÁDIOS
  8. {
  9. for(new j = 0; j < sizeof(Radios); j++)
  10. {
  11. Ouvintes[j] = 0;
  12. }
  13. new output[1624] = EOS;
  14.  
  15. for(new i; i < GetMaxPlayers(); i++)
  16. {
  17. if(IsPlayerConnected(i))
  18. {
  19. if(OuvindoRadio[i] == true)
  20. {
  21. for(new j = 0; j < sizeof(Radios); j++)
  22. {
  23. if(!strcmp(Radios[j][0], RadioNome[i], true))
  24. {
  25. Ouvintes[j] ++;
  26. }
  27. }
  28. }
  29. }
  30. }
  31. new string[200];
  32. strcat(output, "{FFFFFF}Radio\t{FFFFFF}Ouvintes\n");
  33. for(new j = 0; j < sizeof(Radios); j++)
  34. {
  35. if(Ouvintes[j] == 0)
  36. {
  37. format(string, sizeof(string), "%dº- %s\t 0\n", j+1, Radios[j][0]), strcat(output, string);
  38. }
  39. else
  40. {
  41. format(string, sizeof(string), "%dº- %s\t{FFFF00} %d\n", j+1, Radios[j][0], Ouvintes[j]), strcat(output, string);
  42. }
  43. }
  44. ShowPlayerDialog(playerid, DialogMusicas4, DIALOG_STYLE_TABLIST_HEADERS, "{FFFFFF}Rádios disponíveis", output, "{FFFFFF}Selecionar", "{FFFFFF}Voltar");
  45. }
  46. else if(listitem == 1) /// PARAR RÁDIOS
  47. {
  48. PlayerPlaySound(playerid, 1085, 0, 0, 0);
  49. StopAudioStreamForPlayer(playerid);
  50. StopAudioStreamForPlayer(playerid);
  51. SendClientMessage(playerid,0x88AA62AA,"A rádio que você estava ouvindo foi desativada com sucesso.");
  52. StopAudioStreamForPlayer(playerid);
  53. OuvindoRadio[playerid] = false;
  54. RadioNome[playerid] = "N/A";
  55. }
  56. }
  57. }
Advertisement
Add Comment
Please, Sign In to add comment