CMD:ar(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 2)
{
new string[128], reportid;
if(sscanf(params, "d", reportid)) return SendClientMessageEx(playerid, COLOR_GREY, "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] = INVALID_PLAYER_ID;
Reports[reportid][BeingUsed] = 0;
return 1;
}
if(GetPVarInt(Reports[reportid][ReportFrom], "RequestingNameChange") == 1) {
new newname[MAX_PLAYER_NAME];
GetPVarString(Reports[reportid][ReportFrom], "NewNameRequest", newname, MAX_PLAYER_NAME);
format(string, sizeof(string), "{00BFFF}Old Name: {FFFFFF}%s\n\n{00BFFF}New Name: {FFFFFF}%s\n\n{00BFFF}Price: {FFFFFF}$%d", GetPlayerNameEx(Reports[reportid][ReportFrom]), newname, GetPVarInt(Reports[reportid][ReportFrom], "NameChangeCost"));
ShowPlayerDialog(playerid, DIALOG_REPORTNAME,DIALOG_STYLE_MSGBOX,"{00BFFF}Yeu cau doi ten (quan sat ky)",string,"Approve","Deny");
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);
PlayerInfo[playerid][pAcceptReport]++;
Reports[reportid][BeingUsed] = 0;
Reports[reportid][TimeToExpire] = 0;
strmid(Reports[reportid][Report], "None", 0, 4, 4);
DeletePVar(Reports[reportid][ReportFrom], "HasReport");
SetPVarInt(playerid, "NameChange",Reports[reportid][ReportFrom]);
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 da chap nhan bao cao va dang phan hoi, you co the go /reply de gui tin nhan can thiet den admin.", 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);
DeletePVar(Reports[reportid][ReportFrom], "HasReport");
}
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] = INVALID_PLAYER_ID;
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 /baocaotips", GetPlayerNameEx(playerid));
SendClientMessageEx(Reports[reportid][ReportFrom], COLOR_WHITE, string);
PlayerInfo[playerid][pTrashReport]++;
DeletePVar(Reports[reportid][ReportFrom], "HasReport");
Reports[reportid][ReportFrom] = INVALID_PLAYER_ID;
Reports[reportid][BeingUsed] = 0;
Reports[reportid][TimeToExpire] = 0;
strmid(Reports[reportid][Report], "None", 0, 4, 4);
}
return 1;
}
|