18.08.2012, 02:36
This is the code.
However the ListBox is not shown because it's not being called. Same with the printf function. What could be the problem?
Edit: This is the ListBox function.
This is the TI array.
P.S. The function itself(ShowTeam) has been called correctly.
pawn Код:
stock ShowTeam(playerid)
{
new tempStr[128];
for(new i = 0; i < MAX_TEAMS; i ++)
{
strcat(tempStr, TI[i][name], 128);
strcat(tempStr, "\n", 128);
}
printf("%s", tempStr);
ListBox(playerid, dChooseTeam, "Choose a team.", tempStr);
}
Edit: This is the ListBox function.
pawn Код:
stock ListBox(playerid, dialogid, text[], list[]) ShowPlayerDialog(playerid, dialogid, DIALOG_STYLE_LIST, text, list, "SELECT", "CLOSE");
pawn Код:
new TI[MAX_TEAMS][tInfo] =
{
{ "Blue", { 0.0, 0.0, 0.0, 90.0 }, { 24, 0, 0, 0 }, 28, COLOR_BLUE, 0 },
{ "Red", { 0.0, 0.0, 0.0, 90.0 }, { 26, 0, 0, 0 }, 29, COLOR_RED, 0 }
};