Hi! I wrote a function to add logs to the DayZServer_x64.ADM file, but this file cannot be opened for writing. The option to use another file is not suitable, since a discord bot is used that reads from this particular file. Tell me, is it possible to write to this file? Maybe you will expand the native write function in DayZServer_x64?
void PrintAdmLog(string logline) { int hour, minute, second; GetHourMinuteSecond(hour, minute, second); string time = hour.ToStringLen(2) + ":" + minute.ToStringLen(2) + ":" + second.ToStringLen(2); string FILENAME = "$profile:DayZServer_x64.ADM"; string text = time + " | " + logline; FileHandle file; if (!FileExist(FILENAME)) { file = OpenFile(FILENAME, FileMode.WRITE); } else { file = OpenFile(FILENAME, FileMode.APPEND); } if (file != 0) { FPrintln(file, text); CloseFile(file); } else { Print("Error! File not open: " + FILENAME); } }