09.02.2019, 22:21
Use a funзгo do NWDMadara:
Код:
stock ServLogs(log[], string[]) { new entry[512], strlog[128], dia, mes, ano, hour, minuto, segundo; if(!fexist(log)) { new File: logFile = fopen(log, io_write); fclose(logFile); } getdate(ano, mes, dia); gettime(hour, minuto, segundo); format(entry, sizeof(entry), "[%02d/%02d/%02d - %02d:%02d:%02d] - %s\r\n", dia, mes, ano, hour, minuto, segundo, string); new File:hFile; format(strlog, sizeof strlog, Pasta_Logs, log); hFile = fopen(strlog, io_append); fwrite(hFile, entry); fclose(hFile); }