A Better Report System Than /report [id] [reason]
#2

Код:
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 code I provided was created by me. =] Thanks to sa-mp resources.
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).
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)