05.06.2010, 18:57
I think you should check some admin scripts out, because this will help more than anything and certainly more than me posting a code here.
But here is an eg from Lux Admin (credits to luxurion
)
Then you would save something like this:
Under your report command:
But here is an eg from Lux Admin (credits to luxurion

Код:
forward SaveIn(filename[],text[]); public SaveIn(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/Reports/%s.txt",filename); Lfile = fopen(filepath,io_append); 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; }
Under your report command:
Код:
format(str, sizeof(str), "REPORT: %s(Id:%d) Reported %s(Id:%d) Reason: %s |Time: %d:%d:%d|", reporter,playerid, reportedname, reported, params[strlen(tmp)+1], hour,minute,second); SaveIn("ReportLog",str);