18.10.2012, 12:36
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;
}