26.02.2013, 01:46
(
Последний раз редактировалось Ananisiki; 15.12.2013 в 17:41.
)
^^^^^^^^
// top of script
new RandomMusic[][] =
{
"http://listen.di.fm/public3/progressive.pls ",
"http://listen.di.fm/public3/eurodance.pls ",
"http://listen.di.fm/public3/house.pls "
};
// OnGameModeInIt
SetTimer("SwitchRadio", 60000*15, true); // meaning it will change every 15 minutes.
// somewhere in your script
forward SwitchRadio();
public SwitchRadio()
{
new randURL = random(sizeof(RandomMusic));
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
StopAudioStreamForPlayer(i);
PlayAudioStreamForPlayer(i, RandomMusic[randURL]);
}
}
return 1;
}
CMD:radiostop(playerid, params[])
{
StopAudioStreamForPlayer(playerid);
return 1;
}