Latest 6 reports
#1

pawn Код:
COMMAND:reports(playerid) {
    new
        text[128];
    if(PlayerInfo[playerid][pAdminLevel] >= 1) {
        new File:file;
        file = fopen("Logs\report.txt",io_read);
        for(new i = 0; i < 6; ++i) {
            while(fread(file,text)) {
                SendClientMessage(playerid,white,text);
            }
        }
        fclose(file);
    } else {
        return SendClientMessage(playerid,red,"Only admins can use this command!");
    }
    return 1;
}
This simply crashes my server.

So how do I check the 6 latest reports from that file?

Thx
Reply
#2

Anyone can solve this
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)