21.10.2018, 17:42
sorry did silly mistake forgot "\n"
pawn Код:
forward ShowReports(playerid);
public ShowReports(playerid)
{
new rows, fields, handlingarray[500];
cache_get_data(rows, fields, handle);
if(rows != 0)
{
strcat(handlingarray, "ID\tUsername\t\tTargetname\t\tReason\t\tDate\n");
for(new i = 0; i < rows; i++)
{
new reporter[MAX_PLAYER_NAME], reported[MAX_PLAYER_NAME], reportid, reportedon[25], reportreason[25], showreps[200];
reportid = cache_get_field_content_int(i, "ID");
cache_get_field_content(i, "Username", reporter);
cache_get_field_content(i, "Targetname", reported);
cache_get_field_content(i, "Data", reportedon);
cache_get_field_content(i, "Report", reportreason);
format(showreps, sizeof(showreps), "%i\t%s\t\t%s\t\t%s\t\t%s\n", reportid, reporter, reported, reportreason, reportdon);
strcat(handlingarray, showreps);
}
ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_TABLIST_HEADERS, "Reports", handlingarray, "OK", "");
}
else if(rows == 0)
{
SendClientMessage(playerid, RED, "There are currently no reports!");
}
return 1;
}