Small question!
#6

If you need simple logs, you can use this (it was not made by me):
pawn Код:
stock Log(sz_fileName[], sz_input[]) {

    new sz_logEntry[156], i_dateTime[2][3], File: fileHandle = fopen(sz_fileName, io_append);
    gettime(i_dateTime[0][0], i_dateTime[0][1], i_dateTime[0][2]);
    getdate(i_dateTime[1][0], i_dateTime[1][1], i_dateTime[1][2]);
    format(sz_logEntry, sizeof(sz_logEntry), "[%i/%i/%i - %i:%i:%i] %s\r\n", i_dateTime[1][0], i_dateTime[1][1], i_dateTime[1][2], i_dateTime[0][0], i_dateTime[0][1], i_dateTime[0][2], sz_input);
    fwrite(fileHandle, sz_logEntry);
    return fclose(fileHandle);
}
Reply


Messages In This Thread
Small question! - by Ryz - 29.12.2014, 09:44
Re: Small question! - by Nitin - 29.12.2014, 09:49
Re: Small question! - by Ryz - 29.12.2014, 10:04
AW: Small question! - by CutX - 29.12.2014, 10:29
Re: Small question! - by Ryz - 29.12.2014, 10:31
Re: Small question! - by dominik523 - 29.12.2014, 11:40

Forum Jump:


Users browsing this thread: 1 Guest(s)