CMD:report with report ID's -
Blademaster680 - 25.02.2014
I dont understand how to do this.
I need to make the command for players to report players etc and they must be assigned a report id.
For example the first report will get reportid 1, and 2nd report will get reportid 2, and 3rd report will get reportid 3.
But then say an admin finishes reportid 2, then the next report will fill the gap and will be reportid 2 etc.
I dont understand how to make the loop for that.
Could anyone help?
Thanks
Here is my report command.
Код:
CMD:report(playerid, params[])
{
/* new report[168], str[168];
if(sscanf(params, "s[168]", report)) return SendClientMessage(playerid, -1, "USAGE: /report [text]");
if(reported[playerid] == 1) return SendClientMessage(playerid, -1, "You already have an active report.");
if(reports > 999) reports = 0;
reports++;
reported[playerid] = 1;
reportid[playerid] = reports;
format(reporttext[playerid], sizeof(reporttext), "%s [ID: %i] [Report ID: %i]: %s", GetName(playerid), playerid, reports, report);
format(str, sizeof(str), "Report from %s [ID: %i] [Report ID: %i]: %s", GetName(playerid), playerid, reports, report);
Log("/logs/reports.txt", reporttext[playerid]);
SendClientMessageToAdmins(COLOR_CYAN, str, 1); */
new report[168], str[168];
if(sscanf(params, "s[168]", report)) return SendClientMessage(playerid, -1, "USAGE: /report [text]");
if(reported[playerid] == 1) return SendClientMessage(playerid, -1, "You already have an active report.");
return 1;
}
Re : CMD:report with report ID's -
S4t3K - 25.02.2014
PHP код:
new idx, reports;
enum rep
{
rID,
rReason,
rReporter,
rReported,
};
new ReportsInfo[MAX_REPORTS][report];
// In the command
while(idx < reports) { idx++; }
new reportedid = ReturnUser(arrayoftheid);
new reportedname[MAX_PLAYER_NAME+1], reportername[MAX_PLAYER_NAME+1];
GetPlayerName(reportedid, reportername, MAX_PLAYER_NAME+1);
GetPlayerName(playerid, reportername, MAX_PLAYER_NAME+1);
ReportInfo[idx][rID] = idx;
ReportInfo[idx][rReason] = array_name_of_the_reason;
ReportInfo[idx][rReporter] = reportername;
ReportInfo[idx][rReported] = reportedname;
reports++;
Not sure at all.
Re: CMD:report with report ID's -
Blademaster680 - 26.02.2014
It gives me a few errors...
You understand what I'm trying to do though?
Re: CMD:report with report ID's -
Lloyde - 26.02.2014
This is my sample command for /report
pawn Код:
CMD:report(playerid, params[])
{
if(AdminDuty[playerid] == 1 && PlayerInfo[playerid][pAdmin] > 6)
{
SendClientMessage(playerid, COLOR_GRAD2, "You can't submit reports while on-duty.");
return 1;
}
if(PlayerInfo[playerid][pRMuted] == 0)
{
ShowPlayerDialogEx(playerid,7955,DIALOG_STYLE_MSGBOX,"Report tips","Tips when reporting:\n- Report what you need, not who you need.\n- Be specific, report exactly what you need.\n- Do not make false reports.\n- Report only for in-game items.","Close", "");
return 1;
}
if(JustReported[playerid] > 1)
{
SendClientMessage(playerid, COLOR_GREY, "Wait 25 seconds before sending another report!");
return 1;
}
if(isnull(params)) return SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /report [text]");
JustReported[playerid]=25;
SendReportToQueue(playerid, params);
SendClientMessage(playerid, COLOR_YELLOW, "Your report message was sent to the Admins.");
return 1;
}
Re: CMD:report with report ID's -
Blademaster680 - 26.02.2014
Thanks but I kinda need the function SendReportToQueue.
Is that gonna do the report thing I need?
Re: CMD:report with report ID's -
Blademaster680 - 27.02.2014
Still need help with this please... will +Rep
Re: CMD:report with report ID's -
Blademaster680 - 01.03.2014
Anyone?
Re: CMD:report with report ID's -
Abagail - 01.03.2014
You'd needa make a whole system for this. You could use enums to store the reportid, etc... Be creative with it.