Quote:
Originally Posted by AndreiWow
I write it in a file, don't see why I should save it in a mysql table.
PHP код:
function KickLog(string[])
{
new
entry[ 128 ],
year,
month,
day,
hour,
minute,
second
;
getdate(year, month, day);
gettime(hour, minute, second);
format(entry, sizeof(entry), "%s | (%d-%d-%d) (%d:%d:%d)\n",string, day, month, year, hour, minute, second);
new File:hFile;
hFile = fopen("Basic/logs/KickLog.log", io_append);
fwrite(hFile, entry);
fclose(hFile);
}
Use KickLog(string); under a format, example.
PHP код:
format(string, sizeof(string), "x has kicked y", ...);
SendClientMessage(playerid, -1, string);
KickLog(string);
|
Even if I have to show on the website?
Quote:
Originally Posted by oMa37
If you want to show the logs in your website, You gotta save it with MySQL.
Even though if you don't want to show it in your website, I always prefer MySQL for saving stuff.
|
Saving into database every time that a player gives a weapon or pays someone.. doesn't create too much lag?
And this amount of data stored into the database isn't a problem?