Music Streaming - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Music Streaming (
/showthread.php?tid=655028)
Music Streaming -
DarkMythHunter - 11.06.2018
Hello, I know it is possible to stream music in-game. I saw some includes but still can't get it.
Like, how do I make a "CMD: playsong/CMD: playstop" and add a function where it plays a music from ******* to all players? And like only level 4+ admins can use it.
Any elaborated help? Thank you a lot.
Re: Music Streaming -
nbx2000 - 11.06.2018
Код:
CMD:stopmusic(playerid,params[]) {
SendClientMessage(playerid, orange,"You have stopped the music!");
return StopAudioStreamForPlayer(playerid);
}
CMD:playallmusic(playerid,params[]) {
if(PlayerInfo[playerid][Level] >= 5 || IsPlayerAdmin(playerid)) {
new url[256];
if(sscanf(params,"s[256]",url)) return SendClientMessage(playerid,red,"Usage: /playallmusic [url]");
foreach (new i : Player) if(IsPlayerConnected(i)) PlayAudioStreamForPlayer(i, url);
new string[128];
format(string,sizeof string,"Administrator %s Has Run A Music Party To ALL!",pName(playerid));
return SendClientMessageToAll(yellow,string);
} else return SendClientMessage(playerid,COLOR_BRIGHTRED,"ERROR: You need to be rcon to use this command");
}
Re: Music Streaming -
AlexuTzuBss - 11.06.2018
For admin verification try this : if(playerAdmin[playerid] < 4) return SendClientMessage(playerid, COLOR_GOLD, "Only admins with level 4+ can use this command.");
next IDK