14.12.2011, 15:55
Sorry mate, only way unfortunately
pawn Код:
new CurrentStream[256] = "null" //At the top of your script, with the other "new's"
stock PlayAudioStreamForAll(StreamURL[]) //Wherever, just so long as it's not inside another function
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
PlayAudioStreamForPlayer(i, StreamURL, 0.0, 0.0, 0.0, 0);
}
}
CurrentStream = StreamURL;
}
stock StopAudioStreamForAll() //Below the above stock
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
StopAudioStreamForPlayer(i);
}
}
CurrentStream = "null";
}
public OnPlayerConnect(playerid)
{
if(strcmp(CurrentStream, "null", true) != 0)
{
PlayAudioStreamForPlayer(i, StreamURL, 0.0, 0.0, 0.0, 0);
}
}