Possible to Loop "AudioStreamForPlayer" ?
#4

in that case replace it with this:
pawn Code:
// top of script
new MusicURLs[][] =
{
    "URL1",
    "URL2",
    "URL3"
};
new URLNumber;
// ongamemodeinit
SetTimer("SwitchNewSound", 60000*3, true); // 3 minutes
// somewhere in your script
forward SwitchNewSound();
public SwitchNewSound()
{
    for(new playerid = 0; playerid < MAX_PLAYERS; playerid++)
    {
        if(IsPlayerConnected(playerid))
        {
            StopAudioStreamForPlayer(playerid);
            PlayAudioStreamForPlayer(playerid, MusicURLs[URLNumber]);
            URLNumber++;
            if(URLNumber == sizeof(MusicURLs)) URLNumber = 0;
        }
    }
    return 1;
}
Reply


Messages In This Thread
Possible to Loop "AudioStreamForPlayer" ? - by denNorske - 18.10.2012, 12:15
Re: Possible to Loop "AudioStreamForPlayer" ? - by Roel - 18.10.2012, 12:20
Re: Possible to Loop "AudioStreamForPlayer" ? - by denNorske - 18.10.2012, 12:32
Re: Possible to Loop "AudioStreamForPlayer" ? - by Roel - 18.10.2012, 12:36
Re: Possible to Loop "AudioStreamForPlayer" ? - by denNorske - 18.10.2012, 12:40
Re: Possible to Loop "AudioStreamForPlayer" ? - by Roel - 18.10.2012, 12:43

Forum Jump:


Users browsing this thread: 1 Guest(s)