Loading Reports and deleting them
#1

Hello there so i have made a report system it saves the reports so admins can check later on when they are online but i dont know how to open the stored reports and then later on how can i delete them?

here is the report cmd
Код:
CMD:report(playerid,params[])
{
    new Target,reason[50],rstring[128];
	if(IsJailedOrMuted(playerid))return 1;
    if(sscanf(params,"us[50]",Target,reason))return SendClientMessage(playerid,GREY,"USAGE: /report [playerid] [reason]");
	if(!IsPlayerConnectedEx(Target)) return SendClientMessage(playerid,GREY,"Invalid player ID");
	if(strlen(reason) > 50) return SendClientMessage(playerid,GREY,"Reason can't be longer than 50 characters");
	format(rstring,sizeof(rstring),"SERVER: {FFFFFF}%s reported %s(Reason: %s)",PlayerName(playerid),PlayerName(Target),reason);
	SendMessageToAdmins(RED,rstring);
	SendClientMessage(playerid,YELLOW,"Your report has been sucessfully sent to the online admins");
  	LogReport(rstring); //Log the string
    return 1;
}
here is the stock used to store report.

Код:
stock LogReport(event[])
{
	new File:log = fopen("report_log.txt", io_append);
	fwrite(log, event);
	fwrite(log, "/n");
	fclose(log);
}
Help would be appreciated.
Reply


Messages In This Thread
Loading Reports and deleting them - by Marven - 23.10.2016, 12:04
Re: Loading Reports and deleting them - by Micko123 - 23.10.2016, 12:23
Re: Loading Reports and deleting them - by Vince - 23.10.2016, 12:29
Re: Loading Reports and deleting them - by Marven - 23.10.2016, 12:36
Re: Loading Reports and deleting them - by Marven - 24.10.2016, 07:24
Re: Loading Reports and deleting them - by IceBilizard - 24.10.2016, 10:08

Forum Jump:


Users browsing this thread: 2 Guest(s)