18.04.2017, 17:38
(
Последний раз редактировалось RIDE2DAY; 19.04.2017 в 08:30.
)
Watch out, while it loops through the first seven names female is an empty string. On the other hand, when it arrives to the 8th row, name contains "MaleNameEX". Say thank you to this for the result you got:
Give a try to this:
Good luck with it.
PHP код:
format(msg, sizeof(msg), "%s\t%s\n", male, female);
strcat(dialogstr, msg, sizeof(dialogstr));
PHP код:
new names[3][2][24] = { // 3 rows, 2 names per row, 24 is the max. length a name can have
{"male1", "female1"},
{"male2", "female2"},
{"male3", "female3"},
{"male4", ""} // you can skip a name, don't skip a male name 'cause you'll get wrong format in the dialog.
};
/* showNameSuggestions */
dialogstr[0] = EOS;
strcat(dialogstr, "Male Names\tFemale Names", sizeof(dialogstr));
for(new x = 0; x < sizeof(names); x++)
{
format(dialogstr, "%s\n%s\t%s", dialogstr, names[x][0], names[x][1]);
}
ShowPlayerDialog(playerid, id, style, "title", dialogstr, "ok","bye");