Dialog_style_list new line -
Stoyanov - 15.11.2014
How to make the name of the songs on new lines:
Код:
new SMusic[28];
for(new i, j = sizeof(Songs); i < j; i++) format(SMusic, sizeof(SMusic), "%s\n", Songs[i][SongName]);
ShowPlayerDialog(playerid, Dialog_Music, DIALOG_STYLE_LIST, "{0056b6}MUSIC PLAYER", SMusic, "Play", "Exit");
ON THE TOP
Код:
enum SInfo
{
SongName[28],
SongURL[200]
};
new Songs[][SInfo] =
{
{"NameSong", "Link.mp3"},
{"NameSong2", "Link2.mp3"}
};
now shows only the last song name.
Re: Dialog_style_list new line -
DavidBilla - 15.11.2014
Oops
It's
format(SMusic, sizeof(SMusic), "%s%s\n",SMusic, Songs[i][SongName])
Re: Dialog_style_list new line -
Stoyanov - 15.11.2014
What array have to make bigger? or?
Re: Dialog_style_list new line -
DavidBilla - 15.11.2014
Yes, increase the size, probably 40-50 or anything depending on your usage
Re: Dialog_style_list new line -
Stoyanov - 15.11.2014
I have around 200 songs..... do i have to make it 6000-7000?
Re: Dialog_style_list new line -
DavidBilla - 15.11.2014
Are you going to display all those songs in the dialog?
Creating it to such a size might cause some problems
Re: Dialog_style_list new line -
Stoyanov - 15.11.2014
Then what should i do?
Re: Dialog_style_list new line -
Vince - 15.11.2014
It's called pagination. If you browse a forum and it has 1000 topics, are all 1000 topics listed beneath each other? Of course not. There are several pages so only, say, 50 topics are displayed at once.
Re: Dialog_style_list new line -
Stoyanov - 15.11.2014
oh. Yeah. Totaly forgot.
Thanks.