Posts: 76
Threads: 16
Joined: Mar 2012
Reputation:
0
I've seen on several servers people have the same song play upon logging in(that plays from start to end)
so instead of the PlayAudioStreamForPlayer url being an ip that just connects to a radio, how do I make a specific song play from start to end by each player?
Thanks!
Posts: 1,498
Threads: 110
Joined: Aug 2013
Код:
public OnPlayerConnect(playerid)
{
PlayAudioStreamForPlayer(playerid,"URL.mp3 "); // plays the music when player connects
return 1; // returns true.
}
Код:
CMD:stopstream(playerid, params[])
{
StopAudioStreamForPlayer(playerid); //Stops the music , just in case.
return 1; // returns true.
}
Posts: 1,498
Threads: 110
Joined: Aug 2013
My mistake i've read it bad, here.
Код:
CMD:stream(playerid, params[])
{
new string[128];
if(isnull(params)) return SendClientMessage(playerid, LIGHT_RED, "USAGE: /stream [Url]");
new HighestPlayerId = GetPlayerPoolSize();
for(new x=0; x <= HighestPlayerId; x++) {
if(!IsPlayerConnected(x)) continue;
format(string, sizeof(string), "%s(%d)Is streaming music", IsPlayerName(playerid), playerid);
SendClientMessage(x, 0x00FFFFFF, string);
PlayAudioStreamForPlayer(x, params);
}
}
return 1;
}
CMD:stopstream(playerid, params[])
{
StopAudioStreamForPlayer(playerid);
return 1;
}
Posts: 6,242
Threads: 8
Joined: Jun 2008
You can also point it to .pls playlists.