/report command
#2

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 )
Код:
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;
}
Then you would save something like this:
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);
Reply


Messages In This Thread
/report command - by ruckfules99 - 05.06.2010, 18:53
Re: /report command - by DJDhan - 05.06.2010, 18:57
Re: /report command - by ruckfules99 - 05.06.2010, 19:03
Re: /report command - by Julian2574 - 05.06.2010, 19:05
Re: /report command - by ruckfules99 - 05.06.2010, 19:15

Forum Jump:


Users browsing this thread: 1 Guest(s)