28.02.2012, 20:34
Well, I have this:
Why won't this list all of the items? It only lists ID 1 (which is listitem 0)
pawn Код:
CMD:radio(playerid, params[]) {
new
availableStations[256],
holder[256],
rStr[16],
radioCount = 0;
for( new r = 1; r < MAXIMUM_RADIO_STATIONS; r ++ )
{
format( rStr, sizeof( rStr ), "%s/%d.ini", RadioLocation, r );
if( fexist( rStr ) )
{
format( availableStations, sizeof( availableStations ), ""#STATIONGENRE"[%s]\t"#STATIONNAME"%s", radInfo[r][StationGenre], radInfo[r][StationName] );
strcat( availableStations, holder );
radioCount++;
printf("count %d", radioCount);
}
}
if(radioCount == 0)
return SendClientMessage(playerid, -1, "ERROR: No Radio Stations available.");
ShowPlayerDialog(playerid, RADIO_DIALOG, DIALOG_STYLE_LIST, "Please select a Radio Station", availableStations, "Play", "Cancel");
return true;
}