how to create logs per player?
#1

I want to create a log for all all players in a folder named "PlayersLogs" and on him to appear name of player for example:
Scriptfiles/PlayerLogs/NAME_PLAYER1/LOG.info
Scriptfiles/PlayerLogs/NAME_PLAYER2/LOG.info etc.
i have these example
Код:
public PayLog(string[])
{
	new entry[256];
	format(entry, sizeof(entry), "%s\n",string);
	new File:hFile;
	hFile = fopen("pay.log", io_append);
	fwrite(hFile, entry);
	fclose(hFile);
}
I want the log to look like
[10:00 *to get the hour* ] Blabla log here i know to store logs but no how per player and hour...



Questions:

1.How to make per player
2.I can make with hour ? to get the hour from server.. ?
Reply
#2

Believe me, it isn't worth doing this per player. LSRP has hundreds of thousands (if not MILLIONS) of users. You don't want to have to sift through 300,000 files- it's not worth the space it would consume.

Use gettime to retrieve the current hour, minute, and second.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)