Advertisement
Guest User

Untitled

a guest
Dec 6th, 2018
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.55 KB | None | 0 0
  1. YCMD:music(playerid, params[], help) {
  2. if(IsPlayerInRangeOfPoint(playerid, 30.0, 184.3529,-1825.4983,8.7530)) {
  3. if(PlayerInfo[playerid][pAdmin] == 0) return 1;
  4. new link[64], string[128];
  5. if(sscanf(params, "s[64]", link)) return SCM(playerid, COLOR_GREY, "USAGE: {FFFFFF}/music <link>");
  6. format(beachlink, 64, link);
  7. foreach(Player, i) {
  8. if(IsPlayerInRangeOfPoint(i, 30.0, 184.3529,-1825.4983,8.7530)) {
  9. PlayAudioStreamForPlayer(i, beachlink, 184.3529,-1825.4983,8.7530, 30.0, 1);
  10. SetPVarInt(i, "Listening", 1);
  11. format(string, sizeof(string), "* Admin %s a schimbat muzica.",GetName(playerid));
  12. SCM(i,COLOR_YELLOW,string);
  13. }
  14. }
  15. }
  16. else {
  17. if(!IsPlayerInRangeOfPoint(playerid,100.0,475.6506,-15.0195,1003.6953) && !IsPlayerInRangeOfPoint(playerid,100.0,2021.8,1913.32,12.3122) && !IsPlayerInRangeOfPoint(playerid,100.0,1204.6371,-13.1467,1000.9219))
  18. return SCM(playerid,COLOR_GREY, "Nu esti in alahambra.");
  19.  
  20. new link[100],string[124];
  21. if(sscanf(params, "s[100]",link)) return SCM(playerid,COLOR_GREY, "USAGE: {FFFFFF}/music <Link>");
  22. strmid(alhamusic, link, 0, strlen(link), 255);
  23. foreach(Player, i) {
  24. if(InBussines[i] == 3 || InBussines[i] == 19 || InBussines[i] == 5) {
  25. PlayAudioStreamForPlayer(i, link);
  26. format(string, sizeof(string), "* DJ %s a schimbat muzica din club.",GetName(playerid));
  27. SCM(i,COLOR_YELLOW,string);
  28. }
  29. }
  30. }
  31. return 1;
  32. }
  33.  
  34. function ListenThisRadio(id) {
  35. new x;
  36. foreach(Player, i) {
  37. if(IsPlayerConnected(i) && PlayRadio[i] == id) x++;
  38. }
  39. return x;
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement