09.09.2013, 03:57
Quote:
It needs to be a 3D array because you also need the lenght of the strings.
pawn Код:
|
Here is what I have implemented based on your advice. It's still not playing the audio streams as it should. It all seems fine to me, I can't find any problems. I've even tried using the array for SendClientMessage, and it worked as it should, printed everything out normally. But this is still happening.
That is an image of me selecting each list item, one by one, from the top of the list.
Here is the bits of code I changed.
pawn Код:
if(dialogid == RADIO_GENRE_ROCK)
{
if(!response)
{
DisplayMain(playerid);
return 1;
}
foreach(Player, i)
{
new veh = GetPlayerVehicleID(playerid);
if(GetPlayerVehicleID(i) == veh)
{
PlayAudioStreamForPlayer(i, RockStations[listitem][1][60]); //60 being the size of the string.
SetPVarInt(i, "Streaming", 1);
}
}
}
pawn Код:
new RockStations [] [] [] =
{
{"181.fm - The Buzz!", "http://yp.shoutcast.com/sbin/tunein-station.pls?id=37586"},
{"Radio Paradise", "http://yp.shoutcast.com/sbin/tunein-station.pls?id=785339"},
{"181.fm - Awesome 80's", "http://yp.shoutcast.com/sbin/tunein-station.pls?id=785339"},
{"idobi Radio", "http://yp.shoutcast.com/sbin/tunein-station.pls?id=914897"},
{"Star.fm - Maximum Rock!", "http://yp.shoutcast.com/sbin/tunein-station.pls?id=108588"},
{"181.fm - 90's Alternative", "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1034265"},
{"181.fm - Hard Rock Heaven", "http://yp.shoutcast.com/sbin/tunein-station.pls?id=106750"}
};
Thank you!
EDIT: Could I maybe switch out the order of the array and have the names second?