Guest User

Untitled

a guest
Jan 21st, 2017
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.59 KB | None | 0 0
  1. //######## WWW.BRASILSAMP.IN & HOSPEDAGAMES.COM ########
  2.  
  3.  
  4. //=============== QUANDO CONECTAR ==========================================================
  5. public OnPlayerConnect(playerid)
  6. {
  7. PlayAudioStreamForPlayer(playerid, "https://6t.pe/?song=NOME DA MUSICA AQUI");
  8. }
  9.  
  10. //=============== CASO QUEIRA USAR COMO COMANDO ==========================================================
  11. public OnPlayerCommandText(playerid, cmdtext[])
  12. {
  13. new cmd[256],string[256];
  14. if(strcmp("/musica", cmd, true) == 0)// tocar musica somente pra quem digito
  15. {
  16. new texto[128];
  17. if(sscanf(cmdtext, "s[4]s[128]", cmd, texto))
  18. {
  19. SendClientMessage(playerid, Vermelho, "Digite: /musica[titulo]");
  20. }
  21. else
  22. {
  23. format(string, sizeof(string), "https://6t.pe/?song=%s", texto);
  24. PlayAudioStreamForPlayer(playerid, string);
  25. }
  26. return 1;
  27. }
  28.  
  29. if(strcmp("/musicaall", cmd, true) == 0)// tocar musica pra todo mundo
  30. {
  31. new texto[128];
  32. if(sscanf(cmdtext, "s[4]s[128]", cmd, texto))
  33. {
  34. SendClientMessage(playerid, Vermelho, "Digite: /musicaall [titulo]");
  35. }
  36. else
  37. {
  38. format(string, sizeof(string), "https://6t.pe/?song=%s", texto);
  39. for(new i; i < MAX_PLAYERS; i ++)
  40. {
  41. if(IsPlayerConnected(i))
  42. {
  43. PlayAudioStreamForPlayer(i, string);
  44. }
  45. }
  46. }
  47. return 1;
  48. }
  49. }
  50.  
  51.  
  52. //######## WWW.BRASILSAMP.IN & HOSPEDAGAMES.COM ########
Advertisement
Add Comment
Please, Sign In to add comment