Radio System Help? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Radio System Help? (
/showthread.php?tid=612283)
Radio System Help? -
JessThompson - 16.07.2016
So I have this radio system but when you click the radio link in the dialog in game it grabs it by the list item. So
Код:
Dialog:LoadRadioThreeDialog(playerid, response, listitem, inputtext[])
{
if(response)
{
foreach(Player, i)
{
if(GetPlayerVehicleID(i) == GetPlayerVehicleID(playerid))
{
new vehicle = GetPlayerVehicleID(playerid);
VehicleInfo[vehicle][carRadioOn] = 1;
format(song, sizeof(song), "%s", RadioLinks[listitem][aStationLink]);
PlayAudioStreamForPlayer(i, RadioLinks[listitem][aStationLink]);
}
}
}
}
Here is my dialog code. You see I made this line
Код:
RadioLinks[listitem][aStationLink]
Grabs the station link by list item but that messages up because when you click the category each listitem is a different name but when you go to play it, it uses the same link from db.
So if I go into category pop and click [ID:34] Gay Fm it will play the 2 id link the database. How can I make it so it grabs the link of the id in the category?