22.05.2015, 22:10
I want for example only 17 reports per dialog page.
And if the players press [ Go to Page 2 ] to show the rest of them..
If my server have 17 + it goes:
Row 1
Row 2
Row 3
... (to 16)
Row 17
Ro (un-completed)
I want to be
Row 1
Row 2 - 16
[ Next page ]
source code:
And if the players press [ Go to Page 2 ] to show the rest of them..
If my server have 17 + it goes:
Row 1
Row 2
Row 3
... (to 16)
Row 17
Ro (un-completed)
I want to be
Row 1
Row 2 - 16
[ Next page ]
source code:
pawn Code:
stock ListReports(playerid)
{
new l;
new s[149];
new str[35];
new string[MAX_REPORTS * 100];
if (ReportCount != 0)
{
for (new i = 0; i < MAX_REPORTS + 1; i += 1)
{
strmid(s, ReportInfo[i][rReportString], 0, strlen(ReportInfo[i][rReportString]), 255);
if (ReportIDTaken[i])
{
new statusreport[20];
if(ReportInfo[i][rReportStatus] == 1) { statusreport = "{CC3300}Checked"; }
if(ReportInfo[i][rReportStatus] == 2) { statusreport = "{99CCFF}Picked"; }
else { statusreport = "{66CC33}New"; }
if (ReportInfo[i][rReportAnswered]) continue;
format(str, sizeof(str), "(%d)\t%s\t %s\n", i, ReportInfo[i][rReporter],statusreport);
strcat(string, str);
ReportInfo[i][rListitem][l] = 1;
l += 1;
}
}
new stringx[456];
format(stringx, sizeof(stringx), "ID\tSender\tStatus\n%s", string);
ShowPlayerDialog(playerid, DIALOG_REPORT2,DIALOG_STYLE_TABLIST_HEADERS, " ", stringx, "Check", "Back");
}
else
{
new titlereports[456];
format(titlereports, 456, "Reports - %d mesaje primite", ReportCount);
ShowPlayerDialog(playerid, DIALOG_REPORT1, DIALOG_STYLE_LIST,titlereports, "Mesaje primite\nSterge mesaje", "Select", "Cancel");
}
return 1;
}