05.10.2011, 22:11
Код:
stock WriteReportsLog(string[]) {if(!fexist("Reports.log")) dini_Create("Reports.log"); // You need to change dini_Create to your file creating system. new}entry[255], File: hFile;format(entry, sizeof(entry), "%s\r\n", string); hFile = fopen("Reports.log", io_append); fwrite(hFile, entry); fclose(hFile);
The above was tested by me and it works without compile errors or file errors.
Copy&Paste to the bottom line of your gamemode or where ever you want to put it.
Then change dini_Create("Reports.log"); to you file creating system's Create function.
Last, somewhere in /report [playerid] [Reason] all you do is add WriteReportsLog(string); !
Enjoy and don't forget to +rep me (the star to far left).