[HELP] Confused with making a report system
#4

Code:
CMD:report(playerid, params[])
{
	new reason[24],string[120],id,reportid=0,File: file = fopen("Reports/Reports.ini", io_append);
	if(sscanf(params,"us[24]",id,reason)) return SCM(playerid,COLOR_ORANGE,"USAGE: /report [playerid] [reason]");
	format(string,sizeof(string),"[REPORT #%d] %s[%d] has reported %s[%d]. Reason: (%s).\r\n",reportid+1,PN(playerid),playerid,PN(id),id,reason);
	MSGADMIN(COLOR_GREEN,string);
	SCM(playerid,COLOR_GREEN,"   Your report has been sent to admins.");
	fwrite(file,string);
	fclose(file);
	return 1;
}
Use \n for new line
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 4 Guest(s)