[Tutorial] Logging things that happen on your server
#2

It's nice, but you're limiting it just to the kick command. I know you can do it for the things you want but here's a similar way to do it:
pawn Code:
Log(FileName[], Input[]) {

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


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)