PlayAudioStream for all?
#3

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);
    }
}
Reply


Messages In This Thread
PlayAudioStream for all? - by JackT - 14.12.2011, 15:40
Re: PlayAudioStream for all? - by Psymetrix - 14.12.2011, 15:42
Re: PlayAudioStream for all? - by Rob_Maate - 14.12.2011, 15:55

Forum Jump:


Users browsing this thread: 1 Guest(s)