if(strcmp(cmdtext, "/getlog1", true) == 0)
{
new string[128],count,count2;//string größen anpassen
new File:example = fopen("/Log/AdminLog.log", io_read); // Open the file
while(fread(example, string)) //reads the file line-by-line
{
count++;
}
new holestring[2048];//string größen anpassen
while(fread(example, string)) //reads the file line-by-line
{
if(count2 > (count-20))
{
format(holestring,sizeof(holestring),"%s%s",holestring,string);
SendClientMessage(playerid,COLOR_WHITE,string);
}
count2++;
}
ShowPlayerDialog(playerid,temp,DIALOG_STYLE_MSGBOX,"Information",holestring,"Okay","");
return 1;
}
Ich hab bei Zeile 14 für extra kein "%s\n%s" drinne, da im Log die verschiedenen Zeilen im Log schon mit "\n" enden.