pawn Код:
CMD:report(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 2 && PlayerInfo[playerid][pAdmin] < 1338)
{
SendClientMessageEx(playerid, COLOR_GRAD2, "You can't submit reports as an administrator.");
return 1;
}
if(PlayerInfo[playerid][pRMuted] != 0)
{
ShowPlayerDialog(playerid,7955,DIALOG_STYLE_MSGBOX,"Report blocked","You are blocked from submitting any reports!\n\nTips 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- Do not flame admins.\n- Report only for in-game items.\n- For shop orders use the /shoporder command","Close", "");
return 1;
}
if(JustReported[playerid] > 0)
{
SendClientMessageEx(playerid, COLOR_GREY, "Wait 25 seconds before sending another report!");
return 1;
}
if(isnull(params)) return SendClientMessageEx(playerid, COLOR_GRAD2, "USAGE: /report [text]");
JustReported[playerid]=25;
SendReportToQue(playerid, params);
SendClientMessageEx(playerid, COLOR_YELLOW, "Your report message was sent to the Admins.");
return 1;
pawn Код:
CMD:ar(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 2)
{
new string[128], reportid;
if(sscanf(params, "d", reportid)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /ar [reportid]");
if(reportid < 0 || reportid > 999) { SendClientMessageEx(playerid, COLOR_GREY, " Report ID not below 0 or above 999!"); return 1; }
if(Reports[reportid][BeingUsed] == 0)
{
SendClientMessageEx(playerid, COLOR_GREY, " That report ID is not being used!");
return 1;
}
if(!IsPlayerConnected(Reports[reportid][ReportFrom]))
{
SendClientMessageEx(playerid, COLOR_GREY, " The reporter has disconnected !");
Reports[reportid][ReportFrom] = 999;
Reports[reportid][BeingUsed] = 0;
return 1;
}
format(string, sizeof(string), "AdmCmd: %s has accepted the report from %s (ID: %i, RID: %i).", GetPlayerNameEx(playerid), GetPlayerNameEx(Reports[reportid][ReportFrom]),Reports[reportid][ReportFrom],reportid);
ABroadCast(COLOR_ORANGE, string, 2);
AddReportToken(playerid); // Report Tokens
format(string, sizeof(string), "%s has accepted your report and is reviewing it, you can /reply to send messages to the admin reviewing your report.", GetPlayerNameEx(playerid));
SendClientMessageEx(Reports[reportid][ReportFrom], COLOR_WHITE, string);
PlayerInfo[playerid][pAcceptReport]++;
Reports[reportid][ReplyTimerr] = SetTimerEx("ReplyTimer", 30000, 0, "d", reportid);
Reports[reportid][CheckingReport] = playerid;
Reports[reportid][BeingUsed] = 0;
Reports[reportid][TimeToExpire] = 0;
strmid(Reports[reportid][Report], "None", 0, 4, 4);
}
return 1;
}
CMD:tr(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 2)
{
new string[128], reportid;
if(sscanf(params, "d", reportid)) return SendClientMessageEx(playerid, COLOR_WHITE,"USAGE: /tr [reportid]");
if(reportid < 0 || reportid > 999) { SendClientMessageEx(playerid, COLOR_GREY, " Report ID not below 0 or above 999!"); return 1; }
if(Reports[reportid][BeingUsed] == 0)
{
SendClientMessageEx(playerid, COLOR_GREY, " That report ID is not being used!");
return 1;
}
if(!IsPlayerConnected(Reports[reportid][ReportFrom]))
{
SendClientMessageEx(playerid, COLOR_GREY, " The reporter has disconnected !");
Reports[reportid][ReportFrom] = 999;
Reports[reportid][BeingUsed] = 0;
return 1;
}
format(string, sizeof(string), "AdmCmd: %s has trashed the report from %s.", GetPlayerNameEx(playerid), GetPlayerNameEx(Reports[reportid][ReportFrom]));
ABroadCast(COLOR_ORANGE, string, 2);
format(string, sizeof(string), "%s has marked your report invalid. It will not be reviewed. Please check /reporttips", GetPlayerNameEx(playerid));
SendClientMessageEx(Reports[reportid][ReportFrom], COLOR_WHITE, string);
PlayerInfo[playerid][pTrashReport]++;
Reports[reportid][ReportFrom] = 999;
Reports[reportid][BeingUsed] = 0;
Reports[reportid][TimeToExpire] = 0;
strmid(Reports[reportid][Report], "None", 0, 4, 4);
}
return 1;
}