14.05.2012, 21:55
pawn Код:
public GuardarEn(filename[],text[])
{
new File:Lfile;
new filepath[256];
new string[256];
new year, month, day;
new hour, minute, second;
getdate(year, month, day);
gettime(hour, minute, second);
format(filepath,sizeof(filepath),"/Logs/%s.txt", filename);
Lfile = fopen(filepath,io_append);
if(Lfile)
{
format(string,sizeof(string),"[%02d/%02d/%02d | %02d:%02d:%02d] %s\r\n",day,month,year,hour,minute,second, text);
fwrite(Lfile,string);
fclose(Lfile);
}
return 1;
}
