Dialogs / question improved
#4

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;
}
Reply


Messages In This Thread
Dialogs / question improved - by Zeus666 - 21.10.2018, 16:48
Re: Dialogs - by ReD_HunTeR - 21.10.2018, 17:02
Re: Dialogs / question improved - by Zeus666 - 21.10.2018, 17:13
Re: Dialogs / question improved - by ReD_HunTeR - 21.10.2018, 17:42
Re: Dialogs / question improved - by Zeus666 - 21.10.2018, 17:49
Re: Dialogs / question improved - by ReD_HunTeR - 21.10.2018, 18:26
Re: Dialogs / question improved - by Chyakka - 21.10.2018, 18:34
Re: Dialogs / question improved - by Zeus666 - 21.10.2018, 19:03
Re: Dialogs / question improved - by Chyakka - 21.10.2018, 20:53
Re: Dialogs / question improved - by Zeus666 - 21.10.2018, 21:03

Forum Jump:


Users browsing this thread: 1 Guest(s)