14.12.2017, 13:51
So i have this now, but it shows like really messed up.
These are the reports in the file:
[14/12/2017][14:14:39]Jasper_Corleone has been reported by Jasper_Corleone. Reason: '1 testreport'
[14/12/2017][14:14:44]Jasper_Corleone has been reported by Jasper_Corleone. Reason: '1 testreport2'
[14/12/2017][14:16:12]Jasper_Corleone has been reported by Jasper_Corleone. Reason: '1 testreport3'
[14/12/2017][14:16:41]Jasper_Corleone has been reported by Jasper_Corleone. Reason: '1 testreport4'
It shows this:

How to fix this?
These are the reports in the file:
[14/12/2017][14:14:39]Jasper_Corleone has been reported by Jasper_Corleone. Reason: '1 testreport'
[14/12/2017][14:14:44]Jasper_Corleone has been reported by Jasper_Corleone. Reason: '1 testreport2'
[14/12/2017][14:16:12]Jasper_Corleone has been reported by Jasper_Corleone. Reason: '1 testreport3'
[14/12/2017][14:16:41]Jasper_Corleone has been reported by Jasper_Corleone. Reason: '1 testreport4'
It shows this:

How to fix this?
PHP код:
CMD:lastreports(playerid,params[])
{
new str[1024],string2[1024],buf[128];
if(AdminLevel[playerid] >=2)
{
for(new i; i < MAX_REPORTS; ++i)
{
new File:handle = fopen("Logs/playerreports.txt", io_read);
if(handle)
{
while(fread(handle, buf))
{
format(str, sizeof(str), "%s%s\n", str, buf);
strins(string2, str, strlen(str));
ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "Last reports", string2, "OK", "");
fclose(handle);
}
}
else
{
print("Failed to open file \"playerreports.txt\".");
}
}
}
return 1;
}

