Logging command
#1

Hello I've started to log what players are doing such as commands, but I've got a problem, then way it logs, it logs it all on one line, but I wanted it so it would be like.
Quote:

Player has joined the server
Player has joined the server

but at the moment it logs like
Quote:

Player has joined the server Player has joined the server

my logging code is


pawn Код:
format(str2, sizeof str2, "[COMMAND][%02d/%02d/%04d %02d:%02d:%02d]: %s(%d): has used /stats", lyear, lmonth, lday, lhour, lminute, lsecond, name, ID);
AllLogs(str2);
pawn Код:
stock AllLogs(event[])
{
  new File:log = fopen("Core/Logs/AllLogs.txt", io_append);
  fwrite(log, event);
  fwrite(log, "\n");
  fclose(log);
}
If you know what's wrong it would be great if you could tell me, Also I have to know what does this mean on the Stock
Quote:

fwrite(log, event);

is that the bit I am logging?
Reply


Messages In This Thread
Logging command - by LeXuZ - 31.12.2014, 14:39
Re: Logging command - by leo9 - 31.12.2014, 14:49
Re: Logging command - by LeXuZ - 31.12.2014, 14:50
Re: Logging command - by Sledgehammer - 31.12.2014, 14:50
Re: Logging command - by Ryz - 31.12.2014, 14:54

Forum Jump:


Users browsing this thread: 1 Guest(s)