Logging - f*cked up
#1

Код:
public OnPlayerDisconnect(playerid, reason)
{
#if Disconnection-Log

	new hour;
	new minute;
	new second;
	new day;
	new month;
	new year;
	new cmd[264];
	new File:Disconnections;
	Disconnections = fopen("logs/disconnections.txt",io_append);
	{
	format(cmd,sizeof(cmd),"[%02d/%02d/%02d %02d:%02d:%02d] Player: %s || ID: %d || IP: %s disconnected. \r\n",day, month, year, hour, minute, second,PlayerName(playerid),playerid,PlayerIP(playerid));
	fwrite(Disconnections,cmd);
	fclose(Disconnections);
	}
	#endif
}
Thats my code, but.. this is what the file looks like:

[00/00/00 00:00:00] Player: All******* || ID: 16 || IP: 255.255.255.255 disconnected.

WTF? Whats wrong?
Reply


Messages In This Thread
Logging - f*cked up - by Striker_Moe - 26.09.2009, 19:48
Re: Logging - f*cked up - by Correlli - 26.09.2009, 20:07
Re: Logging - f*cked up - by ded - 26.09.2009, 21:03

Forum Jump:


Users browsing this thread: 1 Guest(s)