16.07.2016, 10:35
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
Here is my dialog code. You see I made this line
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?
Код:
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]); } } } }
Код:
RadioLinks[listitem][aStationLink]
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?