12.11.2010, 17:30
You didn't.
pawn Код:
stock Log(string[], filename[], player = 0)
{
new h,mi;
gettime(h,mi);
new File:hFile;
new entry[256];
new year, month, day;
getdate(year, month, day);
if(player == 0)
{
format(entry, sizeof(entry), "XRPG/Logs/Global/%s", filename);
hFile = fopen(entry, io_append);
format(entry, sizeof(entry), "[%02d/%02d/%02d @ %02d:%02d] %s\r\n",day,month,year,h,mi,string);
fwrite(hFile, entry);
fclose(hFile);
}
else
{
format(entry, sizeof(entry), "XRPG/Logs/Player/%s",filename);
hFile = fopen(entry, io_append);
format(entry, sizeof(entry), "[%02d/%02d/%02d @ %02d:%02d] %s\r\n",day,month,year,h,mi,string);
fwrite(hFile, entry);
fclose(hFile);
}
return 1;
}