Quote:
Originally Posted by SuperViper
pawn Код:
enum randomMusicA { MusicName[50], Url[256], } new randomMusic[MAX_MUSIC_STREAMS][randomMusicA] ={ {"Country","http://yp.shoutcast.com/sbin/tunein-station.pls?id=1283687"}, {"Sky.FM","http://yp.shoutcast.com/sbin/tunein-station.pls?id=728272"}, {"Big R Radio","http://74.86.186.35:8018/listen.pls"}, {"Slow Music","http://yp.shoutcast.com/sbin/tunein-station.pls?id=1658657"} }; stock NMusicStream(playerid) { StopAudioStreamForPlayer(playerid); new string[128], randomRadio = random(sizeof(randomMusic)); PlayAudioStreamForPlayer(playerid, randomMusic[randomRadio][Url]); SendClientMessage(playerid, -1, "Next Song/Radio Loading........"); format(string, sizeof(string), "Listening to %s", randomMusic[randomRadio][MusicName]); SendClientMessage(playerid, -1, string); return 1; } stock ANMusicStream(playerid) { StopAudioStreamForPlayer(playerid); new string[128], randomRadio = random(sizeof(randomMusic)); PlayAudioStreamForPlayer(playerid, randomMusic[randomRadio][Url]); format(string, sizeof(string), "Listening to %s", randomMusic[randomRadio][MusicName]); SendClientMessage(playerid, -1, string); }
|
Ok it works good but for some reason it only plays the same stream and the song name changes. I also had to change it up with the line...
pawn Код:
new string[128], randomRadio = random(sizeof(randomMusic));
//to
new string[128];
new randomRadio = random(sizeof(randomMusic));
Cause it was giving errors. Other than that it is the same. Any suggestions on that?